News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Like Posts

Started by vbgamer45, June 29, 2013, 09:29:03 AM

Previous topic - Next topic

ryan_dwight

the new version fixes the list of post/replies on the profile, only list of title is found.

but below the Show new replies to your posts at the top is the Show Likes notification when i clicked it, nothing happens.

Joker™

Quote from: ryan_dwight on January 11, 2014, 09:51:26 AM
the new version fixes the list of post/replies on the profile, only list of title is found.

but below the Show new replies to your posts at the top is the Show Likes notification when i clicked it, nothing happens.
I've noticed 2 issues over here

1. We need to display the button only after jquery is loaded
2. Also on your site there are 2 like buttons, have you made the mod edits manually? Checks these file whether the mod code is written twice
- Display.template.php
- Message.template.php
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ryan_dwight

Quote from: Joker™ on January 11, 2014, 10:06:02 AM
Quote from: ryan_dwight on January 11, 2014, 09:51:26 AM
the new version fixes the list of post/replies on the profile, only list of title is found.

but below the Show new replies to your posts at the top is the Show Likes notification when i clicked it, nothing happens.
I've noticed 2 issues over here

1. We need to display the button only after jquery is loaded
2. Also on your site there are 2 like buttons, have you made the mod edits manually? Checks these file whether the mod code is written twice
- Display.template.php
- Message.template.php
i just reinstalled it then the show like notification is working. ill try to check on that 2 files for the 2 like buttons.

ryan_dwight

for this mod I did'nt do any manual edits.

I checked all the files included in the file edits and you are right that the moc code is written twice so i removed the duplicate codes.
the result is still 2 like buttons.

one more thing is the recount like stats, what does it do? because the next thing is Reset members account is it going back to zero likes? I didn't do this task yet because Im not sure of it.

last thing is the like notification, is it possible to have a close button? and when you try to click the post that overlapping the menus, you can't click it instead the menu button is the one you can open. I hope you get what I mean.

Joker™

Quote from: ryan_dwight on January 11, 2014, 11:11:45 AM
I checked all the files included in the file edits and you are right that the moc code is written twice so i removed the duplicate codes.
the result is still 2 like buttons.
Just a silly question, have you saved the file back to hosting via ftp/sftp?


Quote from: ryan_dwight on January 11, 2014, 11:11:45 AM
one more thing is the recount like stats, what does it do? because the next thing is Reset members account is it going back to zero likes? I didn't do this task yet because Im not sure of it.
QuoteAdmin's can recount the total likes of users from admin section itself.


Note - If you are upgrading from version < 1.2, please recount the total like of the users from:
My Community » Administration Center » Like Posts  » Recount Like stats
It simply re-calculate the total likes a used has received.
The total likes received by a used are kept in a separate table. In simple words, don't worry, try to run the task once ;).


Quote from: ryan_dwight on January 11, 2014, 11:11:45 AM
last thing is the like notification, is it possible to have a close button? and when you try to click the post that overlapping the menus, you can't click it instead the menu button is the one you can open. I hope you get what I mean.
Well if I told you, that closing that menu is even more easy (Joker wants a chocolate foe this :laugh:)

Open the notification menu
- Either press 'esc' (escape) key from keyboard
- Or click anywhere outside of notification box

In both cases notification pop up will be closed automatically.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ryan_dwight

QuoteJust a silly question, have you saved the file back to hosting via ftp/sftp?
yes of course and its ok it's better to think that way than assuming every member here knows everything.


QuoteWell if I told you, that closing that menu is even more easy (Joker wants a chocolate foe this :laugh:)

Open the notification menu
- Either press 'esc' (escape) key from keyboard
- Or click anywhere outside of notification box

In both cases notification pop up will be closed automatically.
that's weird because in my forum it doesn't, I tried firefox and chrome but there's no way I can close unless going to another link.

and when you click the like notification when you are on the home the notification is located at the bottom of the site but when you are in a specific thread its like a popup covering the menu.

Im sorry if i have so many issues, did i messed something?

Joker™

Quote from: ryan_dwight on January 11, 2014, 01:13:40 PM
QuoteJust a silly question, have you saved the file back to hosting via ftp/sftp?
yes of course and its ok it's better to think that way than assuming every member here knows everything.


QuoteWell if I told you, that closing that menu is even more easy (Joker wants a chocolate foe this :laugh:)

Open the notification menu
- Either press 'esc' (escape) key from keyboard
- Or click anywhere outside of notification box

In both cases notification pop up will be closed automatically.
that's weird because in my forum it doesn't, I tried firefox and chrome but there's no way I can close unless going to another link.

and when you click the like notification when you are on the home the notification is located at the bottom of the site but when you are in a specific thread its like a popup covering the menu.

Im sorry if i have so many issues, did i messed something?

Ahh, these things happens don't worry.

I'd advice you to check every edit this mod makes across the files. To me it looks like the css file is not loading due to which the notifications panel is shown at the bottom of page.

Make backup of files before editing them
Mod Edits
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

ryan_dwight

QuoteMake backup of files before editing them
Mod Edits

yes this is the one that I used as a basis to edit all files.

is the effect, takes immediately or do i need to restart something or cache to be updated?

Ill try to double check the files maybe I missed something, but the good thing is there is nothing on error logs.

Thanks

_monotiz_

Quote from: Joker™ on January 11, 2014, 09:11:40 AM
@_monotiz_,

Are you loading a separate jQuery or trying to use the one which is loaded by the 'LikePosts' mod?

The mod has faced a lot of jQuery conflicts, as there are various other mods on SMF who loads there own version of jQuery.To [nofollow] overcome the issue 'LikePosts' mod uses the jQuery root operator/instance($) under a different instance name(lpObj.jQRef).

So, if you are using the jQuery which loads with this mod, your code should be something like this
<script type="text/javascript">
lpObj.jQRef(document).ready(function() {
lpObj.jQRef(document).bind("scroll", function () {
if (lpObj.jQRef(document).scrollTop() > 70) {
lpObj.jQRef("#navbar_spacer").addClass("navbar_spacer");
lpObj.jQRef("#navbar").addClass("navbar_fixed");
}
else {
lpObj.jQRef("#navbar").removeClass("navbar_fixed");
lpObj.jQRef("#navbar_spacer").removeClass("navbar_spacer");
}
})
});
</script>

I'm loading a local jQuery file. Anyway, I solved:

<script type="text/javascript">
jQuery(document).ready(function($) {
$(document).bind("scroll", function () {
if ($(document).scrollTop() > 70) {
$("#navbar_spacer").addClass("navbar_spacer");
$("#navbar").addClass("navbar_fixed");
}
else {
$("#navbar").removeClass("navbar_fixed");
$("#navbar_spacer").removeClass("navbar_spacer");
}
})
});
</script>


Thank you.

ryan_dwight

I finally fixed it but the closing of the like notification has the same problem, but that's ok for now.

Thanks for the help and this great mod. Ill just wait for more updates.

Joker™

Quote from: ryan_dwight on January 12, 2014, 06:19:11 AM
I finally fixed it but the closing of the like notification has the same problem, but that's ok for now.

Thanks for the help and this great mod. Ill just wait for more updates.
Happy to see that you got it all sorted out.

For notification thinggy, I'm already working on a solution, but the solution affects a lot of things, so there might be a delay in the fix.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Joker™

Quote from: _monotiz_ on January 12, 2014, 04:11:28 AM
I'm loading a local jQuery file. Anyway, I solved:

<script type="text/javascript">
jQuery(document).ready(function($) {
$(document).bind("scroll", function () {
if ($(document).scrollTop() > 70) {
$("#navbar_spacer").addClass("navbar_spacer");
$("#navbar").addClass("navbar_fixed");
}
else {
$("#navbar").removeClass("navbar_fixed");
$("#navbar_spacer").removeClass("navbar_spacer");
}
})
});
</script>


Thank you.
Nice work :)
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Powerslaved

When trying to install this i get this error

Unknown column 'id_member' in 'smf_like_post'
File: /var/www/smf/Packages/temp/install.php
Line: 158

Joker™

Quote from: Powerslaved on January 14, 2014, 06:16:30 AM
When trying to install this i get this error

Unknown column 'id_member' in 'smf_like_post'
File: /var/www/smf/Packages/temp/install.php
Line: 158

Can you tell me the exact steps you have tried and the error came up?
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

makv

Quote from: Joker™ on January 14, 2014, 08:28:17 PM
Quote from: Powerslaved on January 14, 2014, 06:16:30 AM
When trying to install this i get this error

Unknown column 'id_member' in 'smf_like_post'
File: /var/www/smf/Packages/temp/install.php
Line: 158

Can you tell me the exact steps you have tried and the error came up?

I have the exact same error (in fact I came to this thread to see if anyone else has it too!)

Here were my steps (I'm in 2.0.6):

1. go to Download Packages and browse for zip file and hit Upload
2. "The package has been uploaded successfully"
3. Click on [ Install Mod ] link
4. Files are extracted and tested. Steps 13-18 are "Execute Modification" and are Successful.
5. Click Install Now
6. Above error appears


margarett

@Joker™

It seems that the installer is really not creating that column in table "like_posts"...

'like_post' => array (
'columns' => array (
            array(
'name' => 'id_like',
'type' => 'int',
'size' => 10,
'unsigned' => true,
'auto' => true,
),
array(
'name' => 'id_msg',
'type' => 'int',
'size' => 10,
'unsigned' => true,
'default' => '0',
),
array(
'name' => 'id_topic',
'type' => 'mediumint',
'size' => 8,
'unsigned' => true,
'default' => '0',
),
array(
'name' => 'id_board',
'type' => 'smallint',
'size' => 5,
'unsigned' => true,
'default' => '0',
),
            array(
                'name' => 'id_member_received',
                'type' => 'mediumint',
                'size' => 8,
                'unsigned' => true,
                'default' => '0',
            ),
            array(
                'name' => 'id_member_gave',
                'type' => 'mediumint',
                'size' => 8,
                'unsigned' => true,
                'default' => '0',
            ),
array(
'name' => 'rating',
'type' => 'smallint',
'size' => 1,
'unsigned' => true,
'default' => '0',
),
),
'indexes' => array(
        array(
            'type' => 'primary',
            'columns' => array('id_like', 'id_msg', 'id_member_gave'),
        ),
    ),
),

(and then maybe the upgrader is being triggered. There you have an ALTER to that "id_member" column and that might explain why the error shows in this stage...)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Joker™

Quote from: makv on January 15, 2014, 12:16:15 PM
Quote from: Joker™ on January 14, 2014, 08:28:17 PM
Quote from: Powerslaved on January 14, 2014, 06:16:30 AM
When trying to install this i get this error

Unknown column 'id_member' in 'smf_like_post'
File: /var/www/smf/Packages/temp/install.php
Line: 158

Can you tell me the exact steps you have tried and the error came up?

I have the exact same error (in fact I came to this thread to see if anyone else has it too!)

Here were my steps (I'm in 2.0.6):

1. go to Download Packages and browse for zip file and hit Upload
2. "The package has been uploaded successfully"
3. Click on [ Install Mod ] link
4. Files are extracted and tested. Steps 13-18 are "Execute Modification" and are Successful.
5. Click Install Now
6. Above error appears


Are you guys/gurlz doing upgrade or making a fresh install of the mod?

@margarett, with this version I've changed few columns and the installer script checks whether its being running for upgrade or fresh install.

// Upgrade thinggy
$is_upgrade = true;
$request = $smcFunc['db_query']('', '
    SHOW COLUMNS
    FROM {db_prefix}like_post',
    array(
    )
);
if ($request !== false) {
    while ($row = $smcFunc['db_fetch_assoc']($request)) {
        if ($row['Field'] == 'id_like' && $row['Type'] == 'int(10)')
            $is_upgrade = false;
    }
    $smcFunc['db_free_result']($request);
}


I'm really interested in knowing whether this is happening with some specific version upgrade or I'm missing something :P.
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

NMcCoy

I'm trying to do a fresh install, and getting that same error. Came here to see if anyone had a solution. :)

makv

Quote from: NMcCoy on January 15, 2014, 09:09:28 PM
I'm trying to do a fresh install, and getting that same error. Came here to see if anyone had a solution. :)

I'm doing a fresh install too. In fact, I've never had any previous version of the mod installed.

Joker™

Ok, so heres the the brief of the bug
- mod installer script dies for fresh install yeyyy :laugh:

Lol, I made a real booboo this time, and fix is already pushed over here.

A new version is just around the corner & will be released soon :).
Github Profile
Android apps
Medium

How to enable Post Moderation

"For the wise man looks into space and he knows there is no limited dimensions." - Laozi

All support seeking PM's get microwaved

Advertisement: