Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on June 29, 2013, 09:29:03 AM

Title: Like Posts
Post by: vbgamer45 on June 29, 2013, 09:29:03 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=3708)

Like Posts (http://custom.simplemachines.org/mods/index.php?mod=3708)

This mod provides and interface to like/unlike posts.

Features
- Users can like posts within a topic.
- Whereas on message index only the first post of topic is taken into consideration. One can like first post of topic from message index also.
- A notification system, where users can see who has liked what post in real time.
- Total no of likes user has received so far is shown in post displays.
- In profile section one can see the likes given and received by a user so far.
- A complete dedicated admin interface, to control various features of mods
- Interface to see various stats related with the mod. The section can be accessed using the 'Like stats' button provided in the website navgation



Admin interface

General Settings
- Enable disable the mod with a single click
- Enable disable like stats completely
- Enable disable like posts notification for everyone
- Number of likes to show at once in user profiles
- Number of likes to show at once in notification panel
- Whether to show like button on message index or not
- Show total likes in posts under user avatar


Permission Settings
- Enable the permission "Can like posts" for those groups who can like the posts.
- Enable the permission "Can view like" for those groups who can view who liked which post.
- Enable the permission "Can view likes of other users in their profiles" for those groups who can view like summary of other users in there profiles.
- Enable the permission "Can view stats of liked posts" for those groups who can view like posts stats
- Enable the permission "Can view notifications of liked posts" for those groups who can view like posts notifications
- Enable the permissions for guests about where they can see likes i.e in posts/topics, boards, profiles & whether or not they can see the liked posts stats


Board Settings
- Select on which boards you want to enable the mod
- If you want to select all boards in a category, just click on the category name


Recount Like Stats
- To remove the deleted messages from likes count and stats
- Removes duplicate entries from like table
- To recount the total likes user has received so far. One should run this once a month at least.


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


All suggestions related to core features and UI are most welcomed.


All images/css used in the mod falls under the license used below.

License
* This SMF Modification is subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this SMF modification except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
Title: Re: Like Posts
Post by: shadow82x on June 29, 2013, 01:27:03 PM
Interesting, any screenshots? :)
Title: Re: Like Posts
Post by: Dhayzon on June 29, 2013, 01:57:58 PM
screenshots ::) please


edit: excellent mod I like
Title: Re: Like Posts
Post by: TheListener on June 29, 2013, 01:59:07 PM
Quote from: dhayzon on June 29, 2013, 01:57:58 PM
screenshots ::) please

Why repeat the previous posters request?
Title: Re: Like Posts
Post by: Joker™ on June 29, 2013, 02:09:27 PM
Quote from: shadow82x on June 29, 2013, 01:27:03 PM
Interesting, any screenshots? :)

Quote from: dhayzon on June 29, 2013, 01:57:58 PM
screenshots ::) please
Added :).

Quote from: Old Fossil on June 29, 2013, 01:59:07 PM
Quote from: dhayzon on June 29, 2013, 01:57:58 PM
screenshots ::) please

Why repeat the previous posters request?
And the million $ Q award goes to.... :P
Title: Re: Like Posts
Post by: littlenicki on July 02, 2013, 04:30:37 PM
Hello, this looks like a great mod! Could you please do a SMF 1.1.18 compatible version? Thank you, Nicole
Title: Re: Like Posts
Post by: Dzonny on July 02, 2013, 06:48:10 PM
Tnx Joker, a lovely one :)
Title: Re: Like Posts
Post by: Joker™ on July 03, 2013, 11:55:30 AM
Quote from: littlenicki on July 02, 2013, 04:30:37 PM
Hello, this looks like a great mod! Could you please do a SMF 1.1.18 compatible version? Thank you, Nicole
Thanks for the compliment. Sorry, I'm not back-porting any of my mods to SMF 1.x branch, as a stable version (SMF 2.x) is already out.

Quote from: Dzonny on July 02, 2013, 06:48:10 PM
Tnx Joker, a lovely one :)
Thank you :).

Guys, any suggestions/improvements/features in mind for mod?
Title: Re: Like Posts
Post by: Biology Forums on July 12, 2013, 09:33:44 PM
Excellent mod, Joker™!
Title: Re: Like Posts
Post by: Joker™ on July 13, 2013, 11:49:35 PM
Quote from: Liam_michael on July 12, 2013, 09:33:44 PM
Excellent mod, Joker™!
Thanks :).
Title: Re: Like Posts
Post by: Biology Forums on July 14, 2013, 01:57:58 AM
As for suggestions, I'd replace the "Like" and "Unlike" with images (i.e. a thumb, or sad/happy face). Once clicked, a tooltip should appear saying "you now like this topic" (or, something appears beside the thumbs up image).
Title: Re: Like Posts
Post by: Joker™ on July 14, 2013, 10:38:13 AM
Quote from: Liam_michael on July 14, 2013, 01:57:58 AM
As for suggestions, I'd replace the "Like" and "Unlike" with images (i.e. a thumb, or sad/happy face). Once clicked, a tooltip should appear saying "you now like this topic" (or, something appears beside the thumbs up image).
Nice nice. Also I'm thinking of adding page in user profile, where one can see:

1. How many messages he/she has liked, and
2. How many of his posts are being liked
Title: Re: Like Posts
Post by: Mick. on July 14, 2013, 11:12:36 AM
Very nice. Im using this now and i dig the fact one cant like its own comment. Im changing the text link for a thumbs up/down sprite.
Title: Re: Like Posts
Post by: Biology Forums on July 14, 2013, 12:28:42 PM
Quote1. How many messages he/she has liked, and
2. How many of his posts are being liked

Perfect, keep a track of all the threads you've liked in past.

Quote from: Mick. on July 14, 2013, 11:12:36 AM
Im changing the text link for a thumbs up/down sprite.

Nice.

In addition, once the image is clicked, it darkens, to show that it was clicked.
Title: Re: Like Posts
Post by: Joker™ on July 15, 2013, 10:17:34 AM
Quote from: Mick. on July 14, 2013, 11:12:36 AM
Very nice. Im using this now and i dig the fact one cant like its own comment. Im changing the text link for a thumbs up/down sprite.
Glad you guys are liking it.

TBH, personally the FB feature of liking you own post is in top 10 of my most hated things :P.

Well, I also want to add images in the mod, but I'm trying to get an idea of something different from thumbs up/down images(I hope you don't mind).

As this modification is going to do a lot more than FB likes, so why not have something different from it in terms of visual effect :P.

Even I don't know the potential of this modification right now :-X. Just saying again, I'm hearing and ready to implement the ideas present by the community in this mod, as far as we can keep this mod from getting bloated.
Title: Re: Like Posts
Post by: barnaby jonez on July 16, 2013, 11:58:21 AM
Hi Joker,

I'm currently using illori's "SMF Likes Plus" and while it gets the job done, the biggest flaw is that there's really no "feedback" on Likes.

I'd like it (this sounds demanding, but it's just a suggestion) if Likes behaved like so:

- Like/Remove Like posts (simple enough, it already does this)
- How many Likes has this user received? (Profile page)
- How many Likes has this user given? (Profile page)
- (The big one) Feedback on when a Like has been given. Perhaps some AJAX involved? Similar to how you get a PM, there is a notification.
-- Perhaps a way to show what posts/threads did give you Likes? So a user knows there is activity, even in an older thread. Maybe a last 5 threads where there was activity. Unsure of the best approach here.

While there is already a pretty feature filled Likes mod that costs money (and deservedly so), I'm on board for a free one that can reach even half the ability of it, so long as it fits the basic needs for a community.

I haven't tried your mod out as-is, but hopefully I can painlessly transfer over my current Likes from the current mod I use. Thanks for your time.
Title: Re: Like Posts
Post by: Joker™ on July 16, 2013, 12:16:26 PM
Just pointing out the status of the points you have mentioned above.

- Like/Remove Like posts (simple enough, it already does this) - Done
- How many Likes has this user received? (Profile page) - Yet to implement
- How many Likes has this user given? (Profile page) - Yet to implement
- (The big one) Feedback on when a Like has been given. Perhaps some AJAX involved? Similar to how you get a PM, there is a notification. - Yet to implement (right now there is just a text change, I'm just waiting to get my hands on photoshop)
- Perhaps a way to show what posts/threads did give you Likes? So a user knows there is activity, even in an older thread. Maybe a last 5 threads where there was activity. Unsure of the best approach here. - Yet to implement (can you elaborate this one)

Well, my mods were always free, are free and going to be free of cost. I love to code for SMF :).
Title: Re: Like Posts
Post by: barnaby jonez on July 16, 2013, 12:22:05 PM
Joker,

Using an example from vBullitin, when you receive a Like, you click on that notification, and it will show you what posts were given likes, and by whom. [X Person liked your post(s) in this thread...]

Similarly, Facebook does this the same way. [X Person liked your Status...]

It doesnt have to be as specific as this, but something that basically says "Hey, there is some activity. Someone read your post, and liked it." -- this gets the user to zip straight there and see who is giving them props.

Does this help?
Title: Re: Like Posts
Post by: Joker™ on July 16, 2013, 12:25:52 PM
Quote from: barnaby jonez on July 16, 2013, 12:22:05 PM
Joker,

Using an example from vBullitin, when you receive a Like, you click on that notification, and it will show you what posts were given likes, and by whom. [X Person liked your post(s) in this thread...]

Similarly, Facebook does this the same way. [X Person liked your Status...]

It doesnt have to be as specific as this, but something that basically says "Hey, there is some activity. Someone read your post, and liked it." -- this gets the user to zip straight there and see who is giving them props.

Does this help?
Hmm, sounds much clear now. Just thinking of the server load in the case, when some crazy person like me goes on a post liking rampage.

Just tracking everything on GitHub (https://github.com/Joker-SMF/SMF-Likes/issues?state=open)
Title: Re: Like Posts
Post by: Biology Forums on July 16, 2013, 07:43:01 PM
If the person get's a PM everytime their post is liked, it shouldn't hurt the server load, should it? I'd be more concerned with people getting annoyed by the PMs. I suppose you could add an option that prevent notifications if that becomes an issue.
Title: Re: Like Posts
Post by: Mick. on July 16, 2013, 07:55:04 PM
It shouldn't. Otherwise, I won't pm you 100 times a day every day lol
Title: Re: Like Posts
Post by: barnaby jonez on July 17, 2013, 11:36:56 AM
I should mention that Facebook is real-time, which may add to some server load.

vBullitin shows you the Notification on page refresh, just like a PM. Perhaps this is the better solution.

I'm not familiar with how other boards may approach this feature (XenForo, IP Board, etc)
Title: Re: Like Posts
Post by: drfun on July 19, 2013, 05:42:32 AM
Oh thanks to the creator of this mod, i have been waiting for something like this, Kudos to you.

I tested the mod and am so in love with it but there is something i will like to ask,

when some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)

[just my thought,]

Title: Re: Like Posts
Post by: drfun on July 19, 2013, 07:44:25 AM
I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quotewhen some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme
Title: Re: Like Posts
Post by: Joker™ on July 21, 2013, 11:43:03 PM
Quote from: barnaby jonez on July 17, 2013, 11:36:56 AM
I should mention that Facebook is real-time, which may add to some server load.

vBullitin shows you the Notification on page refresh, just like a PM. Perhaps this is the better solution.

I'm not familiar with how other boards may approach this feature (XenForo, IP Board, etc)
Yup, thats why we need a notification system without overloading the system.



Quote from: drfun on July 19, 2013, 05:42:32 AM
Oh thanks to the creator of this mod, i have been waiting for something like this, Kudos to you.

I tested the mod and am so in love with it but there is something i will like to ask,

when some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)

[just my thought,]
What happens why more than 1 person likes a post? What should be the text string(just trying to get your opinion)?


Quote from: drfun on July 19, 2013, 07:44:25 AM
I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quotewhen some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme
Just trying to trim down the issue, this is due to theme change?
Title: Re: Like Posts
Post by: komp on July 22, 2013, 04:51:00 AM
Quote from: drfun on July 19, 2013, 07:44:25 AM
I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quotewhen some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme

got exact same issue on all themes
shame not many "like" mods that will even install on the latest version of the forum software
Title: Re: Like Posts
Post by: Joker™ on July 22, 2013, 10:03:34 AM
Hi drfun and komp,

Please provide me the site link and an account to test.

To me it sounds most likely some sort of javascript conflict.
Title: Re: Like Posts
Post by: drfun on July 22, 2013, 11:25:42 AM
Good to hear from you again.
This is my site www.allstudentforum.com
and you can use this to get access to the forum
USER NAME: likemod
PASSWORD: all4like

thanks
Title: Re: Like Posts
Post by: Joker™ on July 23, 2013, 12:40:23 PM
Here are the errors:

Quote
http://www.allstudentforum.com/Themes/default/scripts/likePosts.js 404 (Not Found)
http://www.allstudentforum.com/Themes/Vertex-Theme2-0-2-v1-2/css/likeposts.css 404 (Not Found)

Just open your site (in chrome). Right click, choose inspect. Goto console, reload the page once and you can see a lot of info about whats wrong with the website ;).
Title: Re: Like Posts
Post by: drfun on July 23, 2013, 06:25:45 PM
Quotehttp://www.allstudentforum.com/Themes/default/scripts/likePosts.js 404 (Not Found)
Thanks for pointing this out but when i looked into the http://www.allstudentforum.com/Themes/default/scripts/...  folder the likePosts.js was siting in there.

Quotehttp://www.allstudentforum.com/Themes/Vertex-Theme2-0-2-v1-2/css/likeposts.css
And when looked into this also, i noticed the likeposts.css was not there.

Ok now i went back on my PC (Runing on Xampp) and check this folder of the one that i said worked and i noticed that Themes/default/scripts/... the likePosts.js was siting right there and when i checked Themes/Vertex-Theme2-0-2-v1-2/css/.. The likeposts.css was not there.
But the mod was working properly. Now i went back to my site and uploaded the likePosts.js and likeposts.css in those respective folders and tested to see if it will work, but its still takes me to the top of the page without any changes.

Ok, i decided to check using this method you used
QuoteJust open your site (in chrome). Right click, choose inspect. Goto console, reload the page once
and i still got the same error you pointed me to
Quotehttp://www.allstudentforum.com/Themes/default/scripts/likePosts.js 404 (Not Found)
http://www.allstudentforum.com/Themes/Vertex-Theme2-0-2-v1-2/css/likeposts.css 404 (Not Found)

Now my question is, if the installation went smoothly,
1. why was there no the /likeposts.css file in the CSS folder of the theme (Vertex-Theme2-0-2-v1-2)
2. Why is the one on my PC working properly without the /likeposts.css file in the CSS folder of the theme (Vertex-Theme2-0-2-v1-2)
3. After uploading this two files to there respective folder on my site, why is it not still working?

I need your help to fix this.
Title: Re: Like Posts
Post by: Joker™ on July 24, 2013, 01:46:46 PM
Lol, first of all, there is a major flaw in the permission system of the mod. Where's the author, call him out :D.

Coming back to drfun's issue, right now I'm doing a lot of changes in the mod and a lot of fixing related to mod is in progress.

I'm trying my best to roll out a newer version in the upcoming weekend. I hope you can wait till then, as I'd be more fruitful for us if I can concentrate on the core features of mod.

Who knows, the new version might be able to resolve all of your bugs :).
Title: Re: Like Posts
Post by: drfun on July 24, 2013, 02:42:35 PM
QuoteLol, first of all, there is a major flaw in the permission system of the mod. Where's the author, call him out :D.

Coming back to drfun's issue, right now I'm doing a lot of changes in the mod and a lot of fixing related to mod is in progress.

I'm trying my best to roll out a newer version in the upcoming weekend. I hope you can wait till then, as I'd be more fruitful for us if I can concentrate on the core features of mod.

Who knows, the new version might be able to resolve all of your bugs
Ok if you say so, i look forward to the new version of the mod, I believe the mod is a great mod and it was nice testing and knowing what it can do.
Title: Re: Like Posts
Post by: Joker™ on July 24, 2013, 02:47:28 PM
Ok, so far this has been accomplished.

- To show posts user has liked in profile
- To show posts liked by others in a users profile
- visual feedback on like/dislike click
- admin panel permission system flaw
- various bug fixes

I'll be doing a last round of testing by tomorrow and most probably if nothing broke up, you guys will be able to see a newer version.

Also for notification thing, I'll be working on a separate mod. Right now I've no idea how it's going to work but it for sure it'll work as system which can consume different mods and show notifications based on it. Grrr, time to sleep :P.
Title: Re: Like Posts
Post by: Joker™ on July 25, 2013, 11:18:40 AM
Mod updated to version 1.1 :).
Title: Re: Like Posts
Post by: cat_woman on July 25, 2013, 04:57:54 PM
Quote from: Joker™ on July 16, 2013, 12:16:26 PM
.... I'm just waiting to get my hands on photoshop)...

I'm glad I found this thread.  I'm just building my forum now, so this mod will be a great feature on it. 

If you want a free - legal - copy of Photoshop, you can download PSCS2 from the Adobe website.  They no longer support it, and it may not run on newer OS, but its worth a try.  In case you didn't hear about this...
Title: Re: Like Posts
Post by: MechSpecs on July 25, 2013, 05:11:35 PM
Quote from: Joker™ on July 24, 2013, 02:47:28 PM
Ok, so far this has been accomplished.

- To show posts user has liked in profile
- To show posts liked by others in a users profile
- visual feedback on like/dislike click
- admin panel permission system flaw
- various bug fixes

I'll be doing a last round of testing by tomorrow and most probably if nothing broke up, you guys will be able to see a newer version.

Also for notification thing, I'll be working on a separate mod. Right now I've no idea how it's going to work but it for sure it'll work as system which can consume different mods and show notifications based on it. Grrr, time to sleep :P.

I'll be following this thread closely as these are some of the features that I wish were in the Likes Plus mod that I am currently using but sadly aren't.
Title: Re: Like Posts
Post by: Joker™ on July 25, 2013, 11:22:28 PM
Quote from: cat_woman on July 25, 2013, 04:57:54 PM
Quote from: Joker™ on July 16, 2013, 12:16:26 PM
.... I'm just waiting to get my hands on photoshop)...

I'm glad I found this thread.  I'm just building my forum now, so this mod will be a great feature on it. 

If you want a free - legal - copy of Photoshop, you can download PSCS2 from the Adobe website.  They no longer support it, and it may not run on newer OS, but its worth a try.  In case you didn't hear about this...
Thanks for the info, but I've a license of CS3.
Title: Re: Like Posts
Post by: MechSpecs on July 26, 2013, 12:05:34 AM
Are you gonna throw up new screenshots of the various aspects of the mod functions?
Title: Re: Like Posts
Post by: Joker™ on July 26, 2013, 01:53:23 AM
Quote from: MechSpecs on July 26, 2013, 12:05:34 AM
Are you gonna throw up new screenshots of the various aspects of the mod functions?
Yup. But not before tomorrow, as bit busy with RL.
Title: Re: Like Posts
Post by: Neo_TE on July 26, 2013, 04:06:37 AM
Quote from: Joker™ on July 25, 2013, 11:18:40 AM
Mod updated to version 1.1 :).
Quote from: Joker™ on July 26, 2013, 01:53:23 AM

Quote from: MechSpecs on July 26, 2013, 12:05:34 AM
Are you gonna throw up new screenshots of the various aspects of the mod functions?
Yup. But not before tomorrow, as bit busy with RL.

Thank you very much.
Title: Re: Like Posts
Post by: Joker™ on July 27, 2013, 07:24:53 AM
Screenshots updated.
Title: Re: Like Posts
Post by: drfun on July 27, 2013, 03:48:16 PM
Thanks @ Joker you kept to your word, i have install the like and it is working very well now. Remain blessed for your effort.
Is it possible for quest to view the like button but cant like/unlike and if they click on the like button it prompt them to register or redirect them to the login page?
Title: Re: Like Posts
Post by: MechSpecs on July 27, 2013, 05:58:57 PM
This is coming along nicely!

I will see if I can eventually adapt this to the layout/images and color scheme that I am using on my test server.
Title: Re: Like Posts
Post by: Tikkuy on July 28, 2013, 12:01:28 AM
Quote from: komp on July 22, 2013, 04:51:00 AM
Quote from: drfun on July 19, 2013, 07:44:25 AM
I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quotewhen some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme

got exact same issue on all themes
shame not many "like" mods that will even install on the latest version of the forum software

Make that three. :'(
Title: Re: Like Posts
Post by: Joker™ on July 28, 2013, 01:37:59 AM
Quote from: MechSpecs on July 27, 2013, 05:58:57 PM
This is coming along nicely!

I will see if I can eventually adapt this to the layout/images and color scheme that I am using on my test server.

Quote from: drfun on July 27, 2013, 03:48:16 PM
Thanks @ Joker you kept to your word, i have install the like and it is working very well now. Remain blessed for your effort.
Is it possible for quest to view the like button but cant like/unlike and if they click on the like button it prompt them to register or redirect them to the login page?
Yup, but I'm not sure how many forum admins would like this feature. If more people ask for this, then I can include this in the mod.
Thanks for the appreciation guys :).


Quote from: Tikkuy on July 28, 2013, 12:01:28 AM
Quote from: komp on July 22, 2013, 04:51:00 AM
Quote from: drfun on July 19, 2013, 07:44:25 AM
I just install the mod to my live site www. allstudentforum.com now that is running on a vertex theme and i noted the following, though the installation went fine.

1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change
4. On the message index, the LIKE superimpose on the little sticky image

i notice it does not make any form of changes from what it was previously. Also on the mobile version of my site which also run on the Anaconda theme, it does not display any LIKE link at all.

NOTE: from my previous post
Quotewhen some one like a post it display (1 people liked this) or like(1 people liked this)

i was thinking if (1 people liked this) could be change to (1 person liked this)
This was tested on my system with the default smf theme

got exact same issue on all themes
shame not many "like" mods that will even install on the latest version of the forum software

Make that three. :'(
Is this also happening with version 1.1? Forum link? Test account?
Title: Re: Like Posts
Post by: barnaby jonez on July 29, 2013, 09:41:17 AM
Wow, I was just assuming you would do a simple count of likes on the profile, but the fact it shows the actual post is MUCH better.

Great job, Joker.

Is it possible to not allow Likes on the board view? I'd rather have the users like posts only inside the threads themselves.
Title: Re: Like Posts
Post by: Joker™ on July 29, 2013, 10:42:38 AM
Quote from: barnaby jonez on July 29, 2013, 09:41:17 AM
Wow, I was just assuming you would do a simple count of likes on the profile, but the fact it shows the actual post is MUCH better.

Great job, Joker.

Is it possible to not allow Likes on the board view? I'd rather have the users like posts only inside the threads themselves.
Thanks for the kind words :).

Sounds like a nice add-on. Lets add this (https://github.com/Joker-SMF/SMF-Likes/issues/6) in next version.
Title: Re: Like Posts
Post by: MechSpecs on July 29, 2013, 11:46:02 AM
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Title: Re: Like Posts
Post by: Joker™ on July 29, 2013, 12:09:36 PM
Quote from: MechSpecs on July 29, 2013, 11:46:02 AM
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ahh forgot to reply to that. Please provide me a test account also. Thanks in advance :).
Title: Re: Like Posts
Post by: Joker™ on July 29, 2013, 01:24:54 PM
Quote from: MechSpecs on July 29, 2013, 11:46:02 AM
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ok seen the UI of buttons and looks nice.

Well I have made certain UI changes with Like/Dislike buttons and still waiting to hear from you guys :P.

Major thing with this mod is that it makes usage of ajax to interact with server, so in terms of UI it need to show some sort of fadeIn/fadeOut sort of effect etc. Lol, using bit more of jQuery this time I have introduced slide + fade effect.

Still I'm all ears, and if you guys have suggestions please do post them :).
Title: Re: Like Posts
Post by: Biology Forums on July 29, 2013, 04:01:21 PM
This is quickly becoming SMF #1 modification, congrats Joker™.
Title: Re: Like Posts
Post by: Joker™ on July 30, 2013, 01:51:15 PM
Quote from: Liam_michael on July 29, 2013, 04:01:21 PM
This is quickly becoming SMF #1 modification, congrats Joker™.
Thanks a lot, this is one of the best comment I've received so far for my work on SMF :).
Title: Re: Like Posts
Post by: Hypnos76 on August 12, 2013, 04:08:49 PM
What file contains the color setting for the text in this part of the MOD.

Ex:
(http://i290.photobucket.com/albums/ll271/Soulfyr/forum06_zpsa81ba3df.jpg)

As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
Title: Re: Like Posts
Post by: Joker™ on August 13, 2013, 10:01:40 AM
Quote from: Hypnos76 on August 12, 2013, 04:08:49 PM
What file contains the color setting for the text in this part of the MOD.

Ex:
(http://i290.photobucket.com/albums/ll271/Soulfyr/forum06_zpsa81ba3df.jpg)

As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
themes/default/css/LikePosts.css
Title: Re: Like Posts
Post by: Hypnos76 on August 13, 2013, 02:55:34 PM
Quote from: Joker™ on August 13, 2013, 10:01:40 AM
Quote from: Hypnos76 on August 12, 2013, 04:08:49 PM
What file contains the color setting for the text in this part of the MOD.

Ex:
(http://i290.photobucket.com/albums/ll271/Soulfyr/forum06_zpsa81ba3df.jpg)

As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
themes/default/css/LikePosts.css

You will have to show me where in that file because I used Photoshop to try and find the color and it couldn't then I changed every color in he file to #fff000 (bright yellow) and that didn't work...

.like_posts_overlay {
    width: 100%;
    height: 100%;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(0,0,0,0.4);
    z-index: 101 !important;
}

.like_posts_member_info_box {
    position: relative;
    width: 50%;
    line-height: 15px;
    font-size: 13px;
    z-index: 102;
    -webkit-border-radius: 5px;
    -webkit-box-shadow: -1px 2px 12px rgba(0, 0, 0, 0.9);
    border: 2px solid #ECEDED;
    color: #fff;
    background: #e0eaf1;
    color: #4a6b82;
    margin: 100px auto 0;
}

.like_posts_member_info {
    padding: 5px 10px;
    border-top: 1px solid rgba(255,255,255,0.5);
    border-bottom: 1px solid rgba(255,255,255,0.5);
    overflow: hidden;
}

.like_posts_member_info img.avatar{
    width: 30px;
    box-shadow: 1px 1px 5px #000;
    float: left;
    position: relative;
}

.like_posts_member_info .like_posts_member_info_details {
    float: left;
    position: relative;
    padding-left: 10px;
}

.like_post_box {
    line-height: 22px;
    position: relative;
}

.like_unlike_link {
    background: #122a33;
    padding: 1px 5px;
    color: #9fc7db !important;
    position: relative;
border: 1px solid #1ffcf6;
}

.subject_details {
    background-color: #e7eaef;
    color: #000;
    display: none;
    position: absolute;
    padding: 10px;
    border: 1px solid #C9C9C9;
    border-radius: 5px;
}

.display_none {
    display: none;
}

/*for firefox*/
.display_inline {
    display: inline !important;
}
Title: Re: Like Posts
Post by: Joker™ on August 14, 2013, 09:28:28 AM
Quote from: Hypnos76 on August 12, 2013, 04:08:49 PM
What file contains the color setting for the text in this part of the MOD.

Ex:
(http://i290.photobucket.com/albums/ll271/Soulfyr/forum06_zpsa81ba3df.jpg)

As you can see it's way to dark on my forum and I can't seem to find what css file it is in to change the Text color.
Lol the colors are so dark that I can't figure that for which part you want to change colors. Can you take a screen shot on default theme and point out the region of which you want to change the color.
Title: Re: Like Posts
Post by: Hypnos76 on August 17, 2013, 01:37:16 PM
Here you go:

(http://i290.photobucket.com/albums/ll271/Soulfyr/forum08_zps9c3b9d36.jpg)

Trying to change the color of "No. of Likes"
Title: Re: Like Posts
Post by: lois_tc on August 19, 2013, 11:31:54 AM
Excellent mod, Joker™, how put No. of Likes in display post users, for example
(http://img708.imageshack.us/img708/2586/0dtb.jpg)
Title: Re: Like Posts
Post by: Exsharaen on August 20, 2013, 03:16:39 AM
Hi Joker,

I have the same issue as drfun:
Quote from: drfun on July 19, 2013, 07:44:25 AM
1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change

This was tested on my system with the default smf theme

I decided to look at Chrome's console and discovered this:
(http://img543.imageshack.us/img543/3603/4bab.png) (http://imageshack.us/photo/my-images/543/4bab.png/)
(whoops sorry for that Steam popup :D)

I'm not really familiar with JavaScript, but a quick search reveals that it is a use of jQuery. I checked my head section and did not discover any external script link to jQuery (and I didn't remember I used one). Does this mod use jQuery?

As a temporary remedy while waiting for your answer, I tried to manually edit my Load.php by changing your code from this:
if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';
    }

into this:
if (isset($_GET['board']) || isset($_GET['topic']) || (isset($_GET['area']) && $_GET['area'] == 'likeposts')) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';
$context['html_headers'] .= '<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>'; // maybe this one can be omitted?
    }

and LikePosts.php from this:
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"><\/script>");
}

into this:
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.10.2.min.js\"><\/script>");
}

and now it works like a charm.

Except that somehow my likes on message lists are reset on page refreshes, although my profile still keep tracks of it. Still don't know why this happens and how to fix it.

Thank you anyway for this mod, I like it!

EDIT:
Silly me, I missed your statement here:
Quote from: Joker™ on July 29, 2013, 01:24:54 PM
Quote from: MechSpecs on July 29, 2013, 11:46:02 AM
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ok seen the UI of buttons and looks nice.

Well I have made certain UI changes with Like/Dislike buttons and still waiting to hear from you guys :P.

Major thing with this mod is that it makes usage of ajax to interact with server, so in terms of UI it need to show some sort of fadeIn/fadeOut sort of effect etc. Lol, using bit more of jQuery this time I have introduced slide + fade effect.

Still I'm all ears, and if you guys have suggestions please do post them :).

Guess this is what I get when skipping breakfast :D

I'm on SMF 2.0.5 by the way.
Title: Re: Like Posts
Post by: Joker™ on August 20, 2013, 09:24:14 AM
Quote from: Hypnos76 on August 17, 2013, 01:37:16 PM
Here you go:

(http://i290.photobucket.com/albums/ll271/Soulfyr/forum08_zps9c3b9d36.jpg)

Trying to change the color of "No. of Likes"
Ohh that text color comes from index.css of:

- Either the theme you are using, or
- Default theme

You need to make change in this css class ".titlebg, .titlebg2, tr.titlebg th, tr.titlebg td, tr.titlebg2 td"

Moreover you can use chrome developer tool to see the exact class and make changes accordingly.


Quote from: lois_tc on August 19, 2013, 11:31:54 AM
Excellent mod, Joker™, how put No. of Likes in display post users, for example
(http://img708.imageshack.us/img708/2586/0dtb.jpg)

Nice nice. For that we need a sql query and I see that as a nice feature for next release.
Title: Re: Like Posts
Post by: Joker™ on August 20, 2013, 09:27:45 AM
Quote from: Exsharaen on August 20, 2013, 03:16:39 AM
Hi Joker,

I have the same issue as drfun:
Quote from: drfun on July 19, 2013, 07:44:25 AM
1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change

This was tested on my system with the default smf theme

I decided to look at Chrome's console and discovered this:
(http://img543.imageshack.us/img543/3603/4bab.png) (http://imageshack.us/photo/my-images/543/4bab.png/)
(whoops sorry for that Steam popup :D)

I'm not really familiar with JavaScript, but a quick search reveals that it is a use of jQuery. I checked my head section and did not discover any external script link to jQuery (and I didn't remember I used one). Does this mod use jQuery?

As a temporary remedy while waiting for your answer, I tried to manually edit my Load.php by changing your code from this:
if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';
    }

into this:
if (isset($_GET['board']) || isset($_GET['topic']) || (isset($_GET['area']) && $_GET['area'] == 'likeposts')) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';
$context['html_headers'] .= '<script src="http://code.jquery.com/jquery-1.10.2.min.js"></script>'; // maybe this one can be omitted?
    }

and LikePosts.php from this:
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"><\/script>");
}

into this:
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"http://code.jquery.com/jquery-1.10.2.min.js\"><\/script>");
}

and now it works like a charm.

Except that somehow my likes on message lists are reset on page refreshes, although my profile still keep tracks of it. Still don't know why this happens and how to fix it.

Thank you anyway for this mod, I like it!

EDIT:
Silly me, I missed your statement here:
Quote from: Joker™ on July 29, 2013, 01:24:54 PM
Quote from: MechSpecs on July 29, 2013, 11:46:02 AM
I played with this on my sandbox and have a couple of suggestions; shot you a PM
Ok seen the UI of buttons and looks nice.

Well I have made certain UI changes with Like/Dislike buttons and still waiting to hear from you guys :P.

Major thing with this mod is that it makes usage of ajax to interact with server, so in terms of UI it need to show some sort of fadeIn/fadeOut sort of effect etc. Lol, using bit more of jQuery this time I have introduced slide + fade effect.

Still I'm all ears, and if you guys have suggestions please do post them :).

Guess this is what I get when skipping breakfast :D

I'm on SMF 2.0.5 by the way.
It seems like some other mod is also loading jQuery due to which something something is happening :P. Lol, in simple words jQuery is fighting against each other. I've fixed this in one of  my mods, I'll be porting the fix over here as well.

/me claps for Exsharaen, for providing such an excellent screenshot of issue.
Title: Re: Like Posts
Post by: ScrumpyJack on August 20, 2013, 12:45:41 PM
Hi Joker!

I also really like this mod...although for some reason it is only working with the default theme of my message board.

On alternative themes, you can see the like button but it doesn't do anything.

I uninstalled and reinstalled it, making sure that all of the themes were included (all were confirmed as successful) but this still didn't work.

Do you have any idea what might be causing this please?

Thanks

Lee
:)
Title: Re: Like Posts
Post by: Joker™ on August 21, 2013, 10:27:39 AM
Quote from: ScrumpyJack on August 20, 2013, 12:45:41 PM
Hi Joker!

I also really like this mod...although for some reason it is only working with the default theme of my message board.

On alternative themes, you can see the like button but it doesn't do anything.

I uninstalled and reinstalled it, making sure that all of the themes were included (all were confirmed as successful) but this still didn't work.

Do you have any idea what might be causing this please?

Thanks

Lee
:)
Umm can you tell me the theme names, as I will be able to debug the issue more easily.
Title: Re: Like Posts
Post by: ScrumpyJack on August 21, 2013, 01:27:44 PM
I have also noticed another weird problem........

If I click on a thread to like it....it recognises that I have liked it as you would expect.

When I have refreshed the page in the Board view....I can still Like it again (Unlike isn't showing).

If I actually go into the post view, It shows that I already like the post.

Themes where I have found that it either does nothing, or returns me to the top of the page

Firox Multicolor
Astonished
Bluez
X-Mas
Happy New Year
Blu
Carbonate
Coalblack
CleanTek

Thanks

Lee
:)
Title: Re: Like Posts
Post by: Joker™ on August 22, 2013, 10:56:37 AM
Quote from: ScrumpyJack on August 21, 2013, 01:27:44 PM
I have also noticed another weird problem........

If I click on a thread to like it....it recognises that I have liked it as you would expect.

When I have refreshed the page in the Board view....I can still Like it again (Unlike isn't showing).

If I actually go into the post view, It shows that I already like the post.

Themes where I have found that it either does nothing, or returns me to the top of the page

Firox Multicolor
Astonished
Bluez
X-Mas
Happy New Year
Blu
Carbonate
Coalblack
CleanTek

Thanks

Lee
:)
Thanks for the themes, but with these themes I'm not able to reproduce both of the issues mentioned above

-  Clicking like page goes to top, and
- Like/unlike not toggle on board view

I'll try my best to reproduce the issue :).
Title: Re: Like Posts
Post by: pevanis on August 23, 2013, 02:02:20 PM
Hi Joker!
Thanks for good ideea :-)

I also really like this mod...although for some reason it is not working you can see the like button but it doesn't do anything.

I uninstalled and reinstalled it, but this still didn't work.
same as drfun.
1. When i click on LIKE, it takes me to the top page, without any change
2. within the post message, if i click LIKE, it takes me to the top page,without any change also
3. On replied post, when i click LIKE, it takes me to the top page, without any change

Theme on my forum is Blackjack ( http://custom.simplemachines.org/themes/index.php?lemma=2360 )


Title: Re: Like Posts
Post by: Joker™ on August 25, 2013, 03:39:33 AM
Just before pushing out a new version with changes, anyone want to try them out?

This fix is only for the users who are facing an issue while liking/unliking a post, i.e page just scrolls to top.

Well I was able to replicate the issue by turning of the internet or removing jQuery object from dom.

Note - these changes can break something else in terms of funcnality, so please make backup of files before changing anything


1. To make sure jQuery is loaded at any cost

Code (Find:Source/LikePosts.php) Select

function LP_includeAssets() {
global $settings, $context;

$context['insert_after_template'] .= '
<script type="text/javascript"><!-- // --><![CDATA[
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"><\/script>");
}
if (!window.lpObj) {
document.write(\'<script src="' . $settings['default_theme_url'] . '/scripts/LikePosts.js"><\/script>\');
}
// ]]></script>';
}


Code (Replace it with:) Select

function LP_includeAssets() {
global $settings, $context;

$context['insert_after_template'] .= '
<script type="text/javascript"><!-- // --><![CDATA[
if (!window.jQuery) {
document.write("<script type=\"text/javascript\" src=\"https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js\"><\/script>");
}

var lpLoaded = !window.lpObj ? false : true;
function isJqueryLoaded() {
if (window.jQuery) {
if (!lpLoaded) {
lpLoaded = true;
var head= document.getElementsByTagName("head")[0];
var script= document.createElement("script");
script.type= "text/javascript";
document.write("<script type=\"text/javascript\" src=\"'. $settings['default_theme_url']. '/scripts/LikePosts.js\"><\/script>");
}
} else {
setTimeout(isJqueryLoaded, 100);
}
}
isJqueryLoaded();
// ]]></script>';
}


With the above code you need to replace LikePosts.js with the attached file.

Location -> themes/default/Scripts/LikePosts.js
Title: Re: Like Posts
Post by: Burke ♞ Knight on August 25, 2013, 09:21:08 AM
Noticed typo that causes errors in Load.php file:

if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_header'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['theme_url']. '/css/likeposts.css" />';


Needs to be:

if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['theme_url']. '/css/likeposts.css" />';


Missing s in html_headers

:)
Title: Re: Like Posts
Post by: Joker™ on August 26, 2013, 11:55:17 AM
Quote from: BurkeKnight on August 25, 2013, 09:21:08 AM
Noticed typo that causes errors in Load.php file:

if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_header'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['theme_url']. '/css/likeposts.css" />';


Needs to be:

if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['theme_url']. '/css/likeposts.css" />';


Missing s in html_headers

:)
Thanks for pointing that out :), but thats already fixed in
- Latest version 1.1 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=222619;smf_version=2.0.4)
- Also on gitHub (https://github.com/Joker-SMF/SMF-Likes/commit/15a8299bab91fee59855ff950d8b8dd22dd60aaf)
Title: Re: Like Posts
Post by: impreza on August 27, 2013, 08:47:05 AM
And if it get connected with karma in some way. It would be even better
Title: Re: Like Posts
Post by: Joker™ on August 27, 2013, 10:03:45 AM
Quote from: impreza on August 27, 2013, 08:47:05 AM
And if it get connected with karma in some way. It would be even better
Umm not sure about that at this point, but who knows what can happen with the mods :P.
Title: Re: Like Posts
Post by: Motorhed on September 02, 2013, 01:56:40 AM
Would love if the Like Button was moved up to float left of the "Report to moderator" and "IP Logged" area beneath the post. That way it doesn't create its own otherwise blank line.

Unfortunately, it still doesn't work for me even with the new .js file.

I look forward to someday being able to use it, however.

Line:56
Char:9
Code:0
Error:Expected identifier, string or number
URL:http://tangledwebbing.com/forum/Themes/default/scripts/LikePosts.js
Title: Re: Like Posts
Post by: Joker™ on September 02, 2013, 11:37:29 AM
Quote from: Motorhed on September 02, 2013, 01:56:40 AM
Would love if the Like Button was moved up to float left of the "Report to moderator" and "IP Logged" area beneath the post. That way it doesn't create its own otherwise blank line.

Unfortunately, it still doesn't work for me even with the new .js file.

I look forward to someday being able to use it, however.

Line:56
Char:9
Code:0
Error:Expected identifier, string or number
URL:http://tangledwebbing.com/forum/Themes/default/scripts/LikePosts.js

At last someone showed the courage to try it out. Thanks a lot man.

Try the new attached file. Above file had a small JS error which fails in strict mode of JS.
Title: Re: Like Posts
Post by: Motorhed on September 02, 2013, 06:16:03 PM
Yeah. I'm pretty awesome.

It's working now! This is one of so many Mods you'd expect to already BE there, but no. Thanks for taking the initiative.


Also, I just let the domain name "LoveThatJoker.com" expire. A line from the 80s Bat-Film. Coincidence!
Title: Re: Like Posts
Post by: Motorhed on September 02, 2013, 08:11:34 PM
Sorry, I was mistaken. Still not recording Likes.

Line:122
Char:9
Code:0
Error:Expected identifier, string or number
URL:http://tangledwebbing.com/forum/Themes/default/scripts/LikePosts.js
Title: Re: Like Posts
Post by: Joker™ on September 03, 2013, 11:34:54 AM
Quote from: Motorhed on September 02, 2013, 08:11:34 PM
Sorry, I was mistaken. Still not recording Likes.

Line:122
Char:9
Code:0
Error:Expected identifier, string or number
URL:http://tangledwebbing.com/forum/Themes/default/scripts/LikePosts.js

Fixed. Hope this one works.
Title: Re: Like Posts
Post by: mrbig on September 03, 2013, 01:03:26 PM
Thank you - I actually used the previous .js file you posted yesterday and it works great on my forum
Title: Re: Like Posts
Post by: Motorhed on September 03, 2013, 02:57:29 PM
"Liking" works!

Clicking "You Liked This" doesn't yet. :D Getting there.

Line:131
Char:21
Code:0
Error:'avatar.href' is null or not an object
URL:http://tangledwebbing.com/forum/Themes/default/scripts/LikePosts.js
Title: Re: Like Posts
Post by: mrbig on September 04, 2013, 09:19:05 AM
As far as I can see all the functions are working on my forum
When clicking "You liked this" or "x people liked this" it shows the names and avatars in a pop=up

I use a very slightly modified version of the Default template
Title: Re: Like Posts
Post by: Joker™ on September 04, 2013, 12:02:33 PM
Quote from: Motorhed on September 03, 2013, 02:57:29 PM
"Liking" works!

Clicking "You Liked This" doesn't yet. :D Getting there.

Line:131
Char:21
Code:0
Error:'avatar.href' is null or not an object
URL:http://tangledwebbing.com/forum/Themes/default/scripts/LikePosts.js

Alrighty then. Joker installed something outstanding in his editor which is helping him to write JS in strict mode, and removal or errors has became easier then everzzz :P.


Quote from: mrbig on September 04, 2013, 09:19:05 AM
As far as I can see all the functions are working on my forum
When clicking "You liked this" or "x people liked this" it shows the names and avatars in a pop=up

I use a very slightly modified version of the Default template
Well its an error in load of jQuery and conflict b/w different jQuery versions.

Well I've fixed the JS on gitHub completely.
Title: Re: Like Posts
Post by: zarachrome on September 04, 2013, 06:27:56 PM
Hi Joker;

Nice and excellent mod.
But I have a problem: I tried to translate it into spanish, thinking on give you the translated strings, but for an unknown reason, when I like in posts index, it shows only (), and for one second the button turns into "Unlike", but then it turns again into "Like".
Maybe it is a problem with spanish accents?

Thank you.
Title: Re: Like Posts
Post by: Motorhed on September 04, 2013, 07:16:28 PM
Since I'm here (checking in on this, etc.) I'd might as well toss out the common request people have made on Facebook and innumberable sites over the years.

A "Dislike" to go with "Like". XD

[Like] [Dislike]

Which would then just turn to...

[Unlike] or [Undislike] depending on which you clicked.


And for people who don't like negative stuff at all, an Admin option to turn in Like, and turn on Dislike seperately.

:P
Title: Re: Like Posts
Post by: Joker™ on September 07, 2013, 10:16:26 AM
Quote from: zarachrome on September 04, 2013, 06:27:56 PM
Hi Joker;

Nice and excellent mod.
But I have a problem: I tried to translate it into spanish, thinking on give you the translated strings, but for an unknown reason, when I like in posts index, it shows only (), and for one second the button turns into "Unlike", but then it turns again into "Like".
Maybe it is a problem with spanish accents?

Thank you.

Maybe, its something to do with text strings.


Quote from: Motorhed on September 04, 2013, 07:16:28 PM
Since I'm here (checking in on this, etc.) I'd might as well toss out the common request people have made on Facebook and innumberable sites over the years.

A "Dislike" to go with "Like". XD

[Like] [Dislike]

Which would then just turn to...

[Unlike] or [Undislike] depending on which you clicked.


And for people who don't like negative stuff at all, an Admin option to turn in Like, and turn on Dislike seperately.

:P
Well I personally never liked the dislike system, as with dislike one creates a wave of negative energy within the members. Lets says I wrote a nice post about PHP and someone disliked it, for sure I'm going to feed bad and it'll create a gap between me and the member who disliked it. I hope I was able to clear my personal point of view on "dislike".
Title: Re: Like Posts
Post by: Motorhed on September 07, 2013, 07:02:50 PM
*clicks [Dislike]*


XD
Title: Re: Like Posts
Post by: Joker™ on September 08, 2013, 09:41:58 AM
lol, hahahahah
Title: Re: Like Posts
Post by: ScrumpyJack on September 09, 2013, 06:24:57 AM
Hi Joker!

For some reason, the Like Post function works on individual posts...but not on the Topic display screen (nothing seems to happen).

Is there a way to stop it appearing on the topic view so that it's only visible within the actual posts?

Thanks in advance for any help you might be able to give.
Title: Re: Like Posts
Post by: ScrumpyJack on September 09, 2013, 06:36:48 AM
Actually, I've just checked in Internet Explorer which is the standard browser used across our company and the Like Posts mod doesn't seem to be working at all.

Liking a post does work in Google Chrome though.

Title: Re: Like Posts
Post by: mrbig on September 09, 2013, 11:39:32 AM
Must be a template issues
I've tested in Chrome and IE and it works in both topics and posts.
Title: Re: Like Posts
Post by: Joker™ on September 10, 2013, 01:17:27 PM
Ahhh IE. ScrumpyJack, please don't feel offended, but I never try my code on IE, as why should I put double effort just to support a browser which is still doing everything it can to make dev's life hell :P.

Also is anyone aware about how to install IE on mac :-X?
Title: Re: Like Posts
Post by: Motorhed on September 12, 2013, 09:26:28 PM
I run IE 8 out of necessity due to my set-up, and I don't have the issue. Just pitching in incase it's some other issue.
Title: Re: Like Posts
Post by: iknowyou on September 14, 2013, 06:34:08 AM
Hi there I've translated the LikePosts.english.php into traditional chinese but the mod would stop working. Like what happens is the Like button would be in Chinese but when I pressed it nothing happens apart from adding "()" next to the like button. When I refresh the page the "()" is gone but it shows that I havent liked it.

help ><
Title: Re: Like Posts
Post by: Joker™ on September 14, 2013, 09:06:49 AM
Quote from: iknowyou on September 14, 2013, 06:34:08 AM
Hi there I've translated the LikePosts.english.php into traditional chinese but the mod would stop working. Like what happens is the Like button would be in Chinese but when I pressed it nothing happens apart from adding "()" next to the like button. When I refresh the page the "()" is gone but it shows that I havent liked it.

help ><
The text strings are generated in PHP files and sent over to JS file via ajax response. Maybe the Chinese chars are not getting parsed properly in ajax response. Also right now the mod is not coded to support different translations.

If you guys want the mod to support different translation, please provide me few strings, so that I can optimise the mod accordingly.
Title: Re: Like Posts
Post by: iknowyou on September 14, 2013, 04:56:17 PM
Ok. So far translating everything except the strings on the button itself would still make the mod functional. The txt string for like in traditional Chinese is 讚 and unlike is 收回讚.

Oh and sorry about the double posting, I missed seeing the guy with the same problem as me except in Spanish.

Cheers.
Title: Re: Like Posts
Post by: Joker™ on September 17, 2013, 10:01:04 AM
Quote from: iknowyou on September 14, 2013, 04:56:17 PM
Ok. So far translating everything except the strings on the button itself would still make the mod functional. The txt string for like in traditional Chinese is 讚 and unlike is 收回讚.

Oh and sorry about the double posting, I missed seeing the guy with the same problem as me except in Spanish.

Cheers.
Actually I went back to debugging mode in javascript file of the mod and it seems mods seeks for a specific word while liking unlinking a post. I'm planning to roll out a new version consisting of bug fixes for now. I hope your issue will be resolved with it.
Title: Re: Like Posts
Post by: Joker™ on September 17, 2013, 10:41:06 AM
Update with version 1.1.1, please try the new version.

Also the users having issue with jQuery loading, please update the mod to latest version.
Title: Re: Like Posts
Post by: iknowyou on September 18, 2013, 02:38:48 AM
Quote from: Joker™ on September 17, 2013, 10:41:06 AM
Update with version 1.1.1, please try the new version.

Also the users having issue with jQuery loading, please update the mod to latest version.

Hiya

So I uninstalled the old version, uploaded and installed the new one. What happens now is that if I unlike a post its fine but if I try to like a post it still shows the animation (but without changing from "like" to "unlike") and stuff but i just can't like it no matter how many times I press it. Or do I need to remove the like post mod database too?

Cheers
Title: Re: Like Posts
Post by: Joker™ on September 18, 2013, 10:27:53 AM
Quote from: iknowyou on September 18, 2013, 02:38:48 AM
Quote from: Joker™ on September 17, 2013, 10:41:06 AM
Update with version 1.1.1, please try the new version.

Also the users having issue with jQuery loading, please update the mod to latest version.

Hiya

So I uninstalled the old version, uploaded and installed the new one. What happens now is that if I unlike a post its fine but if I try to like a post it still shows the animation (but without changing from "like" to "unlike") and stuff but i just can't like it no matter how many times I press it. Or do I need to remove the like post mod database too?

Cheers
Try to see if there are any javascript errors reported in the developer console of Chrome.
Title: Re: Like Posts
Post by: iknowyou on September 19, 2013, 02:23:09 AM
Chrome's javascript console didnt report an error. I tried using english for the like link and traditional chinese for the unlike link and that worked both ways. Just doesn't work if the like link is in traditional chinese.

cheers
Title: Re: Like Posts
Post by: Joker™ on September 19, 2013, 10:03:46 AM
Quote from: iknowyou on September 19, 2013, 02:23:09 AM
Chrome's javascript console didnt report an error. I tried using english for the like link and traditional chinese for the unlike link and that worked both ways. Just doesn't work if the like link is in traditional chinese.

cheers
Can you provide me the chinese translation file you are using.
Title: Re: Like Posts
Post by: iknowyou on September 19, 2013, 06:22:51 PM
Quote from: Joker™ on September 19, 2013, 10:03:46 AM
Quote from: iknowyou on September 19, 2013, 02:23:09 AM
Chrome's javascript console didnt report an error. I tried using english for the like link and traditional chinese for the unlike link and that worked both ways. Just doesn't work if the like link is in traditional chinese.

cheers
Can you provide me the chinese translation file you are using.

Here it is. Thanks a bunch.
Title: Re: Like Posts
Post by: Joker™ on September 22, 2013, 12:27:57 PM
Quote from: iknowyou on September 19, 2013, 06:22:51 PM
Quote from: Joker™ on September 19, 2013, 10:03:46 AM
Quote from: iknowyou on September 19, 2013, 02:23:09 AM
Chrome's javascript console didnt report an error. I tried using english for the like link and traditional chinese for the unlike link and that worked both ways. Just doesn't work if the like link is in traditional chinese.

cheers
Can you provide me the chinese translation file you are using.

Here it is. Thanks a bunch.
Thanks a lot for the file. Right now I'm implementing changes to show total likes of a user in posts. I'll be able to complete it in a day or two. After that I'll my best to push the fix for your issue.
Title: Re: Like Posts
Post by: Joker™ on September 23, 2013, 12:45:22 PM
I've personally never liked how SMF refreshes pages while doing maintenance task in admin panel. A glimpse of admin maintenance for Like Posts mod :P.
Title: Re: Like Posts
Post by: Arantor on September 23, 2013, 12:48:55 PM
So you have a ton of JavaScript just for the benefit of pinging the server regularly to push through updates?
Title: Re: Like Posts
Post by: Joker™ on September 23, 2013, 12:54:10 PM
Quote from: Arantor on September 23, 2013, 12:48:55 PM
So you have a ton of JavaScript just for the benefit of pinging the server regularly to push through updates?
Lol who said anything about pushing updates to server? I think I haven't even described the functionality completely yet :).

That's just a progress bar to show how much server maintenance task for 'Like Posts Count' has been completed. SMF does that by refreshing page, sending params in url(or in outer space), perform calculations on it and shows it after page refresh. I did it with Javascript. Does this make server die?
Title: Re: Like Posts
Post by: Arantor on September 23, 2013, 01:00:26 PM
I think you grossly misunderstand the point of doing it the way SMF does it.

Servers are limited by how much can run in a single page load. That's why SMF pushes through several page loads, to make sure it never falls foul of that time limit per page load. If there's a serious maintenance job that would take more than about 15 seconds to run, it should definitely be split across page loads.

Having a single page that makes requests to the server to do it piecemeal is fine, but just running it in a single page load is going to be a serious problem whatever happens. I get the impression you're not doing it piecemeal.
Title: Re: Like Posts
Post by: Joker™ on September 23, 2013, 01:19:37 PM
Quote from: Arantor on September 23, 2013, 01:00:26 PM
I think you grossly misunderstand the point of doing it the way SMF does it.

Servers are limited by how much can run in a single page load. That's why SMF pushes through several page loads, to make sure it never falls foul of that time limit per page load. If there's a serious maintenance job that would take more than about 15 seconds to run, it should definitely be split across page loads.

Having a single page that makes requests to the server to do it piecemeal is fine, but just running it in a single page load is going to be a serious problem whatever happens. I get the impression you're not doing it piecemeal.
Well I'm working very closely with server team, implementing API's on various types of servers and DB's like
- RoR
- Tomcat/java
- MySQL/PHP

and personally, if
- the task is broken into pieces
- adequate execution time is given to task
- and next call is done with some gap

Server is happy as us.

I've personally designed and created a complete sync functionality which sync's data from one device to another using server(tomcat) as medium, and TBH it makes a very extensive usage of server. Even in that case server held up nice. Not to forget workforce of 1000 employees were using the app and server was a company wide server. Above all that the app is live from past 6 months, and we haven't received a single complaint either from users or server team.

Another app registers every single move a user makes on device and sends it to server, just think of data volume for that.

Basically it all goes to how efficient your thread are.

Best examples are og gmail and facebook which makes usage of long poling to check for notification/chats.

You can view the code pushed for the functionality over here (https://github.com/Joker-SMF/SMF-Likes/commits/master). Please point out any errors you see :).

- Jokerzzz
Title: Re: Like Posts
Post by: Arantor on September 23, 2013, 01:36:49 PM
No, it really doesn't go to 'how efficient your thread are', that's nonsense. Maintenance tasks, by definition, are heavyweight and often longer running processes so they must be broken up. And you can't just multithread that stuff, either. An understanding of what will be blocking behaviour vs not blocking is quite important in this sort of situation.

Also, what the hell has long polling got to do with it? You cannot meaningfully generate long polling on a PHP environment, you will quickly max out Apache/PHP's connection limit. It's a bit different on nginx and PHP-FPM where you can let nginx handle the connection but PHP is just not designed to work with sitting idle for long periods of time.


I see your code is breaking the task up. I see also that it's using $_REQUEST['endLimit'] without any sanitisation (and you're only protected because SMF itself will block an injection)

It's also using json_encode which is a PHP 5.2+ only function (there are a surprising number of people still not using 5.2+ and of those that are, json_encode is not necessarily enabled). as opposed to, say something like:

echo '{totalWork:', (int) $startLimit, ', endLimit:', (int) $endLimit, '}';

I also have no idea why you're duplicating the admin panel code, template_lp_admin_general_settings doesn't do anything that template_show_settings wouldn't except show the tabs but if properly set up, the generic menu template should be doing that for you in the first place.

Interesting also that you nuke the entire count of likes before beginning, you could save a lot of queries by not doing that, instead taking the query you already have, combine that with a query for getting the number of likes a user already has and comparing the two. If there are differences, push those to updates, if new rows are needed, do them all at once in a single insert statement, and if the new number is zero you can clear the row while you're at it (single DELETE query)

Right now with your default of 100 per page, you're guaranteeing to run 1 query for the first run, followed by 101 queries every single run through up until the last one. For most forums, the counts aren't going to significantly change for a significant number of members every time, and you might as well do a little more work to try to avoid unnecessary queries - which is more efficient in your thread.
Title: Re: Like Posts
Post by: Joker™ on September 23, 2013, 02:04:33 PM
Quote from: Arantor on September 23, 2013, 01:36:49 PM
No, it really doesn't go to 'how efficient your thread are', that's nonsense.
Please keep it social. If once hasn't done anything persoanlly, it just doesn't mean it can't be done.


Quote from: Arantor on September 23, 2013, 01:36:49 PM
Maintenance tasks, by definition, are heavyweight and often longer running processes so they must be broken up. And you can't just multithread that stuff, either. An understanding of what will be blocking behaviour vs not blocking is quite important in this sort of situation.
Doesn't this depend on what sort of maintenance you are doing? By what you are saying it sounds like
Recounting total posts === Emptying logs tables


Quote from: Arantor on September 23, 2013, 01:36:49 PM
Also, what the hell has long polling got to do with it? You cannot meaningfully generate long polling on a PHP environment, you will quickly max out Apache/PHP's connection limit. It's a bit different on nginx and PHP-FPM where you can let nginx handle the connection but PHP is just not designed to work with sitting idle for long periods of time.
Really?? Well then I read a lot of articles on web and there is a nice topic on stackoverflow also. I think every one must be wrong.


Quote from: Arantor on September 23, 2013, 01:36:49 PM
I see your code is breaking the task up. I see also that it's using $_REQUEST['endLimit'] without any sanitisation (and you're only protected because SMF itself will block an injection)
Yeah, I know I've to palce a lot of validations yet.

Quote from: Arantor on September 23, 2013, 01:36:49 PM
It's also using json_encode which is a PHP 5.2+ only function (there are a surprising number of people still not using 5.2+ and of those that are, json_encode is not necessarily enabled). as opposed to, say something like:

echo '{totalWork:', (int) $startLimit, ', endLimit:', (int) $endLimit, '}';
Well, this has been in use since the first release of the mod, as the mod has various other sections which get data in json format.



Quote from: Arantor on September 23, 2013, 01:36:49 PM
I also have no idea why you're duplicating the admin panel code, template_lp_admin_general_settings doesn't do anything that template_show_settings wouldn't except show the tabs but if properly set up, the generic menu template should be doing that for you in the first place.
Lol, I love to add things in templates anything, so its better to keep them separate.


Quote from: Arantor on September 23, 2013, 01:36:49 PM
Interesting also that you nuke the entire count of likes before beginning, you could save a lot of queries by not doing that, instead taking the query you already have, combine that with a query for getting the number of likes a user already has and comparing the two. If there are differences, push those to updates, if new rows are needed, do them all at once in a single insert statement, and if the new number is zero you can clear the row while you're at it (single DELETE query)
Ummm, right now we are calculating the number of likes of a user only. Not sure about the query comparison you said above. Also are you saying, get total likes of user(with current query set) and match it with total likes of user in table? Well if that's the case then it sounds more resource consuming process to me.


Quote from: Arantor on September 23, 2013, 01:36:49 PM
Right now with your default of 100 per page, you're guaranteeing to run 1 query for the first run, followed by 101 queries every single run through up until the last one. For most forums, the counts aren't going to significantly change for a significant number of members every time, and you might as well do a little more work to try to avoid unnecessary queries - which is more efficient in your thread.
Not sure why 101 queries afterwards, as total query count is calculated once and won't be calculated again.
Title: Re: Like Posts
Post by: Arantor on September 23, 2013, 02:34:35 PM
QuotePlease keep it social. If once hasn't done anything persoanlly, it just doesn't mean it can't be done.

How is that relevant? I never brought in my experience or made this personal. If you like I can indeed do that. Just because I may not personally have done something doesn't mean I can't assess how someone else has done it.

My point is that it doesn't matter 'how efficient' a thread is, unless you take into consideration everything around it.

QuoteDoesn't this depend on what sort of maintenance you are doing? By what you are saying it sounds like
Recounting total posts === Emptying logs tables

Depending on the operation in question it might actually be that bad. SQLite for example would require a major file rewrite to achieve that (because one file contains the entire database)

But I'm sure you already knew that, right?

QuoteReally?? Well then I read a lot of articles on web and there is a nice topic on stackoverflow also. I think every one must be wrong.

Long polling is doable in PHP but that doesn't make it a good idea. Long polling by definition means holding the connection open until the server pushes a response. The way Apache/PHP works is that the connection will be open, with the PHP instance created, which means 8-10MB of memory consumed, while the process remains in idle. Then every new long poll works in the same way, holding the connection open, which means one of two things will happen: either the MaxChilds directive will exhaust or the server will run out of memory holding all the connections open.

Switching to PHP-FPM alleviates this to a point by having a pool of PHP instances, but then you're still needing to deal with the connections themselves. nginx will let you handle that but it gets ugly.

Oh, and I guess you already also are a Zend Certified Engineer and thus know PHP inside out?

QuoteWell, this has been in use since the first release of the mod, as the mod has various other sections which get data in json format.

And no complaints about a lack of json_encode? Surprising. Heck, even WordPress has to push a patch out for a lack of json_encode in servers.

QuoteUmmm, right now we are calculating the number of likes of a user only. Not sure about the query comparison you said above. Also are you saying, get total likes of user(with current query set) and match it with total likes of user in table? Well if that's the case then it sounds more resource consuming process to me.

Yes, that's what I'm saying. Get the total likes of the users, match against the current users' counts. It's actually cheaper to do that than to mindlessly update everything every time.

You see, by destroying the table, you force everything to be rebuilt/updated. As opposed to leaving the table alone and just updating the rows that are required.

In your current code - the first run will occur as follows:
Query 1 - truncate the table
Query 2 - get the count for this set of users
Query 3 to query 102 - update the counts for each of those users

The second run will be:
Query 1: get the counts for this set of users
Query 2 to 101 - update the counts for each of those users

(When doing anything this like, assume worst case scenario, which is the full set of 100 rows being returned from your getting query)

In fact... now that I look at it, you're actually rewriting rows over and over, as opposed to the quicker route of getting a set of users (step through the members table 100 members at a time), then getting the counts for those users both in terms of what's in the messages table (since you can make use of the owner index on the messages table) and what's in the like_count table, and doing the comparison - and here's the thing... in most cases the number shouldn't be changing on a regular basis between maintenance, so there's no need to keep updating rows - set the row once for per user for a maintenance run.

In other words, do it the same way the recount member posts stuff works because that does work (and that's processing much the same load)
Title: Re: Like Posts
Post by: Joker™ on September 24, 2013, 10:27:36 AM
Quote from: Arantor on September 23, 2013, 02:34:35 PM
Depending on the operation in question it might actually be that bad. SQLite for example would require a major file rewrite to achieve that (because one file contains the entire database)

But I'm sure you already knew that, right?
Yup.

Quote
And no complaints about a lack of json_encode? Surprising. Heck, even WordPress has to push a patch out for a lack of json_encode in servers.
Hmmm, point taken, will try to implement a fallback.

Quote
Yes, that's what I'm saying. Get the total likes of the users, match against the current users' counts. It's actually cheaper to do that than to mindlessly update everything every time.

You see, by destroying the table, you force everything to be rebuilt/updated. As opposed to leaving the table alone and just updating the rows that are required.

In your current code - the first run will occur as follows:
Query 1 - truncate the table
Query 2 - get the count for this set of users
Query 3 to query 102 - update the counts for each of those users

The second run will be:
Query 1: get the counts for this set of users
Query 2 to 101 - update the counts for each of those users

(When doing anything this like, assume worst case scenario, which is the full set of 100 rows being returned from your getting query)

In fact... now that I look at it, you're actually rewriting rows over and over, as opposed to the quicker route of getting a set of users (step through the members table 100 members at a time), then getting the counts for those users both in terms of what's in the messages table (since you can make use of the owner index on the messages table) and what's in the like_count table, and doing the comparison - and here's the thing... in most cases the number shouldn't be changing on a regular basis between maintenance, so there's no need to keep updating rows - set the row once for per user for a maintenance run.

In other words, do it the same way the recount member posts stuff works because that does work (and that's processing much the same load)
Point taken.
Title: Re: Like Posts
Post by: miguel on September 29, 2013, 11:50:06 AM
QuoteNice and excellent mod.
But I have a problem: I tried to translate it into spanish, thinking on give you the translated strings, but for an unknown reason, when I like in posts index, it shows only (), and for one second the button turns into "Unlike", but then it turns again into "Like".
Maybe it is a problem with spanish accents?

same problem in 1.1.1
Title: Re: Like Posts
Post by: Joker™ on September 29, 2013, 09:40:58 PM
Quote from: miguel on September 29, 2013, 11:50:06 AM
QuoteNice and excellent mod.
But I have a problem: I tried to translate it into spanish, thinking on give you the translated strings, but for an unknown reason, when I like in posts index, it shows only (), and for one second the button turns into "Unlike", but then it turns again into "Like".
Maybe it is a problem with spanish accents?

same problem in 1.1.1
Thanks for the info. Will take care of this :).
Title: Re: Like Posts
Post by: Joker™ on October 01, 2013, 11:53:13 AM
Quote from: miguel on September 29, 2013, 11:50:06 AM
QuoteNice and excellent mod.
But I have a problem: I tried to translate it into spanish, thinking on give you the translated strings, but for an unknown reason, when I like in posts index, it shows only (), and for one second the button turns into "Unlike", but then it turns again into "Like".
Maybe it is a problem with spanish accents?

same problem in 1.1.1
Try the new version 1.2 ;).
Title: Re: Like Posts
Post by: barnaby jonez on October 01, 2013, 12:14:01 PM
Did you ever add the option to disable showing Liking on the board index, Joker?
Title: Re: Like Posts
Post by: Joker™ on October 01, 2013, 12:52:41 PM
Quote from: barnaby jonez on October 01, 2013, 12:14:01 PM
Did you ever add the option to disable showing Liking on the board index, Joker?
Yup, it already there :).
Title: Re: Like Posts
Post by: miguel on October 01, 2013, 01:16:30 PM
Quote from: Joker™ on October 01, 2013, 11:53:13 AM
Quote from: miguel on September 29, 2013, 11:50:06 AM
QuoteNice and excellent mod.
But I have a problem: I tried to translate it into spanish, thinking on give you the translated strings, but for an unknown reason, when I like in posts index, it shows only (), and for one second the button turns into "Unlike", but then it turns again into "Like".
Maybe it is a problem with spanish accents?

same problem in 1.1.1
Try the new version 1.2 ;).

Perfect  ;)
Title: Re: Like Posts
Post by: miguel on October 01, 2013, 01:34:26 PM
No
there is a problem

The text in spanish is ok bat if I like a post and go to the other site of forum the post liked is no liked

I see the date base and the like_count id:member is wrong
Title: Re: Like Posts
Post by: miguel on October 01, 2013, 02:17:53 PM
The problem is  like button on board index
The liked in message is ok
Title: Re: Like Posts
Post by: Joker™ on October 02, 2013, 01:16:03 AM
Quote from: miguel on October 01, 2013, 02:17:53 PM
The problem is  like button on board index
The liked in message is ok
What is the exact issue with liking on message index? Also PM me the site link with a test account.
Title: Re: Like Posts
Post by: SomaCruz on October 02, 2013, 05:25:27 PM
When I give "Like" button nothing happens, sometimes only... What can it be?

Sorry for my bad english

I use 1.2 version and 2.0.5 smf
Title: Re: Like Posts
Post by: Joker™ on October 03, 2013, 10:15:14 AM
Quote from: SomaCruz on October 02, 2013, 05:25:27 PM
When I give "Like" button nothing happens, sometimes only... What can it be?

Sorry for my bad english

I use 1.2 version and 2.0.5 smf
Hi SomaCruz,

What exactly doesn't happen, i.e does post get liked and text doesn't change or nothing happens at all?
Does this happen on message index only or in posts too?

Seems to be an issue where javascript files are not loaded and user clicked like prior to that.
Title: Re: Like Posts
Post by: SomaCruz on October 03, 2013, 12:38:47 PM
It happens everywhere, posts and sub ​​forums ...

Any way to fix it?

The mod is really good :(
Title: Re: Like Posts
Post by: Joker™ on October 04, 2013, 11:05:02 AM
Quote from: SomaCruz on October 03, 2013, 12:38:47 PM
It happens everywhere, posts and sub ​​forums ...

Any way to fix it?

The mod is really good :(
Ummm, was thinking of this and having a solution in mind. Why not show the like/unlike button only after jquery is loaded so that there won't be anyone complaining about the button not working :P.

Thoughts?
Title: Re: Like Posts
Post by: Joker™ on October 05, 2013, 07:35:00 AM
Quote from: miguel on October 01, 2013, 02:17:53 PM
The problem is  like button on board index
The liked in message is ok
Hi miguel,

You can remove the edits I've made in MessageIndex.template.php and instead make changes in Subs-Likes.php by looking at the code of this commit (https://github.com/Joker-SMF/SMF-Likes/commit/c73950b068ff8e9230323737bbe20f764cb56496).

Advantage - When you are going to update the mod, parser is going to give an error for the changes made in MessageIndex.template.php, but  for Subs-Likes.php it won't ;).
Title: Re: Like Posts
Post by: miguel on October 05, 2013, 08:08:39 AM
Thank you very much. Now this very well  ;D
Title: Re: Like Posts
Post by: miguel on October 05, 2013, 08:17:46 AM
just one thing. Not important. $ txt ['like_post_string_people'] when more than one has to add $ txt ['like_post_string_s']
Title: Re: Like Posts
Post by: Joker™ on October 05, 2013, 08:47:43 AM
Quote from: miguel on October 05, 2013, 08:17:46 AM
just one thing. Not important. $ txt ['like_post_string_people'] when more than one has to add $ txt ['like_post_string_s']
Hmm, ok will see to that in next release :).
Title: Re: Like Posts
Post by: DeroZ on October 20, 2013, 01:46:31 AM
Quote from: SomaCruz on October 02, 2013, 05:25:27 PM
When I give "Like" button nothing happens, sometimes only... What can it be?

Sorry for my bad english

I use 1.2 version and 2.0.5 smf

same problem, likes don't count, don't show user names, etc...
Title: Re: Like Posts
Post by: SilverBlue on October 20, 2013, 09:02:07 AM
Quote from: drfun on July 27, 2013, 03:48:16 PM
...
Is it possible for quest to view the like button but cant like/unlike and if they click on the like button it prompt them to register or redirect them to the login page?
I wish to have an option that guest can see the "likes" in posts. I mean that they can see that somebody like a post.
The option of a prompt to register would be nice to have
Title: Re: Like Posts
Post by: qubbah on October 23, 2013, 11:56:56 PM
still having a problem using this mod in post display... not in board index.
Title: Re: Like Posts
Post by: maxmoto on October 30, 2013, 09:17:09 AM
Quote from: Snoopix on October 20, 2013, 01:46:31 AM
Quote from: SomaCruz on October 02, 2013, 05:25:27 PM
When I give "Like" button nothing happens, sometimes only... What can it be?

Sorry for my bad english

I use 1.2 version and 2.0.5 smf

same problem, likes don't count, don't show user names, etc...

same problem, nothing happens 2.0.6
Title: Re: Like Posts
Post by: WittyUsername on November 06, 2013, 10:45:32 PM
So yeah, I have this mod installed on my website and it seems cool. But there's a bit of a problem...

See, the only thing that happens when I click like is it tacks on a "#1" to the URL and then nothing. No like, nothing. Just that "#1"

Now, that happens absolutely in Firefox. Chrome, it also happens... sometimes. Sometimes, after clicking around, the fade out and fade in plays. But mostly it's the same.

I tried it with Seamonkey, same result as Firefox. It just throws up a "#1."

Safari, same "#1" and nothing.

Tried it with *shudder* IE, same result. Just the "#!"

Finally, I tried it with Opera, and, funny enough, it worked. Like, every single, solitary post could be liked properly with Opera.

Funny enough, if I go to ANY other browsers and unlike a post that was liked in Opera, it works. It can be unliked properly and liked again. But no post that wasn't liked will be liked.

I guess this has something to do with Javascript? I dunno.

Using 2.0.5 and the latest build of this mod.


Now, I could use Opera and do all my fancy liking, but... seems a bit unpractical for a community. I don't want to ask my members to all use Opera just for liking. Is there anything I could do?
Title: Re: Like Posts
Post by: kpmedia on November 18, 2013, 11:14:44 AM
Great mod but same here, worked fine then stopped.

Displays the like button but does not allow any users to click button on any page within forum.

Do we know if there is a update due to be released to fix this problem. Also would be great if guest could like topics is well once this is fixed!

Many Thanks
Title: Re: Like Posts
Post by: STRRAYNGE on November 19, 2013, 09:41:02 AM
Id also like to have this working on 2.0.6. It installed fine, but clicking the button does nothing. Maybe I should install manually? Looks great so far though!
Title: Re: Like Posts
Post by: Joker™ on November 29, 2013, 08:08:45 AM
For all those who are facing the issue that within the topic, clicking on like button nothing happens, try out this file.

Go to Sources/LikePosts.php
1. Make backup of your file
2. Replace the attached file with the file in your folder
3. Please, revert me back the results asap as these days I'm bit busy with RL so won't be around for long.
4. If something breaks, reply with your site link and a dummy account with which I can login and like posts on your site for testing purpose

Please, don't send any private messages. All private messages are going to be microwaved/nuked/dumped.

Thanks :)
Title: Re: Like Posts
Post by: qubbah on November 29, 2013, 05:50:19 PM
Soo nice... work...
Title: Re: Like Posts
Post by: qubbah on November 29, 2013, 05:55:27 PM
Hope there is the code to show also latest update of like post from all members that we can put in it somewhere in our forum.. that all users can see it.. tq
Title: Re: Like Posts
Post by: kpmedia on December 01, 2013, 12:48:15 PM
Tried new php attachment but sadly made no difference to my site. Site is www.kp-celebrities.com but have disable mod at the moment as it is not working
Title: Re: Like Posts
Post by: Biology Forums on December 01, 2013, 06:06:45 PM
QuotePlease, don't send any private messages. All private messages are going to be microwaved/nuked/dumped.

;D
Title: Re: Like Posts
Post by: freestyler7 on December 02, 2013, 12:37:59 AM
Thank you very much for this mode, works great :)
Title: Re: Like Posts
Post by: Joker™ on December 02, 2013, 09:43:19 AM
Quote from: qubbah on November 29, 2013, 05:55:27 PM
Hope there is the code to show also latest update of like post from all members that we can put in it somewhere in our forum.. that all users can see it.. tq
And thats in my TODO list from a long long time.


Quote from: kpmedia on December 01, 2013, 12:48:15 PM
Tried new php attachment but sadly made no difference to my site. Site is www.kp-celebrities.com but have disable mod at the moment as it is not working
Sorry, as the mod is not enabled, I'm unable to help you out any further.
Title: Re: Like Posts
Post by: kpmedia on December 02, 2013, 10:09:32 AM
i have enable mod for you to see now
Title: Re: Like Posts
Post by: Joker™ on December 02, 2013, 10:16:00 AM
Quote from: kpmedia on December 02, 2013, 10:09:32 AM
i have enable mod for you to see now

Just liked a post over here (http://www.kp-celebrities.com/index.php?topic=567.msg1014#msg1014). Not sure what issue you are facing exactly.
Title: Re: Like Posts
Post by: kpmedia on December 02, 2013, 10:22:50 AM
the like button seems to work when i open a topic but when you try to click like via section it does not.

So if i open up movies and click like on a post it does not like unless i open the topic and like it where the previous one did.

Many Thanks for looking so fast
Title: Re: Like Posts
Post by: Joker™ on December 02, 2013, 10:30:31 AM
Quote from: kpmedia on December 02, 2013, 10:22:50 AM
the like button seems to work when i open a topic but when you try to click like via section it does not.

So if i open up movies and click like on a post it does not like unless i open the topic and like it where the previous one did.

Many Thanks for looking so fast
Looks like jquery is not loaded. Have you replaced the LikePosts.php with the one I've attached a few posts ago? If not, then please try the new file. Brb, dinner time.
Title: Re: Like Posts
Post by: kpmedia on December 02, 2013, 10:34:23 AM
yep replaced it with new php file you posted the other day but no joy.
Title: Re: Like Posts
Post by: Joker™ on December 02, 2013, 12:11:00 PM
Try disabling snow storm mod completely, and see if that resolves the issue.
Title: Re: Like Posts
Post by: kpmedia on December 02, 2013, 12:14:49 PM
sorry but no luck.

Disabled snow storm and tired again with no joy on topic list page
Title: Re: Like Posts
Post by: Joker™ on December 02, 2013, 12:16:34 PM
Hmm, post the list of mods you have installed on your forum. I'll get back with some results by tomorrow.
Title: Re: Like Posts
Post by: kpmedia on December 02, 2013, 01:06:36 PM
Many Thanks for your time mods listed below.

1.    SimplePortal    2.3.5    
2.    Ad Managment    3.1a    
3.    AvatarSelect    1.2.1    
4.    Adk Snow Effect    2.0
5.    PM Informer    4.0.1    
6.    News Letter Mod for SMF2    1.25    
7.    SMF 1.1.19 / 2.0.6 Update    1.0    
8.       Like Posts    1.2    
9.    Contact Page    3.2    
Title: Re: Like Posts
Post by: STRRAYNGE on December 04, 2013, 11:31:21 AM
Unfortunately no go for me as well. I replaced the file, but still wont show any likes. Ill keep an eye on this thread though for updates, looking good so far!
Title: Re: Like Posts
Post by: Joker™ on December 05, 2013, 08:55:01 AM
Quote from: kpmedia on December 02, 2013, 01:06:36 PM
Many Thanks for your time mods listed below.

1.    SimplePortal    2.3.5    
2.    Ad Managment    3.1a    
3.    AvatarSelect    1.2.1    
4.    Adk Snow Effect    2.0
5.    PM Informer    4.0.1    
6.    News Letter Mod for SMF2    1.25    
7.    SMF 1.1.19 / 2.0.6 Update    1.0    
8.       Like Posts    1.2    
9.    Contact Page    3.2    


At last I got a mod due to which there is a jQuery conflict and I can replicate the issue on my local test site as well.
PM_Informer4.0.1 (http://custom.simplemachines.org/mods/index.php?mod=1202)

Lets nail this issue.

Thanks, alot to everyone, for bearing up such a messy issue. Lets hope I can come up with a solution soon :).
Title: Re: Like Posts
Post by: Joker™ on December 05, 2013, 09:16:46 AM
And here comes another fix.

In Fixes.zip there are 2 files
LikePosts.js
LikePosts.php

Make backup of the files you currently have.

Replace the files with the ones you are currently having on the site.

Please provide the feedback on this, as I really want to close this issue :).
Title: Re: Like Posts
Post by: STRRAYNGE on December 05, 2013, 11:38:17 AM
Quote from: Joker™ on December 05, 2013, 09:16:46 AM
And here comes another fix.

In Fixes.zip there are 2 files
LikePosts.js
LikePosts.php

Make backup of the files you currently have.

Replace the files with the ones you are currently having on the site.

Please provide the feedback on this, as I really want to close this issue :).
Working on it now! Newbie question, but where do I find the .js file to replace?
Title: Re: Like Posts
Post by: STRRAYNGE on December 05, 2013, 12:34:53 PM
I think I got it working! I uninstalled the mod and deleted the file from my forum. I opened the original zip file that I downloaded awhile back, replaced the 2 files in the original zip with the ones you have posted above, and so far, knock on wood, its working for me!! Great work and thank you!
Title: Re: Like Posts
Post by: Joker™ on December 06, 2013, 08:54:13 AM
Quote from: STRRAYNGE on December 05, 2013, 12:34:53 PM
I think I got it working! I uninstalled the mod and deleted the file from my forum. I opened the original zip file that I downloaded awhile back, replaced the 2 files in the original zip with the ones you have posted above, and so far, knock on wood, its working for me!! Great work and thank you!
Thanks a lot 'STRRAYNGE' for the feedback :).
Title: Re: Like Posts
Post by: STRRAYNGE on December 06, 2013, 09:29:12 AM
Quote from: Joker™ on December 06, 2013, 08:54:13 AM
Quote from: STRRAYNGE on December 05, 2013, 12:34:53 PM
I think I got it working! I uninstalled the mod and deleted the file from my forum. I opened the original zip file that I downloaded awhile back, replaced the 2 files in the original zip with the ones you have posted above, and so far, knock on wood, its working for me!! Great work and thank you!
Thanks a lot 'STRRAYNGE' for the feedback :).
Not a problem! Thanks for this mod, its still working great!
Title: Re: Like Posts
Post by: Joker™ on December 07, 2013, 08:43:56 AM
Mod upgraded, please use the latest version 1.2.1 (http://custom.simplemachines.org/mods/index.php?mod=3708).
Title: Re: Like Posts
Post by: STRRAYNGE on December 07, 2013, 10:44:06 AM
Ok, not sure what I did wrong and what I need to do now, but, I tried to upgrade, and now its showing 2 like buttons for everything? I went in and manually deleted all edits, then tried to do a fresh install, but both are still there. I guess I should have left it alone.
Title: Re: Like Posts
Post by: Joker™ on December 07, 2013, 11:55:43 AM
Quote from: STRRAYNGE on December 07, 2013, 10:44:06 AM
Ok, not sure what I did wrong and what I need to do now, but, I tried to upgrade, and now its showing 2 like buttons for everything? I went in and manually deleted all edits, then tried to do a fresh install, but both are still there. I guess I should have left it alone.
Just make sure that the edits made by the mod appears only once in the respective files.

Make back up of the files on your computer before editing them

Edits made by mod (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=226740;smf_version=2.0.6)

Just make sure these edits appears only once in mentioned files.
Title: Re: Like Posts
Post by: STRRAYNGE on December 07, 2013, 12:05:43 PM
Quote from: Joker™ on December 07, 2013, 11:55:43 AM
Quote from: STRRAYNGE on December 07, 2013, 10:44:06 AM
Ok, not sure what I did wrong and what I need to do now, but, I tried to upgrade, and now its showing 2 like buttons for everything? I went in and manually deleted all edits, then tried to do a fresh install, but both are still there. I guess I should have left it alone.
Just make sure that the edits made by the mod appears only once in the respective files.

Make back up of the files on your computer before editing them

Edits made by mod (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=226740;smf_version=2.0.6)

Just make sure these edits appears only once in mentioned files.
I appreciate it. I just restored from backup prior to installing the mod, then reinstalled it. All good now! Thanks again!
Title: Re: Like Posts
Post by: Joker™ on December 07, 2013, 12:10:55 PM
Glad, that its working fine :).
Title: Re: Like Posts
Post by: dhaya.b on December 08, 2013, 12:54:32 AM
hai thanks for the update joker .. working fine i installed yesterday .. great one :)
Title: Re: Like Posts
Post by: shanea on December 09, 2013, 10:44:13 AM
Wow, this is one of the best mods I have seen so far! :D
Title: Re: Like Posts
Post by: fmofmpls on December 10, 2013, 04:47:20 PM
I'm loving this mod too. It would be nice however to have options for the "Like" button's appearance. I noticed it's not a image that can easily be replaced somewhere within a folder? Right?
Title: Re: Like Posts
Post by: Papoune57 on December 10, 2013, 06:01:42 PM
Update working fine,great mod.
Title: Re: Like Posts
Post by: Joker™ on December 11, 2013, 08:53:07 AM
Thanks for the comments :).

Quote from: fmofmpls on December 10, 2013, 04:47:20 PM
I'm loving this mod too. It would be nice however to have options for the "Like" button's appearance. I noticed it's not a image that can easily be replaced somewhere within a folder? Right?
Yup, the buttons are created via css, as why to increase the load on website to load the images when you can do awesome things with CSS3 :P.
Title: Re: Like Posts
Post by: pevanis on December 11, 2013, 11:21:21 AM
 :) Ta daaaaaaaaaaa

Great mod. :)
Thank You 
Title: Re: Like Posts
Post by: Augustine on December 11, 2013, 05:06:24 PM
Hey Joker!

This can be really useful! Thanks.
Title: Re: Like Posts
Post by: deivitbcn on December 12, 2013, 07:00:00 AM
I liked your mod!

two suggestions

1. Could be the button near the other ones (quote, modify...) ?
2. and if the button has a similar design to the theme "default" it would much nicer...

the same, thanks for this great mod.
Title: Re: Like Posts
Post by: Joker™ on December 13, 2013, 09:00:36 AM
Quote from: deivitbcn on December 12, 2013, 07:00:00 AM
I liked your mod!

two suggestions

1. Could be the button near the other ones (quote, modify...) ?
2. and if the button has a similar design to the theme "default" it would much nicer...

the same, thanks for this great mod.

Hi deivitbcn,

Thanks for the suggestions, initially I made the mod with the suggested UI interface, but later on I've changed the like button due to following reason

1. Mostly you will be liking a post after completely reading it, so why not to give the button in the end.
2. Also, I thought of giving the button a but different design.

If you have some nice design of button, I'd love to hear about it :).
Title: Re: Like Posts
Post by: AfterForever666 on December 16, 2013, 06:45:43 AM
Hi All,

I'm running SMF 2.0.6 and installed Like Posts 1.2.1. Nothing went wrong during installation, but I'm having the following problem :

When I click the "like" button on a post, nothing seems to happen. There is nothing in the error log when I do that either.
Secondly, when I click the "Total Likes" of a given user, I get an error in the errorlog :

ERROR: syntax error at or near ")"
LINE 2: ...nabled, GROUP_CONCAT(CONVERT(lp.id_member, CHAR( 8 )) SEPARATO...
^
File: C:\inetpub\QAForum\Sources\Subs-LikePosts.php
Line: 396

The database I'm using is Postgres 9. I've a feeling that some queries are not working on Postgres. If I'm right, Is this a known issue ? Could someone that knowledgable in this area suggest me how I could change the files so it works on Postgress ?
(I've found many articles on the web about converting "GROUP_CONCAT" from MySQL to Postgress, hence my assumptions)

Thanks for helping !
Title: Re: Like Posts
Post by: Arantor on December 16, 2013, 08:46:52 AM
I would strongly suggest using MySQL if at all possible. Most mods, even SMF itself, are written and tested on MySQL and then butchered into working. SMF's abstraction layer basically works by taking queries destined for MySQL and tweaking them to work. It is a terrible process but one that has been inherited and won't change any time soon.

This mod will likely need serious changes to make it work with PostgreSQL, and I seriously don't see anyone putting the time in.
Title: Re: Like Posts
Post by: AfterForever666 on December 16, 2013, 10:33:07 AM
Thanks Arantor for your answer. I get the point.
I didn't have much choice but to use PostGres (company policy).

I'm still hoping that this mod will be or has been tweaked by someone to work on PostgreSQL. Otherwise we'll have to do without like system.
Title: Re: Like Posts
Post by: Arantor on December 16, 2013, 10:36:43 AM
The mod hasn't been tweaked, and I don't see how it can without being rewritten.
Title: Re: Like Posts
Post by: Joker™ on December 21, 2013, 08:07:21 AM
Hi AfterForever666,

Thanks Arantor for replying to the user :).

AfterForever666, I got very little time these days for even supporting my mods and whatever time I get I try my best to fix the bugs and implement new features if community/users asks for them. I don't see the mod supporting 'Postgres DB' anytime soon.
Title: Re: Like Posts
Post by: Joker™ on December 24, 2013, 10:03:29 AM
Hi All,

Working with notification system for the mod. Attaching a very initial screen shot.

All thoughts/suggestion etc about the placement/design etc of notification system are most welcomed :).
Title: Re: Like Posts
Post by: Arantor on December 24, 2013, 02:07:57 PM
While I think it's great that you're adding this, be careful about putting too much in when 2.1 not only includes likes by default, it also includes a notifications system.
Title: Re: Like Posts
Post by: Biology Forums on December 25, 2013, 02:37:40 AM
Quote from: Arantor Beeblebrox the First on December 24, 2013, 02:07:57 PM
While I think it's great that you're adding this, be careful about putting too much in when 2.1 not only includes likes by default, it also includes a notifications system.

Where can we play around with a working copy (live demo) of 2.1?
Title: Re: Like Posts
Post by: margarett on December 25, 2013, 08:14:11 AM
Some users do have own test forums live, or you can get the newest code from GitHub and set up your own ;)
Title: Re: Like Posts
Post by: Arantor on December 25, 2013, 09:33:30 AM
But it's officially still alpha and thus there are broken things in there.
Title: Re: Like Posts
Post by: Joker™ on December 25, 2013, 10:37:09 AM
Quote from: Arantor Beeblebrox the First on December 24, 2013, 02:07:57 PM
While I think it's great that you're adding this, be careful about putting too much in when 2.1 not only includes likes by default, it also includes a notifications system.
Well that's nice. I've few mods in mind, but before working on them, I'd like to complete this mod in all features which I have in mind.

BTW, users using this mod are having an advantage, when they are going to port from SMF 2.0 -> 2.1, they will be carrying the likes for posts with them :).
Title: Re: Like Posts
Post by: Arantor on December 25, 2013, 10:58:37 AM
Using the same table structure, eh?
Title: Re: Like Posts
Post by: Joker™ on December 25, 2013, 08:56:59 PM
Quote from: Arantor Beeblebrox the First on December 25, 2013, 10:58:37 AM
Using the same table structure, eh?
I haven't went deep enough in 2.1 yet, but I'm very sure that this mod will be able to adapt to 2.1 standards either easily or hard way.

Even the upcoming update of the mod is having some nice DB structure changes.
Title: Re: Like Posts
Post by: Arantor on December 25, 2013, 09:00:40 PM
Well, I can guarantee the 2.1 installer is not going to investigate or try to import any itself - and I tried to make sure that the table name was different to all the other mods out there to prevent it accidentally clashing.

If you want to make the mod integrate, that's great but as a mod for 2.1 it is somewhat unnecessary and unlikely to be particularly well supportable because of the way likes works (it can, theoretically, support any other thing that wants to have likes support, e.g. gallery items)... it's complex, which is why I wanted to get the core be sufficiently generic that it could do so.
Title: Re: Like Posts
Post by: Biology Forums on December 29, 2013, 01:07:35 AM
Quote from: margarett on December 25, 2013, 08:14:11 AM
Some users do have own test forums live, or you can get the newest code from GitHub and set up your own ;)

I was hoping for a link to one that's already installed.
Title: Re: Like Posts
Post by: Joker™ on December 29, 2013, 07:25:20 AM
Quote from: Arantor Beeblebrox the First on December 25, 2013, 09:00:40 PM
Well, I can guarantee the 2.1 installer is not going to investigate or try to import any itself - and I tried to make sure that the table name was different to all the other mods out there to prevent it accidentally clashing.

If you want to make the mod integrate, that's great but as a mod for 2.1 it is somewhat unnecessary and unlikely to be particularly well supportable because of the way likes works (it can, theoretically, support any other thing that wants to have likes support, e.g. gallery items)... it's complex, which is why I wanted to get the core be sufficiently generic that it could do so.
Sounds great :)
Title: Re: Like Posts
Post by: _monotiz_ on January 08, 2014, 09:12:43 AM
Hi, thank you for the mod.

I got a error... I'm using a jquery scrollTop() in the index.template.php file for the nav bar stick like this:
http://jsfiddle.net/CriddleCraddle/Wj9dD/

It work on every sections, except in the topic display (where LikePost.js is loaded).
If I comment out the LikePost.js, everything works fine.

Can you help me?
Title: Re: Like Posts
Post by: ryan_dwight on January 09, 2014, 12:11:48 PM
I'm using this now on my forum and its a great mod.

Is it possible to have a list of title of the post only when you view the likes on your profile instead of the whole post because sometimes there are replies that is very long and you need to scroll to the bottom. I don't know if this has already implemented but I can't see any option to do it. And one more thing if possible like stat (ie. most liked thread or something)

Thank you for this great mod
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 04:58:05 AM
Quote from: _monotiz_ on January 08, 2014, 09:12:43 AM
Hi, thank you for the mod.

I got a error... I'm using a jquery scrollTop() in the index.template.php file for the nav bar stick like this:
http://jsfiddle.net/CriddleCraddle/Wj9dD/

It work on every sections, except in the topic display (where LikePost.js is loaded).
If I comment out the LikePost.js, everything works fine.

Can you help me?
Wow, nice to see someone using fiddle around. Coming back to issue, due you see any errors/warnings in console, while using your customisation with likes mod?


Quote from: ryan_dwight on January 09, 2014, 12:11:48 PM
I'm using this now on my forum and its a great mod.

Is it possible to have a list of title of the post only when you view the likes on your profile instead of the whole post because sometimes there are replies that is very long and you need to scroll to the bottom. I don't know if this has already implemented but I can't see any option to do it. And one more thing if possible like stat (ie. most liked thread or something)

Thank you for this great mod
Correct me if I'm wrong, but only list of posts subject are shown under like in profile.

Adding likes in stats sounds like a nice addon.
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 05:22:48 AM
QuoteCorrect me if I'm wrong, but only list of posts subject are shown under like in profile.

in my forum it is the whole reply (subject title and the body) is there any setting to set this up?
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 05:28:27 AM
Quote from: ryan_dwight on January 11, 2014, 05:22:48 AM
in my forum it is the whole reply (subject title and the body) is there any setting to set this up?
- What version of mod are you using?
- Link to your site with a test account :)
Title: Re: Like Posts
Post by: _monotiz_ on January 11, 2014, 06:30:07 AM
Quote from: Joker™ on January 11, 2014, 04:58:05 AM
Wow, nice to see someone using fiddle around. Coming back to issue, due you see any errors/warnings in console, while using your customisation with likes mod?
Hi,
this is my code:
<script>
$(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>


The error is marked on the function scrollTop:
Uncaught TypeError: Property '$' of object [object Object] is not a function

It disappear if I comment out the LikePost.js.

Thank you.
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 07:17:50 AM
Quote from: Joker™ on January 11, 2014, 05:28:27 AM
Quote from: ryan_dwight on January 11, 2014, 05:22:48 AM
in my forum it is the whole reply (subject title and the body) is there any setting to set this up?
- What version of mod are you using?
- Link to your site with a test account :)
version 1.2.1
test account on your PM

Thanks
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 07:58:49 AM
Quote from: ryan_dwight on January 11, 2014, 07:17:50 AM
Quote from: Joker™ on January 11, 2014, 05:28:27 AM
Quote from: ryan_dwight on January 11, 2014, 05:22:48 AM
in my forum it is the whole reply (subject title and the body) is there any setting to set this up?
- What version of mod are you using?
- Link to your site with a test account :)
version 1.2.1
test account on your PM

Thanks
Are there any custom edits made by you under the profile section?



Quote from: _monotiz_ on January 11, 2014, 06:30:07 AM
Quote from: Joker™ on January 11, 2014, 04:58:05 AM
Wow, nice to see someone using fiddle around. Coming back to issue, due you see any errors/warnings in console, while using your customisation with likes mod?
Hi,
this is my code:
<script>
$(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>


The error is marked on the function scrollTop:
Uncaught TypeError: Property '$' of object [object Object] is not a function

It disappear if I comment out the LikePost.js.

Thank you.
_monotiz_, give me few hrs, as I'm about to release a new version of this mod, with notification system integrated :)
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 08:00:57 AM
QuoteAre there any custom edits made by you under the profile section?
You mean custom profile fields? that will be a yes
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 08:03:38 AM
Quote from: ryan_dwight on January 11, 2014, 08:00:57 AM
QuoteAre there any custom edits made by you under the profile section?
You mean custom profile fields? that will be a yes
Umm, if you can wait for few hrs. a new mod version is on its way, as I'm running some basic test cases which I usually runs before any of my mod release.

So, I can safely say that if I don't come across any ground breaking bug there will be new version roll out in another hour. You can try it.
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 08:20:26 AM
that will be great, thanks a lot
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 09:04:31 AM
A new version(1.3) is in place, with notification system.

Please upgrade to it, as it consists of several bug fixes as well.
Title: Re: Like Posts
Post by: 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 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>

Title: Re: Like Posts
Post by: 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.
Title: Re: Like Posts
Post by: 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
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 10:14:48 AM
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.
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 11:11:45 AM
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.
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 12:18:54 PM
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.
Title: Re: Like Posts
Post by: 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?
Title: Re: Like Posts
Post by: Joker™ on January 11, 2014, 01:53:58 PM
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 (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=227857;smf_version=2.0.6)
Title: Re: Like Posts
Post by: ryan_dwight on January 11, 2014, 02:00:24 PM
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
Title: Re: Like Posts
Post by: _monotiz_ on January 12, 2014, 04:11:28 AM
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 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.
Title: Re: Like Posts
Post by: 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.
Title: Re: Like Posts
Post by: Joker™ on January 12, 2014, 08:12:24 AM
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.
Title: Re: Like Posts
Post by: Joker™ on January 12, 2014, 08:12:59 AM
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 :)
Title: Re: Like Posts
Post by: 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
Title: Re: Like Posts
Post by: 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?
Title: Re: Like Posts
Post by: 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

Title: Re: Like Posts
Post by: margarett on January 15, 2014, 12:42:37 PM
@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...)
Title: Re: Like Posts
Post by: Joker™ on January 15, 2014, 08:37:00 PM
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.
Title: Re: Like Posts
Post by: 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. :)
Title: Re: Like Posts
Post by: makv on January 16, 2014, 05:15:08 AM
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.
Title: Re: Like Posts
Post by: Joker™ on January 16, 2014, 10:01:15 AM
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 (https://github.com/Joker-SMF/SMF-Likes/commit/ec73a4c10340cf7110e17efd6d92665651f450fb).

A new version is just around the corner & will be released soon :).
Title: Re: Like Posts
Post by: Joker™ on January 17, 2014, 02:12:42 AM
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



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




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. :)
@All, try the new version v_1.3.1
Title: Re: Like Posts
Post by: raposo_744 on January 17, 2014, 06:10:57 AM
thankyou,now work good :)
Title: Re: Like Posts
Post by: makv on January 17, 2014, 06:27:53 AM
Quote from: raposo_744 on January 17, 2014, 06:10:57 AM
thankyou,now work good :)

Works for me too now, thanks!
Title: Re: Like Posts
Post by: Joker™ on January 17, 2014, 07:03:43 AM
Quote from: makv on January 17, 2014, 06:27:53 AM
Quote from: raposo_744 on January 17, 2014, 06:10:57 AM
thankyou,now work good :)

Works for me too now, thanks!
Your welcome. Thanks to you guys too, for helping me in debugging the issue.
Title: Re: Like Posts
Post by: makv on January 17, 2014, 10:20:56 AM
I have a request for an enhancement, if I may. It would be really useful to see the number of likes of each user in one place, like the member listing (or maybe even IN the member listing). This isn't currently possible unless I'm missing something?
Title: Re: Like Posts
Post by: Joker™ on January 17, 2014, 11:28:46 AM
Quote from: makv on January 17, 2014, 10:20:56 AM
I have a request for an enhancement, if I may. It would be really useful to see the number of likes of each user in one place, like the member listing (or maybe even IN the member listing). This isn't currently possible unless I'm missing something?
Tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/10)
Title: Re: Like Posts
Post by: ryan_dwight on January 17, 2014, 12:45:56 PM
just a question, if version 1.3 is working to my forum with no errors on the log, do i need to update to 1.3.1?
Title: Re: Like Posts
Post by: Joker™ on January 17, 2014, 12:49:47 PM
Quote from: ryan_dwight on January 17, 2014, 12:45:56 PM
just a question, if version 1.3 is working to my forum with no errors on the log, do i need to update to 1.3.1?
Nope.
Title: Re: Like Posts
Post by: Beelzeboss on January 29, 2014, 01:48:45 PM
Dear Joker, first of all thank you very much for your mod. I was looking for something like this.

I found a issue with hidden threads in "Show Likes notification" tab. For a example if a moderator likes a post in staff section, then a regular member can see the title of hidden thread in "All notifications" tab.

Can you fixed it with an extra permission?

Until it is corrected, I deleted a part from /Themes/default/scripts/LikePosts.js

I deleted from line 208

style="display: none"


I deleted the following from line 192

if (i === 'all') {
notificationInfo += '<div class="lp_notification_body lp_all_notifications_data">';
var len = 0;
if (data[i].length === 0) {
notificationInfo += '<div class="single_notify">Nothing to show at the moment</div>';
} else {
for (j in data[i]) {
if (data[i].hasOwnProperty(j)) {
len++;
notificationInfo += '<div class="single_notify"><img class="avatar" src="' + data[i][j].member.avatar.href + '" /><div class="like_post_notify_data"><a href="' + data[i][j].member.href + '"><strong>' + data[i][j].member.name + '</strong></a> liked ' + '<a href="' + data[i][j].href + '">' + data[i][j].subject + '</a></div></div>';
}
}
}
dataLengthAll = len;
notificationInfo += '</div>';
} else



and in line 188

notificationInfo += '<div class="lp_notification_header"><div class="lp_notification_tabs" id="lp_all_notifications">All Notification</div><div class="lp_notification_tabs" id="lp_my_notifications">My Posts</div></div>';

I replaced it with this

notificationInfo += '<div class="lp_notification_header"><div class="lp_notification_tabs" id="lp_my_notifications"><b>My Posts</b></div></div>';

Last in the file /Themes/default/css/LikePosts.css  in line 121 (after ".like_posts_notification .lp_notification_header .lp_notification_tabs {)")  I wrote

width: 100%

So there is only the notification for your posts.
Title: Re: Like Posts
Post by: Joker™ on February 01, 2014, 07:11:15 AM
Quote from: Beelzeboss on January 29, 2014, 01:48:45 PM
Dear Joker, first of all thank you very much for your mod. I was looking for something like this.

I found a issue with hidden threads in "Show Likes notification" tab. For a example if a moderator likes a post in staff section, then a regular member can see the title of hidden thread in "All notifications" tab.

Can you fixed it with an extra permission?

Until it is corrected, I deleted a part from /Themes/default/scripts/LikePosts.js

I deleted from line 208

style="display: none"


I deleted the following from line 192

if (i === 'all') {
notificationInfo += '<div class="lp_notification_body lp_all_notifications_data">';
var len = 0;
if (data[i].length === 0) {
notificationInfo += '<div class="single_notify">Nothing to show at the moment</div>';
} else {
for (j in data[i]) {
if (data[i].hasOwnProperty(j)) {
len++;
notificationInfo += '<div class="single_notify"><img class="avatar" src="' + data[i][j].member.avatar.href + '" /><div class="like_post_notify_data"><a href="' + data[i][j].member.href + '"><strong>' + data[i][j].member.name + '</strong></a> liked ' + '<a href="' + data[i][j].href + '">' + data[i][j].subject + '</a></div></div>';
}
}
}
dataLengthAll = len;
notificationInfo += '</div>';
} else



and in line 188

notificationInfo += '<div class="lp_notification_header"><div class="lp_notification_tabs" id="lp_all_notifications">All Notification</div><div class="lp_notification_tabs" id="lp_my_notifications">My Posts</div></div>';

I replaced it with this

notificationInfo += '<div class="lp_notification_header"><div class="lp_notification_tabs" id="lp_my_notifications"><b>My Posts</b></div></div>';

Last in the file /Themes/default/css/LikePosts.css  in line 121 (after ".like_posts_notification .lp_notification_header .lp_notification_tabs {)")  I wrote

width: 100%

So there is only the notification for your posts.

Nice catch, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/12)
Title: Re: Like Posts
Post by: Jeffrey King on February 01, 2014, 10:09:33 AM
Upgraded
Title: Re: Like Posts
Post by: tjbalon on February 08, 2014, 02:06:46 PM
Wondering if this issue can be fixed.

I have a forum and where the "Show Like Notifications" button is, it is at the far right border.

(http://gyazo.com/25ac3c7d1d48f8356af008712ab657fe.png)

Is there a way I could go about making the box open up directly below or the other way?
Title: Re: Like Posts
Post by: Joker™ on February 15, 2014, 07:54:14 AM
Quote from: balonfx on February 08, 2014, 02:06:46 PM
Wondering if this issue can be fixed.

I have a forum and where the "Show Like Notifications" button is, it is at the far right border.

(http://gyazo.com/25ac3c7d1d48f8356af008712ab657fe.png)

Is there a way I could go about making the box open up directly below or the other way?
Thanks for pointing this out, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/13).
Title: Re: Like Posts
Post by: tjbalon on February 15, 2014, 02:48:40 PM
Quote from: Joker™ on February 15, 2014, 07:54:14 AM
Quote from: balonfx on February 08, 2014, 02:06:46 PM
Wondering if this issue can be fixed.

I have a forum and where the "Show Like Notifications" button is, it is at the far right border.

(http://gyazo.com/25ac3c7d1d48f8356af008712ab657fe.png)

Is there a way I could go about making the box open up directly below or the other way?
Thanks for pointing this out, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/13).

There something in the code that can fix this?
or will a new release be made eventually with this option?

Thanks in advance :P
Title: Re: Like Posts
Post by: Joker™ on February 16, 2014, 04:27:56 AM
Quote from: balonfx on February 15, 2014, 02:48:40 PM
There something in the code that can fix this?
or will a new release be made eventually with this option?

Thanks in advance :P
Mostly a new release, with more new features and fixes.
Title: Re: Like Posts
Post by: a10 on February 16, 2014, 07:41:11 AM
Just installed this, core theme, works great.
Thanks

Edit: Now on curve theme, 2.0.7, all well.
Title: Re: Like Posts
Post by: BGH on February 16, 2014, 11:01:21 AM
Hello,

I've tried this mod and very useful and complete, so thank you for posting it! :)

Didn't read this support topic and haven't checked the mod code, yet, but in case that they are missing, I have a couple of questions I wanted to make:

1) Is it possible to get rid with the "Show Likes notification" button, instead of showing the notification box, when someone liked a post? To make it look like a "real" notification. Maybe that would have a negative impact server-wise?

2) Can I modify the style of the "liked" statement? I mean the bit that says "(1 people like this)/You liked this". I thought making it like Vbulletin, for example: "BGH liked this post."; or in case of multiple likes: "BGH, Joker™, testuser and 3 more people liked this." (with a link on "more like" to open the div). If it's possible, can you point me out on how to do this, or where to edit the code?

Thanks in advance!

Best regards.
Title: Re: Like Posts
Post by: Joker™ on February 16, 2014, 01:46:00 PM
Quote from: BGH on February 16, 2014, 11:01:21 AM
Hello,

I've tried this mod and very useful and complete, so thank you for posting it! :)

Didn't read this support topic and haven't checked the mod code, yet, but in case that they are missing, I have a couple of questions I wanted to make:

1) Is it possible to get rid with the "Show Likes notification" button, instead of showing the notification box, when someone liked a post? To make it look like a "real" notification. Maybe that would have a negative impact server-wise?
It's going to put a heavy load on server.

Quote from: BGH on February 16, 2014, 11:01:21 AM
2) Can I modify the style of the "liked" statement? I mean the bit that says "(1 people like this)/You liked this". I thought making it like Vbulletin, for example: "BGH liked this post."; or in case of multiple likes: "BGH, Joker™, testuser and 3 more people liked this." (with a link on "more like" to open the div). If it's possible, can you point me out on how to do this, or where to edit the code?

Thanks in advance!

Best regards.
To do that, you need to change the logic of how the data for display template is pulled by like posts & its database layer. I'll try to point out the code soon.
Title: Re: Like Posts
Post by: BGH on February 16, 2014, 02:11:30 PM
Quote from: Joker™ on February 16, 2014, 01:46:00 PM
Quote from: BGH on February 16, 2014, 11:01:21 AM
1) Is it possible to get rid with the "Show Likes notification" button, instead of showing the notification box, when someone liked a post? To make it look like a "real" notification. Maybe that would have a negative impact server-wise?
It's going to put a heavy load on server.

Yeah, I supposed that that would happen. Anyway, this works great the way it does, and it gave my an idea with something I'll try ;).

Quote from: Joker™ on February 16, 2014, 01:46:00 PM
Quote from: BGH on February 16, 2014, 11:01:21 AM
2) Can I modify the style of the "liked" statement? I mean the bit that says "(1 people like this)/You liked this". I thought making it like Vbulletin, for example: "BGH liked this post."; or in case of multiple likes: "BGH, Joker™, testuser and 3 more people liked this." (with a link on "more like" to open the div). If it's possible, can you point me out on how to do this, or where to edit the code?
To do that, you need to change the logic of how the data for display template is pulled by like posts & its database layer. I'll try to point out the code soon.

Cool! Will be looking forward to it! :)

Thanks for your answer, Joker™!


Title: Re: Like Posts
Post by: Beelzeboss on February 18, 2014, 04:26:59 PM
Quote from: Joker™ on February 01, 2014, 07:11:15 AM
Nice catch, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/12)

Dear Joker I see you fixed it. Thank you.

I noticed something else. When you move/split/merge topics or posts, then the likes disappeared from the posts.The meter continues to count them and you can find the latest likes from notification button. The problem is because the columns "id_board" or/and "id_topic" from database table "like_post", don't change when you move/split/merge posts. I made the following changes:

In the file /sources/MoveTopic.php 

after this

$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_board = {int:id_board}' . ($isRecycleDest ? ',approved = {int:is_approved}' : '') . '
WHERE id_topic IN ({array_int:topics})',
array(
'id_board' => $toBoard,
'topics' => $topics,
'is_approved' => 1,
)
);



I added this

$smcFunc['db_query']('', '
UPDATE {db_prefix}like_post
SET id_board = {int:id_board}
WHERE id_topic IN ({array_int:topics})',
array(
'id_board' => $toBoard,
'topics' => $topics,
)
);



and in the file /sources/SplitTopics.php

before this "// Mess with the old topic's first, last, and number of messages."

I added this

$smcFunc['db_query']('', '
UPDATE {db_prefix}like_post
SET id_topic = {int:id_topic}
WHERE id_msg IN ({array_int:split_msgs})',
array(
'split_msgs' => $splitMessages,
'id_topic' => $split2_ID_TOPIC,
)
);



and before  "// Change the subject of the first message..."

I added this

$smcFunc['db_query']('', '
UPDATE {db_prefix}like_post
SET
id_topic = {int:id_topic},
id_board = {int:target_board}
WHERE id_topic IN ({array_int:topics_list})',
array(
'topics_list' => $topics,
'id_topic' => $id_topic,
'target_board' => $target_board,
)
);



It seems it works now. I'll wait to check if it 's ok. Thank you
Title: Re: Like Posts
Post by: chrisjudd on February 20, 2014, 06:37:51 PM
For some reason when I install (doing on 2.0.7) it will display 2 like buttons and 2 like stats in the user message profile
Title: Re: Like Posts
Post by: margarett on February 21, 2014, 07:13:15 AM
That usually means you installed the MOD twice...
Title: Re: Like Posts
Post by: Joker™ on February 23, 2014, 12:26:49 AM
Quote from: Beelzeboss on February 18, 2014, 04:26:59 PM
Quote from: Joker™ on February 01, 2014, 07:11:15 AM
Nice catch, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/12)

Dear Joker I see you fixed it. Thank you.

I noticed something else. When you move/split/merge topics or posts, then the likes disappeared from the posts.The meter continues to count them and you can find the latest likes from notification button. The problem is because the columns "id_board" or/and "id_topic" from database table "like_post", don't change when you move/split/merge posts. I made the following changes:

In the file /sources/MoveTopic.php 

after this

$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_board = {int:id_board}' . ($isRecycleDest ? ',approved = {int:is_approved}' : '') . '
WHERE id_topic IN ({array_int:topics})',
array(
'id_board' => $toBoard,
'topics' => $topics,
'is_approved' => 1,
)
);



I added this

$smcFunc['db_query']('', '
UPDATE {db_prefix}like_post
SET id_board = {int:id_board}
WHERE id_topic IN ({array_int:topics})',
array(
'id_board' => $toBoard,
'topics' => $topics,
)
);



and in the file /sources/SplitTopics.php

before this "// Mess with the old topic's first, last, and number of messages."

I added this

$smcFunc['db_query']('', '
UPDATE {db_prefix}like_post
SET id_topic = {int:id_topic}
WHERE id_msg IN ({array_int:split_msgs})',
array(
'split_msgs' => $splitMessages,
'id_topic' => $split2_ID_TOPIC,
)
);



and before  "// Change the subject of the first message..."

I added this

$smcFunc['db_query']('', '
UPDATE {db_prefix}like_post
SET
id_topic = {int:id_topic},
id_board = {int:target_board}
WHERE id_topic IN ({array_int:topics_list})',
array(
'topics_list' => $topics,
'id_topic' => $id_topic,
'target_board' => $target_board,
)
);



It seems it works now. I'll wait to check if it 's ok. Thank you

Glad the fixed worked for you.

Also thanks for pointing out another issue(thanks for debugging) about split topics. We can fix it via 2 ways
1. If you allow I can use the code provided by you for the fix, but that requires the mod playing with SMF core files
2. We can drop the topic and board column from likes table as mod is also not utilising those columns very well.

Hmmmm, lets think :).
Title: Re: Like Posts
Post by: chrisjudd on February 23, 2014, 02:36:04 PM
Quote from: margarett on February 21, 2014, 07:13:15 AM
That usually means you installed the MOD twice...
I don't see it listed twice..
Title: Re: Like Posts
Post by: Joker™ on February 24, 2014, 10:20:42 AM
Quote from: chrisjudd on February 23, 2014, 02:36:04 PM
Quote from: margarett on February 21, 2014, 07:13:15 AM
That usually means you installed the MOD twice...
I don't see it listed twice..
Check if the mod edits are made twice in the mentioned files over here (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=228012;smf_version=2.0.7)
Title: Re: Like Posts
Post by: Beelzeboss on February 26, 2014, 08:06:54 AM
Quote from: Joker™ on February 23, 2014, 12:26:49 AM
Glad the fixed worked for you.

Also thanks for pointing out another issue(thanks for debugging) about split topics. We can fix it via 2 ways
1. If you allow I can use the code provided by you for the fix, but that requires the mod playing with SMF core files
2. We can drop the topic and board column from likes table as mod is also not utilising those columns very well.

Hmmmm, lets think :).

I'm glad to hear that. Of course you can use anything you want. Does it creates any problem the requirement of use smf core file like MoveTopic/SplitTopics.php?

2. I thought the deletion of these columns because I believe the important would be the id_msg, but I didn't try it. Maybe it's the best solution.

Thank you.
Title: Re: Like Posts
Post by: Joker™ on February 26, 2014, 08:42:43 AM
Quote from: Beelzeboss on February 26, 2014, 08:06:54 AM
I'm glad to hear that. Of course you can use anything you want. Does it creates any problem the requirement of use smf core file like MoveTopic/SplitTopics.php?

2. I thought the deletion of these columns because I believe the important would be the id_msg, but I don't tried it. Maybe it's the best solution.

Thank you.
Well I personally try to tweak SMF files as minimal as possible, as if some other mod has made a change in the same file and at a same place then my mods are going to create the conflicts, and I'd have to provide a lot of mod related support.
Title: Re: Like Posts
Post by: Beelzeboss on February 26, 2014, 12:27:31 PM
Quote from: Joker™ on February 26, 2014, 08:42:43 AM
Well I personally try to tweak SMF files as minimal as possible, as if some other mod has made a change in the same file and at a same place then my mods are going to create the conflicts, and I'd have to provide a lot of mod related support.

Hmmm yes you 're right.  :)
Title: Re: Like Posts
Post by: STRRAYNGE on March 05, 2014, 11:54:21 AM
This may have been covered, but I didnt see it. By chance does this mod work with IE? I use firefox and chrome and its working wonderfully, but I just had a user message me saying he cant like any posts, its not working. I asked him what browser he was using and he said IE8. Any help is much appreciated.

EDIT: Disregard, im just going to suggest for him to use a different browser.
Title: Re: Like Posts
Post by: someDev on March 05, 2014, 03:11:18 PM
i think it would be great some stat page for this likes
Title: Re: Like Posts
Post by: Joker™ on March 06, 2014, 10:14:27 AM
Quote from: STRRAYNGE on March 05, 2014, 11:54:21 AM
This may have been covered, but I didnt see it. By chance does this mod work with IE? I use firefox and chrome and its working wonderfully, but I just had a user message me saying he cant like any posts, its not working. I asked him what browser he was using and he said IE8. Any help is much appreciated.

EDIT: Disregard, im just going to suggest for him to use a different browser.

Quote from: Joker™ on September 10, 2013, 01:17:27 PM
Ahhh IE. ScrumpyJack, please don't feel offended, but I never try my code on IE, as why should I put double effort just to support a browser which is still doing everything it can to make dev's life hell :P.

Also is anyone aware about how to install IE on mac :-X?
:D


Quote from: someDev on March 05, 2014, 03:11:18 PM
i think it would be great some stat page for this likes
I started working on it a while back, but currently I'm more inclined to another forum software hence theres a lesser probability that this mod is going to receive any great feature in near future.

Also SMF team has built like systems in SMF 2.1 so why should I put more time into this mod?
Title: Re: Like Posts
Post by: Dblog on March 07, 2014, 12:31:09 PM
It would be great if Guests are also able to see 'Likes' recieved by a member. (Only members should be able to like/dislike though)
This will motivate members to make more Likeable posts and also add to their credibility.
Right now, guests doesnt even know/see that there is a post/topic like option
Title: Re: Like Posts
Post by: jawad96 on March 09, 2014, 05:10:08 PM
Hi there,

Installing this mod on MysticJade theme.

Receive this test fail upon installation:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Code: (Replace)

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


File location:

Themes/mysticjade_20a/index.template.php

Installed regardless, and have had no issues. Just posting to see what exactly failed, by the looks of it, notification won't be working?

Regards,
Jawad

PS:

Agree with cBlog. Would be great if guests could see like feature exists on forum. This is as simple as adding another checkbox under permission settings > can view likes > 'Guests'?

Would be great if you can add this.
Title: Re: Like Posts
Post by: Kaerie on March 12, 2014, 01:12:07 PM

Hello!

I wanted, first of all, to say thanks.  I'm running a forum for a very small, close-knit community, and they have really appreciated the addition of a "Like" button.  However, the ladies on this forum don't like the "popularity contest" they perceive the "total likes of a user" in each post.  I've attached a screenshot to show exactly what I'm talking about:

(http://i495.photobucket.com/albums/rr319/Kaeriesr/totallikes_zpse57bdbff.jpg)


I have a *little* bit of coding understanding.  Just enough to kind of follow what's going on, but not really enough to confidently make any changes.  I'd like to remove this display from each post, however I have been unable to find the correct spot thus far to experiment and comment out.

If someone could point me in the right direction and show me where I need to be in order to do this, I'd really appreciate it!

Thank you!
Title: Re: Like Posts
Post by: FemR on March 14, 2014, 05:56:05 PM
+1 for implementing some top stats page for this great mod - it is one thing we miss so much!

Thanks for all your work on this mod, Joker! ;)
Title: Re: Like Posts
Post by: MechSpecs on March 14, 2014, 08:27:20 PM
Quote from: Kaerie on March 12, 2014, 01:12:07 PM
If someone could point me in the right direction and show me where I need to be in order to do this, I'd really appreciate it!

If you figure it out post it here. This is something that has also prevented me from installing this mod on a new site. I really like how stats are tracked although I think it could be fleshed out even more to be more graphically pleasing but I understand the authors reluctance with SMF 2.1 coming out with a built in likes system.
Title: Re: Like Posts
Post by: MechSpecs on March 25, 2014, 12:54:01 AM
Quote from: Kaerie on March 12, 2014, 01:12:07 PM
(http://i495.photobucket.com/albums/rr319/Kaeriesr/totallikes_zpse57bdbff.jpg)

Did anyone give you the specific code you are looking to pull out for this to work? I've been thinking about this mod as well if I can right align the button and remove that bit from the post author portion, in your face popularity contests are an issue, then I think I might plug this into the latest 2.0.7 I've done.
Title: Re: Like Posts
Post by: someDev on April 01, 2014, 09:41:42 AM
Quote from: Joker™ on March 06, 2014, 10:14:27 AM
I started working on it a while back, but currently[...] why should I put more time into this mod?

becouse not all using smf 2,1

so i made some simple addon which shows simple stats
http://www.borowicz.info/pub/smf/abStats4LikePosts.zip
Title: Re: Like Posts
Post by: ryan_dwight on April 03, 2014, 05:09:40 PM
Quote from: someDev on April 01, 2014, 09:41:42 AM
Quote from: Joker™ on March 06, 2014, 10:14:27 AM
I started working on it a while back, but currently[...] why should I put more time into this mod?

becouse not all using smf 2,1

so i made some simple addon which shows simple stats
http://www.borowicz.info/pub/smf/abStats4LikePosts.zip
where is the stat located?
Title: Re: Like Posts
Post by: redding99 on April 07, 2014, 05:12:39 PM
Hi, hope you can support me with getting this mod working on my forum.

It all seems OK but nothing happens when you click on the Like button on a post. Nothing updates and the button remains.

I installed the mod without any problem except for one file on a couple of my themes (index.template.php):

The installer was looking for this:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

To change to this

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
               <li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


But other mods had added to this line of code so I manually entered the change for this file. It all seems to work OK so I don't think the issue is related.

Any suggestion would be appreciated. I have disabled the mod at the moment but can enable for you to view it

Steve
Title: Re: Like Posts
Post by: Joker™ on April 08, 2014, 06:15:37 AM
Quote from: Cblog on March 07, 2014, 12:31:09 PM
It would be great if Guests are also able to see 'Likes' recieved by a member. (Only members should be able to like/dislike though)
This will motivate members to make more Likeable posts and also add to their credibility.
Right now, guests doesnt even know/see that there is a post/topic like option
Nice..

Quote from: Kaerie on March 12, 2014, 01:12:07 PM

Hello!

I wanted, first of all, to say thanks.  I'm running a forum for a very small, close-knit community, and they have really appreciated the addition of a "Like" button.  However, the ladies on this forum don't like the "popularity contest" they perceive the "total likes of a user" in each post. 
Doable using permissions.


Quote from: someDev on April 01, 2014, 09:41:42 AM
Quote from: Joker™ on March 06, 2014, 10:14:27 AM
I started working on it a while back, but currently[...] why should I put more time into this mod?

becouse not all using smf 2,1
Correct


Quote from: redding99 on April 07, 2014, 05:12:39 PM
Hi, hope you can support me with getting this mod working on my forum.

It all seems OK but nothing happens when you click on the Like button on a post. Nothing updates and the button remains.

I installed the mod without any problem except for one file on a couple of my themes (index.template.php):

The installer was looking for this:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

To change to this

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
               <li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


But other mods had added to this line of code so I manually entered the change for this file. It all seems to work OK so I don't think the issue is related.

Any suggestion would be appreciated. I have disabled the mod at the moment but can enable for you to view it

Steve
Umm, attach the related file in your reply.

For people looking for a stats page, where should the button to access likes stats should be placed?
Title: Re: Like Posts
Post by: redding99 on April 08, 2014, 06:35:34 AM
Thanks for the quick reply.

I have attached the file that I had to manually amend.

The forum address is www.calis-beach.co.uk/forum and I have activated the mod on the site so you can see the problem

I will PM you a test username and password

Thanks again
Title: Re: Like Posts
Post by: redding99 on April 09, 2014, 03:11:40 AM
Hopefully you have the revised username now and it is working ok.

I took a look at the individual files yesterday to make sure that all the files, including the .js, are sitting in the appropriate folders and the cmods are correct. All seems ok but it doesn't look like anything is firing when the button is clicked.
Title: Re: Like Posts
Post by: redding99 on April 09, 2014, 06:27:20 PM
Just as an update we have upgraded the version of smf from 2.0.6 to 2.0.7 and also tried uninstalling some mods we thought might be causing a conflict. Unfortunately all without success. Any help you can provide would be appreciated.
Title: Re: Like Posts
Post by: Joker™ on April 10, 2014, 09:37:07 AM
Quote from: redding99 on April 09, 2014, 06:27:20 PM
Just as an update we have upgraded the version of smf from 2.0.6 to 2.0.7 and also tried uninstalling some mods we thought might be causing a conflict. Unfortunately all without success. Any help you can provide would be appreciated.
It looks like the ajax url's are getting malformed due to some url re-writing sort of mod. Please post the list of the mods you are using on your forum.
Title: Re: Like Posts
Post by: redding99 on April 10, 2014, 10:00:42 AM
Hi again

See below....

1.   Tapatalk SMF 2.0 Plugin   3.9.3   [ Uninstall ]
2.   Like Posts   1.3.1   [ Uninstall ]
3.   SMF 2.0.7 Update   1.0   [ Uninstall ]
4.   SMF 1.1.19 / 2.0.6 Update   1.0   [ Uninstall ]
5.   SMF 2.0.5 Update   1.0   [ Uninstall ]
6.   SMF 2.0.4 Update   1.0   [ Uninstall ]
7.   SMF 2.0.3 Update   1.0   [ Uninstall ]
8.   Disable 'last edit by...' for Administrators   1.9   [ Uninstall ]
9.   MessagePreviewOnHover   1.8   [ Uninstall ]
10.   SimpleAds   1.0.1   [ Uninstall ]
11.   Recent Topics by 1h 8h 24h Filter Steve Adaption   1.0   [ Uninstall ]
12.   Automanagement of attachments   0.1.12   [ Uninstall ]
13.   SimpleSEF   2.1   [ Uninstall ]
14.   Shiny Smiley Icons   1.0   [ Uninstall ]
15.   Animation Blue Smiley   2.1   [ Uninstall ]
16.   Popos Smiley   1.0   [ Uninstall ]
17.   Adk Warning to visitors   1.0   [ Uninstall ]
18.   BoardColor   V1   [ Uninstall ]
19.   CheckBeforePosting   0.3.3   [ Uninstall ]
20.   YouTube BBCode   2.6   [ Uninstall ]
21.   Social Bookmarks   2.0   [ Uninstall ]
22.   Google Translate for SMF 2.0   1.3   [ Uninstall ]
23.   Simple Image Upload   1.3.0   [ Uninstall ]
24.   Age And Location   1.0   [ Uninstall ]
25.   Google Member Map   2.6   [ Uninstall ]
26.   Additional Instant Messengers   1.0.1   [ Uninstall ]

I'm not sure why but the above is a list from the 'installed packages' from the admin area. The following is also a list from the 'Browse packages' area that includes some of the above and a few more

1.   Todays Birthday    1.2   [ List Files ] [ Delete ]
2.   Tapatalk SMF 2.0 Plugin    3.9.3     [ Uninstall ] [ List Files ] [ Delete ]
3.   SMF 2.0.5 Update    1.0     [ List Files ] [ Delete ]
4.   Google Member Map    2.6     [ Uninstall ] [ List Files ] [ Delete ]
5.   Disable 'last edit by...' for Administrators    1.9     [ Uninstall ] [ List Files ] [ Delete ]
6.   Age And Location    1.0     [ Uninstall ] [ List Files ] [ Delete ]
7.   Simple Image Upload    1.3.0     [ Uninstall ] [ List Files ] [ Delete ]
8.   Recent Topics by 1h 8h 24h Filter Steve Adaption    1.0     [ Uninstall ] [ List Files ] [ Delete ]
9.   SMF 2.0.7 Update    1.0     [ Uninstall ] [ List Files ] [ Delete ]
10.   SimpleAds    1.0.1     [ Uninstall ] [ List Files ] [ Delete ]
11.   Tapatalk SMF 2.0 RC5/Final Plugin    3.9.1   [ List Files ] [ Delete ]
12.   Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.2   [ List Files ] [ Delete ]
13.   Post Ratings    1.5   [ List Files ] [ Delete ]
14.   Google Translate for SMF 2.0    1.3     [ List Files ] [ Delete ]
15.   AjaxChat Integration    3.3c   [ Install Mod ] [ List Files ] [ Delete ]
16.   Like Posts    1.3.1     [ Uninstall ] [ List Files ] [ Delete ]
17.   Additional Instant Messengers    1.0.1     [ Uninstall ] [ List Files ] [ Delete ]
18.   SMF 2.0.4 Update    1.0     [ List Files ] [ Delete ]
19.   Tapatalk SMF 2.0 RC5/Final Plugin    3.9.0   [ List Files ] [ Delete ]
20.   Post Ratings    1.6   [ Install Mod ] [ List Files ] [ Delete ]
21.   Facebook_Like v.2.0    2.0   [ List Files ] [ Delete ]
22.   SMF 2.0.3 Update    1.0     [ List Files ] [ Delete ]
23.   SimpleSEF    2.1     [ List Files ] [ Delete ]
24.   Social Bookmarks    2.0     [ Uninstall ] [ List Files ] [ Delete ]
25.   Advanced image uploader    1.1.0   [ List Files ] [ Delete ]
26.   YouTube BBCode    2.6     [ Uninstall ] [ List Files ] [ Delete ]
27.   BoardColor    V1     [ Uninstall ] [ List Files ] [ Delete ]
28.   SMF 1.1.19 / 2.0.6 Update    1.0     [ List Files ] [ Delete ]
29.   Tapatalk SMF 2.0 RC5/Final Plugin    3.7.2   [ List Files ] [ Delete ]
30.   SEO Sitemap    2.2   [ Install Mod ] [ List Files ] [ Delete ]
31.   CheckBeforePosting    0.3.3     [ Uninstall ] [ List Files ] [ Delete ]
32.   MessagePreviewOnHover    1.8     [ List Files ] [ Delete ]
Title: Re: Like Posts
Post by: MechSpecs on April 10, 2014, 10:40:01 AM
Quote from: redding99 on April 10, 2014, 10:00:42 AM
23.   SimpleSEF    2.1     [ List Files ] [ Delete ]

I would start here first. Looks like this rewrites your URLs into search engine friendly ones, this might be affecting the likes mod.
Title: Re: Like Posts
Post by: redding99 on April 10, 2014, 10:53:05 AM
Quote from: MechSpecs on April 10, 2014, 10:40:01 AM
Quote from: redding99 on April 10, 2014, 10:00:42 AM
23.   SimpleSEF    2.1     [ List Files ] [ Delete ]

I would start here first. Looks like this rewrites your URLs into search engine friendly ones, this might be affecting the likes mod.

Thanks for the pointer. I will hang on for Jokers comments as well and then make a start
Title: Re: Like Posts
Post by: redding99 on April 10, 2014, 11:13:56 AM
Quote from: redding99 on April 10, 2014, 10:53:05 AM
Quote from: MechSpecs on April 10, 2014, 10:40:01 AM
Quote from: redding99 on April 10, 2014, 10:00:42 AM
23.   SimpleSEF    2.1     [ List Files ] [ Delete ]

I would start here first. Looks like this rewrites your URLs into search engine friendly ones, this might be affecting the likes mod.

Thanks for the pointer. I will hang on for Jokers comments as well and then make a start

Actually I found an option to disable the mod and you are right! We now have the Like function working

Thankyou VERY much!!!
Title: Re: Like Posts
Post by: Joker™ on April 10, 2014, 12:26:42 PM
Quote from: redding99 on April 10, 2014, 11:13:56 AM
Actually I found an option to disable the mod and you are right! We now have the Like function working

Thankyou VERY much!!!
Glad you got it all sorted out, but I should try to avoid url rewrite conflicts with other mods.
Title: Re: Like Posts
Post by: someDev on April 12, 2014, 02:52:31 AM
Quote from: ryan_dwight on April 03, 2014, 05:09:40 PM
Quote from: someDev on April 01, 2014, 09:41:42 AM
so i made some simple addon which shows simple stats
http://www.borowicz.info/pub/smf/abStats4LikePosts.zip
where is the stat located?
on your stats page (?action=stats) before daily stats
Title: Re: Like Posts
Post by: ryan_dwight on April 12, 2014, 03:08:23 PM
I can't find it.
Title: Re: Like Posts
Post by: someDev on April 15, 2014, 03:33:59 AM
Quote from: ryan_dwight on April 12, 2014, 03:08:23 PM
I can't find it.

if you are not using default template you should check/update it manually

Title: Re: Like Posts
Post by: ryan_dwight on April 15, 2014, 03:55:36 AM
Quote from: someDev on April 15, 2014, 03:33:59 AM
Quote from: ryan_dwight on April 12, 2014, 03:08:23 PM
I can't find it.

if you are not using default template you should check/update it manually

thank you for your reply but I can't find this
on file Stats.template.php
find line 321:
<br class="clear" />
<div class="flow_hidden">


Title: Re: Like Posts
Post by: someDev on April 15, 2014, 07:50:10 AM
Quote from: ryan_dwight on April 15, 2014, 03:55:36 AM
thank you for your reply but I can't find this
on file Stats.template.php
find line 321:
<br class="clear" />
<div class="flow_hidden">


this tag begins daily stats, but you can place it where ever you want on Stats.template.php
or send more details about your theme, or attach your file
Title: Re: Like Posts
Post by: ryan_dwight on April 15, 2014, 09:31:12 AM
attached the file.

when i tried to change the theme thru my profile using the default theme I found 4 new blocks in the stat page.
one of them has a list of topics with corresponding likes. but there is no titles on this 4 blocks like the default blocks like Top 10 Topics (by Replies) or Top 10 Topics (by Views)

the second block below this is empty but there are number of likes on the right hand part of the block.

the other 2 are totally empty.

all of them have no title.

I am using the black n black theme
Title: Re: Like Posts
Post by: someDev on April 15, 2014, 10:31:38 AM
all queries using {db_prefix}like_post table, can you check how many entries do you have in this table?

Quote from: ryan_dwight on April 15, 2014, 09:31:12 AM
when i tried to change the theme thru
[..]

the other 2 are totally empty.

all of them have no title.

I am using the black n black theme

i didnt make any special translation, just reusing existing strings

anyway
if you want to integrate into your template find line 181 with:

</tr><tr>
<td class="catbg" colspan="4"><strong>', $txt['forum_history'], '</strong></td>
</tr><tr>


and replace

</tr><tr>
<td class="catbg" colspan="4">';

global $sourcedir;
@require_once $sourcedir.'/ab/abstats4likeposts.php';
@abStats4LikePosts();

echo '
</td>
</tr><tr>
<td class="catbg" colspan="4"><strong>', $txt['forum_history'], '</strong></td>
</tr><tr>
Title: Re: Like Posts
Post by: ryan_dwight on April 15, 2014, 11:10:43 AM
Thank you for that, now I found the 4 blocks in the stats but with the same problem as 3 empty blocks with no titles

I have only one Table: smf_like_count with 76 pages by 25 rows.

I am not sure if i gave you what you need. where can i find that?

Title: Re: Like Posts
Post by: someDev on April 16, 2014, 12:57:01 AM
Quote from: ryan_dwight on April 15, 2014, 11:10:43 AM
Thank you for that, now I found the 4 blocks in the stats but with the same problem as 3 empty blocks with no titles

which language are you use?
you can add translation manualny on file abstat4likeposts.php
- most liked post
- last liked post
- top likes receiver (user)
- top likes gaver

Quote from: ryan_dwight on April 15, 2014, 11:10:43 AM
I have only one Table: smf_like_count with 76 pages by 25 rows.

that means you have data and its should work
you can try test sql queries manualy  abstat4likeposts.php
or for test change line 105 and 106
   $likes = abStats4LikePostsGet();
   echo '<pre>',print_r($likes),'</pre>';

Title: Re: Like Posts
Post by: ryan_dwight on April 16, 2014, 05:48:35 AM
I am using english


array()

);

while ($row = $smcFunc['db_fetch_assoc']($q))

{

$likes['r_likes'][] = array(

'link' => '<a href="'.$boardurl.'/index.php?action=profile;u='.$row['id_member'].'">'.$row['poster_name'].'</a>',

'cnt' => $row['cnt'],

);

what part here should i put the code?
Title: Re: Like Posts
Post by: someDev on April 17, 2014, 02:21:05 AM
Quote from: ryan_dwight on April 16, 2014, 05:48:35 AM
I am using english
so description should work,


Quote from: ryan_dwight on April 16, 2014, 05:48:35 AM

array()

);

while ($row = $smcFunc['db_fetch_assoc']($q))
[...]

);

what part here should i put the code?

this loop collect data about people which received likes

if you want to check if script collected data, try to uncoment line 105 on abstats4likeposts.php

echo '<pre>',print_r($likes),'</pre>';

then check stat page
and send me results :)
Title: Re: Like Posts
Post by: ryan_dwight on April 17, 2014, 03:20:58 AM
its not working either

edit: and another thing is a member who hasn't permission to view a certain board can view the titlw of this post on this stat.
Title: Re: Like Posts
Post by: someDev on April 17, 2014, 03:39:14 AM
Quote from: ryan_dwight on April 17, 2014, 03:20:58 AM
its not working either
:(

Quote from: ryan_dwight on April 17, 2014, 03:20:58 AM
edit: and another thing is a member who hasn't permission to view a certain board can view the titlw of this post on this stat.
any who can view stats
my script doesnt check permission, just get data direct
Title: Re: Like Posts
Post by: ryan_dwight on April 17, 2014, 03:43:42 AM
but the other stat depends to the permission right.

that will be a different issue.

any option why the blocks are empty?

thanks
Title: Re: Like Posts
Post by: someDev on April 17, 2014, 04:00:15 AM
Quote from: ryan_dwight on April 17, 2014, 03:43:42 AM
but the other stat depends to the permission right.

that will be a different issue.
ill think about it

Quote from: ryan_dwight on April 17, 2014, 03:43:42 AM
any option why the blocks are empty?

thanks
you meand this two last?
Title: Re: Like Posts
Post by: ryan_dwight on April 17, 2014, 04:12:06 AM
I dont have this as the title of each block
- most liked post
- last liked post
- top likes receiver (user)
- top likes gaver

I only have the most liked post stat but no title. The other 3 blocks are empty.
Title: Re: Like Posts
Post by: someDev on April 17, 2014, 04:35:58 AM
Quote from: ryan_dwight on April 17, 2014, 04:12:06 AM
I only have the most liked post stat but no title. The other 3 blocks are empty.

i have updated mod and i left only:
- most liked posts
- users list which post are liked

and also with your suggestion i added permission check

http://www.borowicz.info/pub/smf/abStats4LikePosts.zip

also i submitted this mod to official http://custom.simplemachines.org/mods/index.php?mod=3859
but this will take a while
Title: Re: Like Posts
Post by: ryan_dwight on April 17, 2014, 11:25:45 AM
I tried your new update but I think the first one is better than this one.

The statpage is incomplete, the last block at the bottom is
Top Topic Starters    Most Time Online

the new registered in monthly and yearly basis is gone.
Title: Re: Like Posts
Post by: ryan_dwight on April 18, 2014, 04:13:43 AM
here's the file

thank you
Title: Re: Like Posts
Post by: Dblog on May 23, 2014, 02:09:51 PM
Is LIKES visibility to guest possible ?
Title: Re: Like Posts
Post by: jlt1 on May 25, 2014, 06:32:08 AM
Is there anyway I can modify the color of the button? Can you point me to it step by step if possible? I need it to be blue to match my forum, if possible.
Title: Re: Like Posts
Post by: Ground Zero on May 26, 2014, 11:35:07 PM
Quote from: jlt1 on May 25, 2014, 06:32:08 AM
Is there anyway I can modify the color of the button? Can you point me to it step by step if possible? I need it to be blue to match my forum, if possible.

You can do this by opening the CSS file of the mod (\Themes\default\css\LikePosts.css) then look for this code below:

.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Replace the background color #C44E19 to match your forum... I've changed mine to blue as well... ;)
Title: Re: Like Posts
Post by: jlt1 on May 30, 2014, 12:55:17 PM
Quote from: Ground Zero on May 26, 2014, 11:35:07 PM
Quote from: jlt1 on May 25, 2014, 06:32:08 AM
Is there anyway I can modify the color of the button? Can you point me to it step by step if possible? I need it to be blue to match my forum, if possible.

You can do this by opening the CSS file of the mod (\Themes\default\css\LikePosts.css) then look for this code below:

.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Replace the background color #C44E19 to match your forum... I've changed mine to blue as well... ;)

Thank you very much! Made my day :)
Title: Re: Like Posts
Post by: Joker™ on May 31, 2014, 02:41:46 PM
Quote from: Cblog on May 23, 2014, 02:09:51 PM
Is LIKES visibility to guest possible ?
Working on the same, link (https://github.com/siddhartha-gupta/SMF-Likes/commits/master)
Title: Re: Like Posts
Post by: Joker™ on June 01, 2014, 10:50:55 AM
Version 1.4 - mod link (http://custom.simplemachines.org/mods/index.php?mod=3708)

Permission added for guests to view likes.
Title: Re: Like Posts
Post by: ryan_dwight on June 01, 2014, 05:05:54 PM
Quote from: Joker™ on June 01, 2014, 10:50:55 AM
Version 1.4 - mod link (http://custom.simplemachines.org/mods/index.php?mod=3708)

Permission added for guests to view likes.
thanks for the update

any news on the stat?
Title: Re: Like Posts
Post by: Joker™ on June 04, 2014, 10:50:15 AM
Quote from: ryan_dwight on June 01, 2014, 05:05:54 PM
Quote from: Joker™ on June 01, 2014, 10:50:55 AM
Version 1.4 - mod link (http://custom.simplemachines.org/mods/index.php?mod=3708)

Permission added for guests to view likes.
thanks for the update

any news on the stat?
Will be working on it, if I get some spare time in the weekend.
Title: Re: Like Posts
Post by: Rob Lightbody on June 05, 2014, 01:51:58 PM
I just installed this into my SMF 2.0.7. forum and it worked a treat, first time, with no fiddling required.
Title: Re: Like Posts
Post by: Joker™ on June 07, 2014, 10:29:45 AM
Quote from: The QE2 Story Forum on June 05, 2014, 01:51:58 PM
I just installed this into my SMF 2.0.7. forum and it worked a treat, first time, with no fiddling required.
Glad it worked out seamlessly for you :)
Title: Re: Like Posts
Post by: Joker™ on June 07, 2014, 12:42:31 PM
While working with stats for like posts here are few fields coming to mind

- Most liked message
- Most liked topic
- Most liked board
- Most likes received by user
- Most likes given by user

Anything you guys/gurlz want to add?
Title: Re: Like Posts
Post by: Biology Forums on June 07, 2014, 01:43:40 PM
Wonderful ^
Title: Re: Like Posts
Post by: Elizabeth II on June 12, 2014, 08:58:15 AM
There is a bug with this, when you like and unlike it within a second, it shows that you've liked that post twice.
Title: Re: Like Posts
Post by: megalukes on June 12, 2014, 12:23:37 PM
Hi there, guys. I'm trying to make the notification button appears on the navbar area. Would that be possible?
I was tying to use some of the parse code on the Subs.php code, but I'm not that good with Javascript commands.
I mean, I was trying to use some of that...
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


...in the Subs.php where you set navbar options like this.

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),


Any help would be great. Thank you!
Title: Re: Like Posts
Post by: Joker™ on June 16, 2014, 10:50:20 AM
Quote from: Britannia360 on June 12, 2014, 08:58:15 AM
There is a bug with this, when you like and unlike it within a second, it shows that you've liked that post twice.
Nice nice, this sounds a bug founded my workplace testing team ;D. Lol, will be rolling out a fix for the same in the next release.


Quote from: megalukes on June 12, 2014, 12:23:37 PM
Hi there, guys. I'm trying to make the notification button appears on the navbar area. Would that be possible?
I was tying to use some of the parse code on the Subs.php code, but I'm not that good with Javascript commands.
I mean, I was trying to use some of that...
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


...in the Subs.php where you set navbar options like this.

'help' => array(
'title' => $txt['help'],
'href' => $scripturl . '?action=help',
'show' => true,
'sub_buttons' => array(
),
),


Any help would be great. Thank you!
Well to accomplish that one needs to edit subs.php and index.template.php. I'll posting some help out code by weekend :).
Title: Re: Like Posts
Post by: bdewong on June 18, 2014, 09:14:59 PM
This mod seems to want to try and load the JS 5 times. That doesn't seem normal. Is there a way to make it only load once?
Title: Re: Like Posts
Post by: Joker™ on June 18, 2014, 09:29:23 PM
Quote from: bdewong on June 18, 2014, 09:14:59 PM
This mod seems to want to try and load the JS 5 times. That doesn't seem normal. Is there a way to make it only load once?
Really :o. BTW, which JS file is it loading multiple time? Will be looking into this one for sure.
Title: Re: Like Posts
Post by: Biology Forums on June 18, 2014, 09:48:07 PM
If a JS file is loaded twice, it doesn't load the second one because the first one is cached - so technically it doesn't matter.
Title: Re: Like Posts
Post by: Joker™ on June 18, 2014, 10:00:28 PM
Quote from: Shuban on June 18, 2014, 09:48:07 PM
If a JS file is loaded twice, it doesn't load the second one because the first one is cached - so technically it doesn't matter.
Not all browsers are that smart :)
Title: Re: Like Posts
Post by: Arantor on June 18, 2014, 10:05:30 PM
If the URLs are the same in each case they generally should be limiting what they have to do provided the server serving those URLs is relatively sane and If-Not-Modified and HTTP 304 are behaving. But that's still roundtrips that should be avoided if possibly.
Title: Re: Like Posts
Post by: bdewong on June 19, 2014, 01:12:37 AM
Quote from: Joker™ on June 18, 2014, 09:29:23 PM
Quote from: bdewong on June 18, 2014, 09:14:59 PM
This mod seems to want to try and load the JS 5 times. That doesn't seem normal. Is there a way to make it only load once?
Really :o. BTW, which JS file is it loading multiple time? Will be looking into this one for sure.

Maybe it's just my install, but this function is being called multiple times: LP_includeAssets()
That lays out all the javascript. I tried tracing the code to see where it was, but couldn't find it. It seems to be only on the actual topic page and not on any of the others.
Title: Re: Like Posts
Post by: Joker™ on June 19, 2014, 09:29:30 AM
Tracked issues over here - https://github.com/siddhartha-gupta/SMF-Likes/issues

If anything is missing please do let me know :)
Title: Re: Like Posts
Post by: Joker™ on June 21, 2014, 11:16:42 AM
And here's a teaser of most liked message stats ;D

Also the stats page has some magical things to it. Will be detailing them out later.

Edit - most liked topic tab also completed ;)
Title: Re: Like Posts
Post by: Dblog on June 22, 2014, 08:33:57 AM
there used to be an option to disable topic likes and those likes being added to topic starter., but that seems to have disappeared in latest version
Title: Re: Like Posts
Post by: Joker™ on June 22, 2014, 10:32:02 AM
Quote from: Cblog on June 22, 2014, 08:33:57 AM
there used to be an option to disable topic likes and those likes being added to topic starter., but that seems to have disappeared in latest version
Umm not sure about what you said above, as the permission system is only enhanced for guests in the latest version, and all previous permissions are still intact.
Title: Re: Like Posts
Post by: Dblog on June 22, 2014, 03:17:37 PM
ok got it.
now just the wording seems to have changed
its now 'Show like button on board index ' which if disabled will stop members from liking topics and those likes being added to topic starter.
i disabled it and now only inidividual posts can be liked
Title: Re: Like Posts
Post by: Stanyy on June 25, 2014, 04:31:52 AM
This mod displays an error for my theme in /Themes/mytheme/index.template.php for the edit
Find:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Replace:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
<li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


The first code does not exist in my theme's index.template.php :(

EDIT: Ignore this. The mod works. Looks like my theme uses most of the default templates as basis.
Title: Re: Like Posts
Post by: Stanyy on June 25, 2014, 05:26:59 AM
Quote from: Britannia360 on June 12, 2014, 08:58:15 AM
There is a bug with this, when you like and unlike it within a second, it shows that you've liked that post twice.

or thrice.. depending on how many times you clicked the button. It seems to only max at three times though.
Yeah, this seems to be my only problem right now... You and 2 others have liked this... hey who's that? oh it's just me. It clears it all up with just one unlike though.

Also, when I do the reverse and unlike twice within a second, it shows an empty bracket beside the like button - Like ().

This is an excellent mod, something i have been looking for for a long time actually. Now I can ditch the sluggish facebook like buttons :)
Title: Re: Like Posts
Post by: bassbass on June 27, 2014, 03:16:50 PM
I want to upgrade from 1.2 to 1.4, do I need to uninstall 1.2 then install 1.4?  if so what happens to the data when I uninstall, does it get deleted from the database?  will "Recount Like stats"  set all to zero or sync the info from database? assuming database records stay in tact.  thanks!
Title: Re: Like Posts
Post by: Joker™ on June 28, 2014, 04:08:18 AM
Quote from: Stanyy on June 25, 2014, 05:26:59 AM
Quote from: Britannia360 on June 12, 2014, 08:58:15 AM
There is a bug with this, when you like and unlike it within a second, it shows that you've liked that post twice.

or thrice.. depending on how many times you clicked the button. It seems to only max at three times though.
Yeah, this seems to be my only problem right now... You and 2 others have liked this... hey who's that? oh it's just me. It clears it all up with just one unlike though.

Also, when I do the reverse and unlike twice within a second, it shows an empty bracket beside the like button - Like ().

This is an excellent mod, something i have been looking for for a long time actually. Now I can ditch the sluggish facebook like buttons :)
Lol, lets kill this fast liking bug ;D. Well the mod is going through a major overhaul

- Cleaning out all the unused code - (Upcoming release)
- Separating out the code into different files for better understanding(PHP/JS) - (future release)
- Making AJAX calls more in sync with JS - (Upcoming release)
- Like posts stats feature in nearly complete, just need to add permission and text strings - (Upcoming release)
- Also trimming down the DB queries - (Upcoming release)


Quote from: bassbass on June 27, 2014, 03:16:50 PM
I want to upgrade from 1.2 to 1.4, do I need to uninstall 1.2 then install 1.4?  if so what happens to the data when I uninstall, does it get deleted from the database?  will "Recount Like stats"  set all to zero or sync the info from database? assuming database records stay in tact.  thanks!
Well you just need to remove the version 1.2 without removing the DB, as while uninstalling the mod there is an option

Remove all data associated with this modification (Make sure this is unchecked). Attached a screen shot for the same.

Now click on uninstall, and once its completed install the latest version. And don't forgot to run the recount like posts thinggy
Title: Re: Like Posts
Post by: Steelio on June 30, 2014, 04:52:32 AM
very cool mod Joker! :) (cool username too lol!)

i was wondering when you're going to release the latest version of this? i was thinking of installing this new feature on my next forum maintenance task

also, is the design of the "Like button" still look like your screenshots here? ( Like in Post (http://custom.simplemachines.org/mods/index.php?action=download;mod=3708;id=222655;image) Like in Forum (http://custom.simplemachines.org/mods/index.php?action=download;mod=3708;id=222661;image) ) if they are, is there a way to tweak this? my current forum theme is green and i was wondering if theres a way to change how it looks

thanks!

~ Steeley

Title: Re: Like Posts
Post by: Joker™ on June 30, 2014, 10:59:33 AM
Quote from: Steelio on June 30, 2014, 04:52:32 AM
very cool mod Joker! :) (cool username too lol!)
Lol thanks :laugh:


Quote from: Steelio on June 30, 2014, 04:52:32 AM
i was wondering when you're going to release the latest version of this? i was thinking of installing this new feature on my next forum maintenance task
Well not before weekend, as these days I'm able to work on SMF things only on weekend. So by looking at the amount of work left, maximum it can be released within 2 weeks.


Quote from: Steelio on June 30, 2014, 04:52:32 AM
also, is the design of the "Like button" still look like your screenshots here? ( Like in Post (http://custom.simplemachines.org/mods/index.php?action=download;mod=3708;id=222655;image) Like in Forum (http://custom.simplemachines.org/mods/index.php?action=download;mod=3708;id=222661;image) ) if they are, is there a way to tweak this? my current forum theme is green and i was wondering if theres a way to change how it looks
Well its just CSS thing, I'll be pointing out the code with the next release, as many users has asked for the same.
Title: Re: Like Posts
Post by: bassbass on June 30, 2014, 12:03:11 PM
thanks for your response Joker.  now I have another issue, se attached pic, I click on the link "Show Likes notification", window pops up but I can't closed no matter what I do unless I refresh the page.  I use IE with or without compatibility mode and still does the same thing.  not sure if its a glitch or not, but it would be good to be able to close the window either by clicking anywhere on the form page or an X button.  thanks!
Title: Re: Like Posts
Post by: Joker™ on July 05, 2014, 02:11:58 PM
Quote from: bassbass on June 30, 2014, 12:03:11 PM
thanks for your response Joker.  now I have another issue, se attached pic, I click on the link "Show Likes notification", window pops up but I can't closed no matter what I do unless I refresh the page.  I use IE with or without compatibility mode and still does the same thing.  not sure if its a glitch or not, but it would be good to be able to close the window either by clicking anywhere on the form page or an X button.  thanks!
Well personally I hate IE most, but as the issue is small I can try to fix it.

In the mean time can you try pressing the 'esc' (escape)  button, as it also closes the popup. Moreover, which version of IE are you using?
Title: Re: Like Posts
Post by: Joker™ on July 05, 2014, 03:47:38 PM
Yupieee, released a newer version which gives access to like stats. How you guyz, girls will like it ;)

bassbass, add a button as well in notification header to close it & you can change the following code in css for button

Themes/theme_you_are_using/css/LikePosts.css
.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Have a nice weekend everyone 8)
Title: Re: Like Posts
Post by: sneakers on July 07, 2014, 04:33:43 PM
Hello,
I have problem with the mod. After installing mod, doesn't show like button in posts. I use Skm night (http://custom.simplemachines.org/themes/index.php?lemma=2325) theme. On the default theme is ok.

Thanks ;)
Title: Re: Like Posts
Post by: Steelio on July 08, 2014, 12:40:21 AM
Quote from: Joker™ on July 05, 2014, 03:47:38 PM
Yupieee, released a newer version which gives access to like stats. How you guyz, girls will like it ;)

bassbass, add a button as well in notification header to close it & you can change the following code in css for button

Themes/theme_you_are_using/css/LikePosts.css
.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Have a nice weekend everyone 8)

oh yay! new update :D

is that the code you mentioned that can change the color of the Like button?
Title: Re: Like Posts
Post by: MechSpecs on July 08, 2014, 09:07:19 PM
Only bugs I have come across so far is that it won't display member avatars if they are selected from pre-set ones on the server...

(http://i57.tinypic.com/34gk5fk.jpg)

User Uploaded avatars display correctly though.

Google Chrome won't allow me to check who liked a specific post "2 users like this post" and when I click? Nothing happens.

Never mind. Chrome works? Weird, musta been a hiccup.

Also, is there a way to move the LIKE STATS button so that it is not the last one in the list? I prefer DONATIONS being in that place.

I looked in Subs.php but couldn't find it having been added to the menu option so it must be somewhere else?
Title: Re: Like Posts
Post by: Steelio on July 11, 2014, 05:12:18 PM
hi Joker, so i'm trying to install your mod now, but im getting this error message instead:

"You cannot download or install new packages because the Packages directory or one of the files in it are not writable" i went into fuller detail on this here http://www.simplemachines.org/community/index.php?topic=525033.0

i was wondering if theres a way to install this without needing to FTP anything to the server? is there something i should tweak before uploading the mod? would really appreciate your help on this  :-\
Title: Re: Like Posts
Post by: MechSpecs on July 11, 2014, 07:45:19 PM
I'm also getting this error


http://www.shipspecs.com/forum/index.php?action=likepostsstats
Apply Filter: Only show the errors with the same message
2: strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string
Apply Filter: Only show the errors from this file
File: /home/shipspecs/www/www/forum/Sources/Subs-LikePosts.php
Line: 777


Not sure if that is related to the new version of 2.0.8 or not.
Title: Re: Like Posts
Post by: ryan_dwight on July 12, 2014, 04:08:00 PM
Quote from: Joker™ on July 05, 2014, 03:47:38 PM
Yupieee, released a newer version which gives access to like stats. How you guyz, girls will like it ;)

bassbass, add a button as well in notification header to close it & you can change the following code in css for button

Themes/theme_you_are_using/css/LikePosts.css
.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Have a nice weekend everyone 8)
thanks for the update but my like stats is empty, I tried using the default smf theme but its the same.
Title: Re: Like Posts
Post by: Joker™ on July 13, 2014, 05:42:20 AM
Quote from: sneakers on July 07, 2014, 04:33:43 PM
Hello,
I have problem with the mod. After installing mod, doesn't show like button in posts. I use Skm night (http://custom.simplemachines.org/themes/index.php?lemma=2325) theme. On the default theme is ok.

Thanks ;)
Make sure while installing the mod Skm night theme is also selected.


Quote from: Steelio on July 08, 2014, 12:40:21 AM
Quote from: Joker™ on July 05, 2014, 03:47:38 PM
Yupieee, released a newer version which gives access to like stats. How you guyz, girls will like it ;)

bassbass, add a button as well in notification header to close it & you can change the following code in css for button

Themes/theme_you_are_using/css/LikePosts.css
.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Have a nice weekend everyone 8)

oh yay! new update :D

is that the code you mentioned that can change the color of the Like button?
Yup, that is the code to change the like button appearance.



Quote from: MechSpecs on July 08, 2014, 09:07:19 PM
Only bugs I have come across so far is that it won't display member avatars if they are selected from pre-set ones on the server...

(http://i57.tinypic.com/34gk5fk.jpg)

User Uploaded avatars display correctly though.
Well, I'm unable to reproduce the error. Try some other browser as well.


Quote from: MechSpecs on July 08, 2014, 09:07:19 PM
Also, is there a way to move the LIKE STATS button so that it is not the last one in the list? I prefer DONATIONS being in that place.

I looked in Subs.php but couldn't find it having been added to the menu option so it must be somewhere else?
Well I usually try to make use of hooks and edit least number of SMF files. So you can play with the things over here

Code (Sources/LikePostsHooks.php) Select

while((list($key, $val) = each($menu_buttons)) && $key != 'logout')

In place of 'logout' try some other button value



Quote from: Steelio on July 11, 2014, 05:12:18 PM
hi Joker, so i'm trying to install your mod now, but im getting this error message instead:

"You cannot download or install new packages because the Packages directory or one of the files in it are not writable" i went into fuller detail on this here http://www.simplemachines.org/community/index.php?topic=525033.0

i was wondering if theres a way to install this without needing to FTP anything to the server? is there something i should tweak before uploading the mod? would really appreciate your help on this  :-\
Are you able to install any other mod?



Quote from: MechSpecs on July 11, 2014, 07:45:19 PM
I'm also getting this error


http://www.shipspecs.com/forum/index.php?action=likepostsstats
Apply Filter: Only show the errors with the same message
2: strpos() [<a href='function.strpos'>function.strpos</a>]: Offset not contained in string
Apply Filter: Only show the errors from this file
File: /home/shipspecs/www/www/forum/Sources/Subs-LikePosts.php
Line: 777


Not sure if that is related to the new version of 2.0.8 or not.
Yeyy, another bug. Wil be fixing it.



Quote from: ryan_dwight on July 12, 2014, 04:08:00 PM
Quote from: Joker™ on July 05, 2014, 03:47:38 PM
Yupieee, released a newer version which gives access to like stats. How you guyz, girls will like it ;)

bassbass, add a button as well in notification header to close it & you can change the following code in css for button

Themes/theme_you_are_using/css/LikePosts.css
.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}


Have a nice weekend everyone 8)
thanks for the update but my like stats is empty, I tried using the default smf theme but its the same.
Are there any likes made so far on your forum?
Title: Re: Like Posts
Post by: ryan_dwight on July 13, 2014, 05:48:22 AM
Before I click the stat I liked two threads but I cant see that in the stat.
Title: Re: Like Posts
Post by: Joker™ on July 13, 2014, 05:54:53 AM
Quote from: ryan_dwight on July 13, 2014, 05:48:22 AM
Before I click the stat I liked two threads but I cant see that in the stat.
What message does it exactly show. A screen shot can do wonders ;)
Title: Re: Like Posts
Post by: ryan_dwight on July 13, 2014, 06:07:55 AM
Black n black theme and the smf default theme.

I tried every category but I got the same(no stats appearing).
Title: Re: Like Posts
Post by: Joker™ on July 13, 2014, 06:11:51 AM
Quote from: ryan_dwight on July 13, 2014, 06:07:55 AM
Black n black theme and the smf default theme.

I tried every category but I got the same(no stats appearing).
Link to the website
Title: Re: Like Posts
Post by: Joker™ on July 13, 2014, 09:17:18 AM
Quote from: ryan_dwight on July 13, 2014, 06:07:55 AM
Black n black theme and the smf default theme.

I tried every category but I got the same(no stats appearing).
It looks like the CSS file related to the mod is not loaded.

I can see a lot of errors coming up due to 'NcodeImageResizer'. Try to disable the related mod and see if the issue persist.
Title: Re: Like Posts
Post by: ryan_dwight on July 14, 2014, 07:40:05 AM
Quote from: Joker™ on July 13, 2014, 09:17:18 AM
Quote from: ryan_dwight on July 13, 2014, 06:07:55 AM
Black n black theme and the smf default theme.

I tried every category but I got the same(no stats appearing).
It looks like the CSS file related to the mod is not loaded.

I can see a lot of errors coming up due to 'NcodeImageResizer'. Try to disable the related mod and see if the issue persist.
I uninstalled the 'NcodeImageResizer' but i got the same results.
Title: Re: Like Posts
Post by: MechSpecs on July 15, 2014, 06:03:38 PM
Quote from: Joker™ on July 13, 2014, 05:42:20 AM

Quote from: MechSpecs on July 08, 2014, 09:07:19 PM
Only bugs I have come across so far is that it won't display member avatars if they are selected from pre-set ones on the server...

(http://i57.tinypic.com/34gk5fk.jpg)

User Uploaded avatars display correctly though.
Well, I'm unable to reproduce the error. Try some other browser as well.

I've tried IE (latest), Chrome (latest) and Firefox (latest)

All three show the exact same way.

Perhaps there was some miscommunication in how I described the bug...

When a user uploads their Avatar this will display fine (the couple that are listed below that show up) however when you try and select an Avatar from the preconfigured ones on the server (you know; where you upload and allow users to select from a bunch that you choose as options?) those are the ones that won't show.
Title: Re: Like Posts
Post by: BubbaCat on July 16, 2014, 05:48:46 PM
This looks like an awesome mod. Great work, Joker. I have a question on converting to your Like Posts. I am currently running smf v 2.0.8 with the GPBP (good post bad post) v2.0.4 mod and have had this mod for over a year. We love that your Like Posts can be used with tapatalk and it is slicker than GPBP.

My question is, can we install Like Posts and somehow retain all the up votes or members have already accumulated?  We only use the up vote feature of that helps, so we would only care about retaining that number, if we lose the link between the up vote and the thread, it doesn't matter to us.

Thanks very much in advance.
Title: Re: Like Posts
Post by: MarkJ on July 18, 2014, 05:27:53 AM
Brilliant mod but I'm having trouble with the 'Show like button on board index'.  It seems to have a mind of it's own.  It appears to only be displaying likes for today and if there are not enough of them it fails to show at all when clicked upon.
Title: Re: Like Posts
Post by: Joker™ on July 19, 2014, 05:46:38 AM
Quote from: ryan_dwight on July 14, 2014, 07:40:05 AM
Quote from: Joker™ on July 13, 2014, 09:17:18 AM
Quote from: ryan_dwight on July 13, 2014, 06:07:55 AM
Black n black theme and the smf default theme.

I tried every category but I got the same(no stats appearing).
It looks like the CSS file related to the mod is not loaded.

I can see a lot of errors coming up due to 'NcodeImageResizer'. Try to disable the related mod and see if the issue persist.
I uninstalled the 'NcodeImageResizer' but i got the same results.
Well, it seems like on stats page due to some other mod jQuery version loaded is 1.4.4 and like posts mod require jQuery higher than 1.8. I'll adding a fix for the same in the next release, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/16)
Title: Re: Like Posts
Post by: Joker™ on July 19, 2014, 05:53:54 AM
Quote from: MechSpecs on July 15, 2014, 06:03:38 PM
I've tried IE (latest), Chrome (latest) and Firefox (latest)

All three show the exact same way.

Perhaps there was some miscommunication in how I described the bug...

When a user uploads their Avatar this will display fine (the couple that are listed below that show up) however when you try and select an Avatar from the preconfigured ones on the server (you know; where you upload and allow users to select from a bunch that you choose as options?) those are the ones that won't show.
Provide me a link to the website and in the mean time set up a fresh forum and see if the issue comes up. Actually, I'm still not able to reproduce the issue, so it seems this one is going to require some nice amount of debugging.
Title: Re: Like Posts
Post by: Joker™ on July 19, 2014, 05:56:52 AM
Quote from: BubbaCat on July 16, 2014, 05:48:46 PM
This looks like an awesome mod. Great work, Joker. I have a question on converting to your Like Posts. I am currently running smf v 2.0.8 with the GPBP (good post bad post) v2.0.4 mod and have had this mod for over a year. We love that your Like Posts can be used with tapatalk and it is slicker than GPBP.

My question is, can we install Like Posts and somehow retain all the up votes or members have already accumulated?  We only use the up vote feature of that helps, so we would only care about retaining that number, if we lose the link between the up vote and the thread, it doesn't matter to us.

Thanks very much in advance.
Well this seems to be quite an unusual request :P. If, I get some spare time and crazy mood, I'll surely write up the converter for you, but no promises ;).
Title: Re: Like Posts
Post by: Joker™ on July 19, 2014, 05:57:50 AM
Quote from: MarkJ on July 18, 2014, 05:27:53 AM
Brilliant mod but I'm having trouble with the 'Show like button on board index'.  It seems to have a mind of it's own.  It appears to only be displaying likes for today and if there are not enough of them it fails to show at all when clicked upon.
You mean content doesn't scroll? PM me the site link with a test account.
Title: Re: Like Posts
Post by: MarkJ on July 20, 2014, 05:47:26 AM
Quote from: Joker™ on July 19, 2014, 05:57:50 AM
Quote from: MarkJ on July 18, 2014, 05:27:53 AM
Brilliant mod but I'm having trouble with the 'Show like button on board index'.  It seems to have a mind of it's own.  It appears to only be displaying likes for today and if there are not enough of them it fails to show at all when clicked upon.
You mean content doesn't scroll? PM me the site link with a test account.

Seems to have settled down now and working OK.  Must be something I had done as I'm carrying out quite a bit of work at the moment.
Title: Re: Like Posts
Post by: Joker™ on July 20, 2014, 07:24:00 AM
Quote from: MarkJ on July 20, 2014, 05:47:26 AM
Quote from: Joker™ on July 19, 2014, 05:57:50 AM
Quote from: MarkJ on July 18, 2014, 05:27:53 AM
Brilliant mod but I'm having trouble with the 'Show like button on board index'.  It seems to have a mind of it's own.  It appears to only be displaying likes for today and if there are not enough of them it fails to show at all when clicked upon.
You mean content doesn't scroll? PM me the site link with a test account.

Seems to have settled down now and working OK.  Must be something I had done as I'm carrying out quite a bit of work at the moment.
Nice. Keep pouring the ideas and pointing out the bugs :)
Title: Re: Like Posts
Post by: Joker™ on July 20, 2014, 10:55:09 AM
New mod version release for following bugs

- Much better handling for jQuery loading
- Like posts info section scrolling and height fixes
- Fixes for strpos error

Please update to latest version.
Title: Re: Like Posts
Post by: MechSpecs on July 20, 2014, 11:42:07 AM
Uninstalled the old one
Installed the new one

Looks like it wipes the count stats from the old one?

Let me rephrase that. The counts are still on individual pages but the LIKE STATS page doesn't show anything after the new version.
Title: Re: Like Posts
Post by: Joker™ on July 20, 2014, 10:02:21 PM
Quote from: MechSpecs on July 20, 2014, 11:42:07 AM
Uninstalled the old one
Installed the new one

Looks like it wipes the count stats from the old one?

Let me rephrase that. The counts are still on individual pages but the LIKE STATS page doesn't show anything after the new version.
Well I can see the like stats on your forum, and even found the reason behind the avatar bug(folder named with spaces). For avatars, it'll be fixed in next release.
Title: Re: Like Posts
Post by: MechSpecs on July 21, 2014, 10:14:46 PM
Yeah I made a dummy account to test...

I can see the LIKE STATS in Chrome but not Firefox or IE. The old version I was able to get it to work in all three. So there is another bit of trouble shootin for ya :)

Title: Re: Like Posts
Post by: meemzo on July 23, 2014, 02:28:11 AM
I installed mod but when I click the Like button across multiple browsers nothing happens.  I have the latest version of SMF.
Title: Re: Like Posts
Post by: Steelio on July 23, 2014, 04:48:36 AM
Quote from: Joker™ on July 13, 2014, 05:42:20 AM

Quote from: Steelio on July 11, 2014, 05:12:18 PM
hi Joker, so i'm trying to install your mod now, but im getting this error message instead:

"You cannot download or install new packages because the Packages directory or one of the files in it are not writable" i went into fuller detail on this here http://www.simplemachines.org/community/index.php?topic=525033.0

i was wondering if theres a way to install this without needing to FTP anything to the server? is there something i should tweak before uploading the mod? would really appreciate your help on this  :-\
Are you able to install any other mod?

yes i can, but there are some mods that just wont install (one of it is this one).

my co-admin tried installing the mod under her profile and the site broke :-[ (yeah that wasnt a good day to say the least).

i'm trying to tackle this another way... is there a way for me to install your Mod manually? im trying to see if using Filezilla will work better for me. but then i need instructions on which codes and folders goes where after extracting the latest package.
Title: Re: Like Posts
Post by: Joker™ on July 23, 2014, 11:26:31 AM
Quote from: MechSpecs on July 21, 2014, 10:14:46 PM
Yeah I made a dummy account to test...

I can see the LIKE STATS in Chrome but not Firefox or IE. The old version I was able to get it to work in all three. So there is another bit of trouble shootin for ya :)


Thanks for the info. Issues fixed and new version is released.


Quote from: mosomojo on July 23, 2014, 02:28:11 AM
I installed mod but when I click the Like button across multiple browsers nothing happens.  I have the latest version of SMF.
PM me the website link and test account.


Quote from: Steelio on July 23, 2014, 04:48:36 AM
yes i can, but there are some mods that just wont install (one of it is this one).

my co-admin tried installing the mod under her profile and the site broke :-[ (yeah that wasnt a good day to say the least).

i'm trying to tackle this another way... is there a way for me to install your Mod manually? im trying to see if using Filezilla will work better for me. but then i need instructions on which codes and folders goes where after extracting the latest package.
Make backup before you do anything
Manual installation of mods (http://wiki.simplemachines.org/smf/Packages_-_How_to_upload_packages_using_FTP)
Title: Re: Like Posts
Post by: BubbaCat on July 25, 2014, 02:22:56 AM
Quote from: Joker™ on July 19, 2014, 05:56:52 AM
Quote from: BubbaCat on July 16, 2014, 05:48:46 PM
This looks like an awesome mod. Great work, Joker. I have a question on converting to your Like Posts. I am currently running smf v 2.0.8 with the GPBP (good post bad post) v2.0.4 mod and have had this mod for over a year. We love that your Like Posts can be used with tapatalk and it is slicker than GPBP.

My question is, can we install Like Posts and somehow retain all the up votes or members have already accumulated?  We only use the up vote feature of that helps, so we would only care about retaining that number, if we lose the link between the up vote and the thread, it doesn't matter to us.

Thanks very much in advance.
Well this seems to be quite an unusual request :P. If, I get some spare time and crazy mood, I'll surely write up the converter for you, but no promises ;).

That would be awesome!  We actually only have the good post (aka +1 arrow) feature enabled. We do not currently allow down voting, so we would tally only need the one field converted.

Please let me know if you decide to do this and thanks very, very much for your awesome mod. Take care.
Title: Re: Like Posts
Post by: M4R1O on July 25, 2014, 05:16:38 PM
This is very cool mod, working without problems on 2.0.8, tested with chrome and FF... cheers  8)
Title: Re: Like Posts
Post by: lawr on July 26, 2014, 12:38:36 PM
Hello,

I am interested in your "Like Posts" mod but as you know in SMF 2.1 liking posts will be a default in-built feature. If I use this mod on SMF 2.0.8 and then upgrade to 2.1 the mod will no longer work, and I'd rather use the "proper" in-built likes system in 2.1. I am wondering, are you able to create a conversion script for people to use?

Thanks in advance for reply.
Title: Re: Like Posts
Post by: sneakers on July 26, 2014, 04:06:16 PM
Quote from: Joker™ on July 13, 2014, 05:42:20 AM
Quote from: sneakers on July 07, 2014, 04:33:43 PM
Hello,
I have problem with the mod. After installing mod, doesn't show like button in posts. I use Skm night (http://custom.simplemachines.org/themes/index.php?lemma=2325) theme. On the default theme is ok.

Thanks ;)
Make sure while installing the mod Skm night theme is also selected.

I did so, but it still doesn't show up like button.
Title: Re: Like Posts
Post by: johndays on July 26, 2014, 06:48:33 PM
I would like to thanks the author of this mod, is very nice and very useful nowadays. One question : I am the only one having problems when the user or post has special characters?

Example :

(http://i58.tinypic.com/2ptv15i.png)

Sorry if this is already a mentioned issue!
Title: Re: Like Posts
Post by: Joker™ on July 27, 2014, 02:35:01 AM
Quote from: BubbaCat on July 25, 2014, 02:22:56 AM
That would be awesome!  We actually only have the good post (aka +1 arrow) feature enabled. We do not currently allow down voting, so we would tally only need the one field converted.

Please let me know if you decide to do this and thanks very, very much for your awesome mod. Take care.
Well I've placed some thought on it yesterday, and it looks pretty easy to convert from gpbp to like posts.


Quote from: M4R1O on July 25, 2014, 05:16:38 PM
This is very cool mod, working without problems on 2.0.8, tested with chrome and FF... cheers  8)
Nice nice...


Quote from: lawr on July 26, 2014, 12:38:36 PM
Hello,

I am interested in your "Like Posts" mod but as you know in SMF 2.1 liking posts will be a default in-built feature. If I use this mod on SMF 2.0.8 and then upgrade to 2.1 the mod will no longer work, and I'd rather use the "proper" in-built likes system in 2.1. I am wondering, are you able to create a conversion script for people to use?

Thanks in advance for reply.
Hi lawr,

As 2.1 stable version (even RC version) isn't released yet, hence no such compatibility amendments made in the mod so far for 2.1. Currently I've no motivation to provide a converter from my mod to SMF 2.1 like system. I'll surely be making this mod compatible with 2.1 once its released.


Quote from: sneakers on July 26, 2014, 04:06:16 PM
Quote from: Joker™ on July 13, 2014, 05:42:20 AM
Quote from: sneakers on July 07, 2014, 04:33:43 PM
Hello,
I have problem with the mod. After installing mod, doesn't show like button in posts. I use Skm night (http://custom.simplemachines.org/themes/index.php?lemma=2325) theme. On the default theme is ok.

Thanks ;)
Make sure while installing the mod Skm night theme is also selected.

I did so, but it still doesn't show up like button.
Well it seems like for some reason mod edits aren't made to the theme. Make backup of files before editing them
Check if required theme templates are made mod edits (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=233658;smf_version=2.0.8)


Quote from: johndays on July 26, 2014, 06:48:33 PM
I would like to thanks the author of this mod, is very nice and very useful nowadays. One question : I am the only one having problems when the user or post has special characters?

Example :

(http://i58.tinypic.com/2ptv15i.png)

Sorry if this is already a mentioned issue!
Thanks for the nice words. Well can you post the special chars you have used?
Title: Re: Like Posts
Post by: lawr on July 27, 2014, 05:53:55 AM
But why would someone use a mod for a likes system when it is built in already in 2.1? This is why I was wondering about a converter.
Title: Re: Like Posts
Post by: johndays on July 27, 2014, 07:14:17 AM
Thank you for your continuous feedback.

@Joker™

Some samples :

João (ã)
Informação (ç and ã)

At least this 2.

Best regards,
Title: Re: Like Posts
Post by: Joker™ on July 27, 2014, 08:35:21 AM
Quote from: lawr on July 27, 2014, 05:53:55 AM
But why would someone use a mod for a likes system when it is built in already in 2.1? This is why I was wondering about a converter.
Karma system is there in 2.0, still there are mods like 'Good post bad post', 'Advance Reputation system' & 'Like Posts'. Why? Because the core functionality can't provide you with everything, but in a mod, one can add/remove the code as per needs.

Truly, its up to you guys about which system you want to use in SMF 2.1, but a few posts ago only, a user has asked me whether I can write a converter to convert the 'Good post bad post' data to 'Like posts'. So, you should be asking SMF team for a converter to convert data from like posts mod to there like system.


Quote from: johndays on July 27, 2014, 07:14:17 AM
Thank you for your continuous feedback.

@Joker™

Some samples :

João (ã)
Informação (ç and ã)

At least this 2.

Best regards,
Thanks for the info, will be trying it out soon.
Title: Re: Like Posts
Post by: johndays on July 27, 2014, 09:00:30 AM
Ok, thank you very much, I will be looking forward for your feedback.

Good job!
Title: Re: Like Posts
Post by: Arantor on July 27, 2014, 09:05:38 AM
Why should the team be responsible for supporting mods, exactly? The point being made is that 2.1 supports likes - but it's not SMF's responsibility to import likes from the various like mods that are out there. If you want to offer a converter, that's up to you.
Title: Re: Like Posts
Post by: MechSpecs on July 27, 2014, 11:13:46 AM
Quote from: ‽ on July 27, 2014, 09:05:38 AM
Why should the team be responsible for supporting mods, exactly? The point being made is that 2.1 supports likes - but it's not SMF's responsibility to import likes from the various like mods that are out there. If you want to offer a converter, that's up to you.

I think the answer to that is easy; 2.1 supports Likes... Great... for users that will be using 2.1. For those who won't upgrade, whether because their site themes aren't compatible or whether its because they have 100k posts or whether they just don't feel like messing with an upgrade or not, then this mod will definitely come in handy as it adds the functionality without a major overhaul.

Scalpel versus Sledgehammer approach.
Title: Re: Like Posts
Post by: Arantor on July 27, 2014, 11:18:17 AM
That's not the point I'm getting at. Yes, this mod will be fine for those who remain on 2.0. However, for those that upgrade, using a mod leaves them out in the cold - and people are suggesting that the team should fix that for all possible permutations, which really isn't the team's responsibility.
Title: Re: Like Posts
Post by: MechSpecs on July 27, 2014, 07:22:12 PM
Quote from: ‽ on July 27, 2014, 11:18:17 AM
That's not the point I'm getting at. Yes, this mod will be fine for those who remain on 2.0. However, for those that upgrade, using a mod leaves them out in the cold - and people are suggesting that the team should fix that for all possible permutations, which really isn't the team's responsibility.

Ok fair point.

The TEAM should not fix it. The mod author, if he so chooses, should fix it.

Saying the team should fix it is like saying GM should fix every car adapter plugin for the iPhone.
Title: Re: Like Posts
Post by: MaryLouW on July 28, 2014, 04:14:41 AM
Great mod!!!  How can I change the color of the button from red to blue? 
Title: Re: Like Posts
Post by: M4R1O on July 28, 2014, 04:46:07 AM
Quote from: MaryLouW on July 28, 2014, 04:14:41 AM
Great mod!!!  How can I change the color of the button from red to blue?

the same question here...
Title: Re: Like Posts
Post by: Joker™ on July 28, 2014, 09:14:53 AM
Quote from: MaryLouW on July 28, 2014, 04:14:41 AM
Great mod!!!  How can I change the color of the button from red to blue? 

Quote from: M4R1O on July 28, 2014, 04:46:07 AM
Quote from: MaryLouW on July 28, 2014, 04:14:41 AM
Great mod!!!  How can I change the color of the button from red to blue?

the same question here...

Themes/default_theme/css/LikePosts.css (make backup of file before editing it)
Code (Make changes in background/color, as per your liking) Select

.like_unlike_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;
}



#To everyone
Have I said anywhere about this mod is going or not to support 2.1? Currently, my motivation towards SMF is pretty low, so a few more baseless posts, can force me to do something pretty foolish :)
Title: Re: Like Posts
Post by: Arantor on July 28, 2014, 09:19:55 AM
You said yourself you would make the mod compatible with 2.1 once released.

As for the team, I'm sorry, I have to disagree with you that it is the team's responsibility to provide a converter for all the disparate like mods just because 2.1 has it built in, especially as what 2.1 provides is not specific to messages but potentially any content, it was written to be as generic as possible.
Title: Re: Like Posts
Post by: ryan_dwight on July 28, 2014, 12:18:35 PM
Is there any option to disable the like one the smf 2,1 and continue using this mod instead?

Because the thing is our members has already accumulated thousands of likes and they earned it. Going back to zero will be a frustration to them.
Title: Re: Like Posts
Post by: Arantor on July 28, 2014, 12:20:48 PM
The mod would have to support doing that which is even more work than having an importer.
Title: Re: Like Posts
Post by: MaryLouW on July 28, 2014, 03:17:58 PM
Thank you!!! Works like a charm... I now have a nice blue Like button!!!
Title: Re: Like Posts
Post by: MechSpecs on July 28, 2014, 06:16:41 PM
If I can make a suggestion Joker...

Split the LIKE/UNLIKE button CSS entry in to two different ones

Have a LIKE entry and an UNLIKE entry; this way people can differentiate between colors or image backgrounds depending on of it is a like or an unlike option.
Title: Re: Like Posts
Post by: MaryLouW on July 28, 2014, 06:23:18 PM
One more question.  Could the color code be replaced with an image such as a thumbs up or down?  Not that I want to do that right now, but it's becoming far more popular throughout the net than the Like button.  Most of the news comment sections and YouTube use the thumbs up and down instead of the words. 
Title: Re: Like Posts
Post by: MechSpecs on July 28, 2014, 10:33:41 PM
Quote from: MaryLouW on July 28, 2014, 06:23:18 PM
One more question.  Could the color code be replaced with an image such as a thumbs up or down?  Not that I want to do that right now, but it's becoming far more popular throughout the net than the Like button.  Most of the news comment sections and YouTube use the thumbs up and down instead of the words.

This can easily be done if the CSS is split in two. You can have a background image with a thumbup and a thumbdown beside the word. Code would look something like...


.LikeButton {
    background: url('https://blahblahblah.com/like_button.png') no-repeat scroll left top #7B96BB;
    border: 1px solid #7B96BB;
}



.UnLikeButton {
    background: url('https://blahblahblah.com/unlike_button.png') no-repeat scroll left top #7B96BB;
    border: 1px solid #7B96BB;
}


This way you could set a bar with a thumb-down behind the word or a thumb-up behind the word, change the colors of each etc. etc.
Title: Re: Like Posts
Post by: MaryLouW on July 29, 2014, 01:29:13 AM
Thanks so much!!!  I have copied and pasted this info for safe keeping.  Since I just installed it last night, I want to wait a few days and let people get used to it, then I'll change it to a graphic.  We are a graphic forum so that will better suit our community.

Appreciate the help!!!
Title: Re: Like Posts
Post by: Joker™ on July 29, 2014, 09:59:21 AM
Quote from: MechSpecs on July 28, 2014, 06:16:41 PM
If I can make a suggestion Joker...

Split the LIKE/UNLIKE button CSS entry in to two different ones

Have a LIKE entry and an UNLIKE entry; this way people can differentiate between colors or image backgrounds depending on of it is a like or an unlike option.
Will keep that in mind for next version.


Quote from: MaryLouW on July 28, 2014, 06:23:18 PM
One more question.  Could the color code be replaced with an image such as a thumbs up or down?  Not that I want to do that right now, but it's becoming far more popular throughout the net than the Like button.  Most of the news comment sections and YouTube use the thumbs up and down instead of the words. 
Ahh, I'm not a fan of graphics. But, it seems like MechSpecs solution can help you out.
Title: Re: Like Posts
Post by: MechSpecs on July 29, 2014, 11:26:43 PM
Quote from: MaryLouW on July 29, 2014, 01:29:13 AM
Thanks so much!!!  I have copied and pasted this info for safe keeping.  Since I just installed it last night, I want to wait a few days and let people get used to it, then I'll change it to a graphic.  We are a graphic forum so that will better suit our community.

Appreciate the help!!!

My method would only work if he has both a like and an unlike call in the CSS. Right now it is only using one so you would only be able to have one graphic image. If he does split it in future versions then you could use different background images with words on top of them or even without any words at all.
Title: Re: Like Posts
Post by: MaryLouW on July 29, 2014, 11:30:30 PM
Thanks again.  Will just have to be patient.  Since we are all graphic artists on my forum, we like our graphics!  The more the merrier!
Title: Re: Like Posts
Post by: MaryLouW on July 30, 2014, 04:20:06 PM
I thought I was finished with asking questions but I have one more.  See the attachement.
Title: Re: Like Posts
Post by: jriani on July 30, 2014, 05:55:57 PM
What script is responsible for putting the "Like posts" link on the menu? I would like to edit the button text if possible.
Title: Re: Like Posts
Post by: valpo04 on August 01, 2014, 10:40:23 AM
Hello,

I am trying to uninstall version 1.3.1 of this mod to update to the latest version, but I am getting "Test Failed" on the modification of Load.php:

Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="like_unlike_link" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo('can_view_likes'))
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';

echo '
</div>';
}


Replace:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';


I have checked my Load.php file and find no code that matches anything in the (Find) or even the (Replace) code box. Any ideas?

The mod is currently installed and is working.
Title: Re: Like Posts
Post by: Joker™ on August 02, 2014, 12:53:15 PM
Lol too many requests all of a sudden :P.

Quote from: MaryLouW on July 30, 2014, 04:20:06 PM
I thought I was finished with asking questions but I have one more.  See the attachement.
I've created separate classes for like/unlike button in upcoming version. With that you'll be able to style like/unlike easily as per your preferences. For capital you can add the css property in the 'like_unlike_link' class

Themes/default/css/LikePosts.css]text-transform: uppercase;
Title: Re: Like Posts
Post by: Joker™ on August 02, 2014, 12:53:47 PM
Quote from: jriani on July 30, 2014, 05:55:57 PM
What script is responsible for putting the "Like posts" link on the menu? I would like to edit the button text if possible.
Which menu are you referring over here?
Title: Re: Like Posts
Post by: Joker™ on August 02, 2014, 12:56:05 PM
Quote from: valpo04 on August 01, 2014, 10:40:23 AM
Hello,

I am trying to uninstall version 1.3.1 of this mod to update to the latest version, but I am getting "Test Failed" on the modification of Load.php:

Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="like_unlike_link" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo('can_view_likes'))
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';

echo '
</div>';
}


Replace:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';


I have checked my Load.php file and find no code that matches anything in the (Find) or even the (Replace) code box. Any ideas?

The mod is currently installed and is working.
Correct me if I'm wrong, this edit is made for 'MessageIndex.template.php' only.
Title: Re: Like Posts
Post by: MechSpecs on August 02, 2014, 01:28:09 PM
Quote from: Joker™ on August 02, 2014, 12:53:47 PM
Quote from: jriani on July 30, 2014, 05:55:57 PM
What script is responsible for putting the "Like posts" link on the menu? I would like to edit the button text if possible.
Which menu are you referring over here?

I think he is talking about Subs.php or wherever Likes dumps in the "LIKE STATS" nav option.
Title: Re: Like Posts
Post by: valpo04 on August 02, 2014, 02:19:52 PM
Quote from: Joker™ on August 02, 2014, 12:56:05 PM
Quote from: valpo04 on August 01, 2014, 10:40:23 AM
Hello,

I am trying to uninstall version 1.3.1 of this mod to update to the latest version, but I am getting "Test Failed" on the modification of Load.php:

Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="like_unlike_link" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo('can_view_likes'))
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';

echo '
</div>';
}


Replace:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';


I have checked my Load.php file and find no code that matches anything in the (Find) or even the (Replace) code box. Any ideas?

The mod is currently installed and is working.
Correct me if I'm wrong, this edit is made for 'MessageIndex.template.php' only.

The uninstall test shows it making the modification on Load.php.

It is the only test that fails so maybe it makes sense that this edit is for MessageIndex.template.php.

Not sure why it is attempting to make the edit on Load.php.
Title: Re: Like Posts
Post by: Joker™ on August 02, 2014, 02:20:15 PM
Quote from: MechSpecs on August 02, 2014, 01:28:09 PM
Quote from: Joker™ on August 02, 2014, 12:53:47 PM
Quote from: jriani on July 30, 2014, 05:55:57 PM
What script is responsible for putting the "Like posts" link on the menu? I would like to edit the button text if possible.
Which menu are you referring over here?

I think he is talking about Subs.php or wherever Likes dumps in the "LIKE STATS" nav option.
But that option says 'Like stats', not 'Like Posts' :)
Title: Re: Like Posts
Post by: Joker™ on August 02, 2014, 02:20:46 PM
Quote from: valpo04 on August 02, 2014, 02:19:52 PM
Quote from: Joker™ on August 02, 2014, 12:56:05 PM
Quote from: valpo04 on August 01, 2014, 10:40:23 AM
Hello,

I am trying to uninstall version 1.3.1 of this mod to update to the latest version, but I am getting "Test Failed" on the modification of Load.php:

Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="like_unlike_link" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo('can_view_likes'))
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';

echo '
</div>';
}


Replace:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';


I have checked my Load.php file and find no code that matches anything in the (Find) or even the (Replace) code box. Any ideas?

The mod is currently installed and is working.
Correct me if I'm wrong, this edit is made for 'MessageIndex.template.php' only.

The uninstall test shows it making the modification on Load.php.

It is the only test that fails so maybe it makes sense that this edit is for MessageIndex.template.php.

Not sure why it is attempting to make the edit on Load.php.
Will try to see the issue in more detail and get back to you.
Title: Re: Like Posts
Post by: MaryLouW on August 02, 2014, 03:45:12 PM
Quote from: Joker™ on August 02, 2014, 12:53:15 PM
Lol too many requests all of a sudden :P.

Quote from: MaryLouW on July 30, 2014, 04:20:06 PM
I thought I was finished with asking questions but I have one more.  See the attachement.
I've created separate classes for like/unlike button in upcoming version. With that you'll be able to style like/unlike easily as per your preferences. For capital you can add the css property in the 'like_unlike_link' class

Themes/default/css/LikePosts.css]text-transform: uppercase;

Thank you again!!  It looks perfect now!  Looking forward to the next version too. :)
Title: Re: Like Posts
Post by: Joker™ on August 03, 2014, 09:39:59 AM
Quote from: valpo04 on August 02, 2014, 02:19:52 PM
The uninstall test shows it making the modification on Load.php.

It is the only test that fails so maybe it makes sense that this edit is for MessageIndex.template.php.

Not sure why it is attempting to make the edit on Load.php.
Ok, I wasn't able to reproduce the error. You can try the following things
Make backup of your files before trying this
Also make backup of your package zip file

Upload and replace the attached zip file to the 'Packages' folder using FTP and see if you are able to uninstall the mod easily.
Title: Re: Like Posts
Post by: valpo04 on August 04, 2014, 07:51:24 AM
Quote from: Joker™ on August 03, 2014, 09:39:59 AM
Quote from: valpo04 on August 02, 2014, 02:19:52 PM
The uninstall test shows it making the modification on Load.php.

It is the only test that fails so maybe it makes sense that this edit is for MessageIndex.template.php.

Not sure why it is attempting to make the edit on Load.php.
Ok, I wasn't able to reproduce the error. You can try the following things
Make backup of your files before trying this
Also make backup of your package zip file

Upload and replace the attached zip file to the 'Packages' folder using FTP and see if you are able to uninstall the mod easily.

Thanks for this, Joker.

Unfortunately, I uploaded this file and then tried to uninstall and received the same error.

I also just checked the modification for 'MessageIndex.template.php' and it differs from the modification for 'Load.php.'

Here is the mod for Message.template.php:

Find:
if(!empty($modSettings['like_post_enable']) && LP_isAllowedTo('can_view_likes')) {
$total_likes = isset($context['like_posts']['posters_data'][$message['member']['id']]) ? $context['like_posts']['posters_data'][$message['member']['id']] : 0;

echo '
<li class="postcount"><a href="', $scripturl ,'?action=profile;area=likeposts;sa=seeotherslikes;u=', $message['member']['id'], '">', $txt['like_post_total_likes'] . ': ' . $total_likes, '</a></li>';
}

// Is karma display enabled?  Total or +/-?


Replace:
// Is karma display enabled?  Total or +/-?



Compared to the mod for Load.php:

Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="like_unlike_link" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo('can_view_likes'))
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';

echo '
</div>';
}


Replace:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
Title: Re: Like Posts
Post by: Beelzeboss on August 09, 2014, 06:53:36 PM
Dear Joker, there is an issue in versions 1.5 & 1.5.2 when you want to show the 'likes notification" from a smartphone browser (stock android browser and chrome). Actually, you can't see the latest likes from a smartphone. This issue was not in version 1.3.1. (I didn't test 1.4.)

Quote from: Joker™ on August 02, 2014, 12:53:15 PM
I've created separate classes for like/unlike button in upcoming version. With that you'll be able to style like/unlike easily as per your preferences.

Could you do that optional for someone who wants as it is now?

Thank you.
Title: Re: Like Posts
Post by: Joker™ on August 10, 2014, 07:34:26 AM
Quote from: valpo04 on August 04, 2014, 07:51:24 AM
Thanks for this, Joker.

Unfortunately, I uploaded this file and then tried to uninstall and received the same error.

I also just checked the modification for 'MessageIndex.template.php' and it differs from the modification for 'Load.php.'

Here is the mod for Message.template.php:

Find:
if(!empty($modSettings['like_post_enable']) && LP_isAllowedTo('can_view_likes')) {
$total_likes = isset($context['like_posts']['posters_data'][$message['member']['id']]) ? $context['like_posts']['posters_data'][$message['member']['id']] : 0;

echo '
<li class="postcount"><a href="', $scripturl ,'?action=profile;area=likeposts;sa=seeotherslikes;u=', $message['member']['id'], '">', $txt['like_post_total_likes'] . ': ' . $total_likes, '</a></li>';
}

// Is karma display enabled?  Total or +/-?


Replace:
// Is karma display enabled?  Total or +/-?



Compared to the mod for Load.php:

Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="like_unlike_link" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo('can_view_likes'))
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';

echo '
</div>';
}


Replace:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
Well you can take a hard step. It's your call,

Uninstall the mod(even with errors), and see if all the edits are removed across all files. If any edit related to the mod is left, you can remove it manually.
Title: Re: Like Posts
Post by: Joker™ on August 10, 2014, 07:37:15 AM
Quote from: Beelzeboss on August 09, 2014, 06:53:36 PM
Dear Joker, there is an issue in versions 1.5 & 1.5.2 when you want to show the 'likes notification" from a smartphone browser (stock android browser and chrome). Actually, you can't see the latest likes from a smartphone. This issue was not in version 1.3.1. (I didn't test 1.4.)
Will see to it, thanks for the info.


Quote from: Beelzeboss on August 09, 2014, 06:53:36 PM
Quote from: Joker™ on August 02, 2014, 12:53:15 PM
I've created separate classes for like/unlike button in upcoming version. With that you'll be able to style like/unlike easily as per your preferences.
Could you do that optional for someone who wants as it is now?

Thank you.
Well the mod code is on github, anyone can take it from there, but it's untested and I'd highly unrecommend against it. Once I feel its stable there will be a new mod version released.
Title: Re: Like Posts
Post by: elf_fu on August 11, 2014, 11:12:28 AM
I've been wanting to use a Likes mod on my forum for about a year. Due to my limited knowledge in coding, issues and so on--I've never been able to find a mod that worked with our theme, forum, etc.

I just want to say THANK YOU for this mod! I backed up everything an hour ago, downloaded, ran a test check--which came out clean as a whistle, no errors, despite having a lot of extra mods--installed it and voila. Worked right out of the mod box, so to speak. (My forum is version 2.0.8.)

Thanks to members in this post as well as the mod creators answered, it was super easy to find the  .css too, to tweak colors.

Thank you! This mod is perfect for us!
Title: Re: Like Posts
Post by: johndays on August 14, 2014, 04:15:04 PM
Quote from: johndays on July 27, 2014, 07:14:17 AM
Thank you for your continuous feedback.

@Joker™

Some samples :

João (ã)
Informação (ç and ã)

At least this 2.

Best regards,
Quote from: Joker™Thanks for the info, will be trying it out soon.

There is some update? Thank you so much in advance.
Title: Re: Like Posts
Post by: Joker™ on August 17, 2014, 10:27:58 AM
Quote from: elf_fu on August 11, 2014, 11:12:28 AM
I've been wanting to use a Likes mod on my forum for about a year. Due to my limited knowledge in coding, issues and so on--I've never been able to find a mod that worked with our theme, forum, etc.

I just want to say THANK YOU for this mod! I backed up everything an hour ago, downloaded, ran a test check--which came out clean as a whistle, no errors, despite having a lot of extra mods--installed it and voila. Worked right out of the mod box, so to speak. (My forum is version 2.0.8.)

Thanks to members in this post as well as the mod creators answered, it was super easy to find the  .css too, to tweak colors.

Thank you! This mod is perfect for us!
Thanks for such kind words :)


Quote from: johndays on August 14, 2014, 04:15:04 PM
Quote from: johndays on July 27, 2014, 07:14:17 AM
Thank you for your continuous feedback.

@Joker™

Some samples :

João (ã)
Informação (ç and ã)

At least this 2.

Best regards,
Quote from: Joker™Thanks for the info, will be trying it out soon.

There is some update? Thank you so much in advance.
Nope, I was having some break, and went on holidays. Lol, real world isn't that bad :P
Title: Re: Like Posts
Post by: johndays on August 19, 2014, 04:41:48 PM
@Joker™

I totally understand, hope you have enjoyed it :)
Title: Re: Like Posts
Post by: Michael Pfaff on August 20, 2014, 02:44:49 PM
Wow. Just got a crazy server error when trying to install this.

Internal Server Error

QuoteThe server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@louisvillednd.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

How can I manually undo what I just did when I installed this?
Title: Re: Like Posts
Post by: elf_fu on August 21, 2014, 12:01:05 PM
Quote from: Michael Pfaff on August 20, 2014, 02:44:49 PM
Wow. Just got a crazy server error when trying to install this.

Internal Server Error

QuoteThe server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@louisvillednd.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

How can I manually undo what I just did when I installed this?


Go to the mod page, parse the mod for the version of SMF you have, and follow the steps for installing--except backwards.


You'd be removing the pieces of code under "replace," and re-pasting the codes found under, "find."
Title: Re: Like Posts
Post by: Joker™ on September 06, 2014, 03:51:56 AM
Quote from: johndays on August 14, 2014, 04:15:04 PM
Quote from: johndays on July 27, 2014, 07:14:17 AM
Thank you for your continuous feedback.

@Joker™

Some samples :

João (ã)
Informação (ç and ã)

At least this 2.

Best regards,
Quote from: Joker™Thanks for the info, will be trying it out soon.

There is some update? Thank you so much in advance.
Hey there,

I tried with the above mentioned text and several other texts, but wasn't able to reproduce the error. Umm.. does your forum uses UTF-8, also pm me a test account of your forum.
Title: Re: Like Posts
Post by: ryan_dwight on September 11, 2014, 03:33:48 PM
I wonder why my Most liked user stat is empty, but the other 4 in the stat page is ok.

and if it will not be too much, is it possible to have it in table/column instead of listing all the topics?

TIA
Title: Re: Like Posts
Post by: Joker™ on September 13, 2014, 09:14:34 AM
Quote from: ryan_dwight on September 11, 2014, 03:33:48 PM
I wonder why my Most liked user stat is empty, but the other 4 in the stat page is ok.
PM me the site link with a test account.


Quote from: ryan_dwight on September 11, 2014, 03:33:48 PM
and if it will not be too much, is it possible to have it in table/column instead of listing all the topics?

TIA
Well thats a custom thing. You can edits the html structure in 'LikePostStats.js' and css in 'LikePosts.css'.
Title: Re: Like Posts
Post by: ryan_dwight on September 13, 2014, 11:49:46 AM
Quote from: Joker™ on September 13, 2014, 09:14:34 AM
Quote from: ryan_dwight on September 11, 2014, 03:33:48 PM
I wonder why my Most liked user stat is empty, but the other 4 in the stat page is ok.
PM me the site link with a test account.
PM sent

Quote from: Joker™ on September 13, 2014, 09:14:34 AM
Quote from: ryan_dwight on September 11, 2014, 03:33:48 PM
and if it will not be too much, is it possible to have it in table/column instead of listing all the topics?

TIA
Well thats a custom thing. You can edits the html structure in 'LikePostStats.js' and css in 'LikePosts.css'.
no idea how to do that, Ill leave it like that
Title: Re: Like Posts
Post by: Joker™ on September 14, 2014, 10:07:28 AM
Quote from: ryan_dwight on September 13, 2014, 11:49:46 AM
Quote from: Joker™ on September 13, 2014, 09:14:34 AM
Quote from: ryan_dwight on September 11, 2014, 03:33:48 PM
I wonder why my Most liked user stat is empty, but the other 4 in the stat page is ok.
PM me the site link with a test account.
PM sent
Well, even the mod CSS is not loading properly on your website, can you uninstall and install/upgrade the mod?
Title: Re: Like Posts
Post by: Joker™ on September 14, 2014, 11:11:58 AM
Mod updated with new features :)
Title: Re: Like Posts
Post by: Beelzeboss on September 14, 2014, 04:25:51 PM
Quote from: Joker™ on September 14, 2014, 11:11:58 AM
Mod updated with new features :)

Dear friend this error remain

Quote from: Beelzeboss on August 09, 2014, 06:53:36 PM
Dear Joker, there is an issue in versions 1.5 & 1.5.2 when you want to show the 'likes notification" from a smartphone browser (stock android browser and chrome). Actually, you can't see the latest likes from a smartphone. This issue was not in version 1.3.1. (I didn't test 1.4.)

and now there is an issue in notification with UTF-8 chars. Until now (1.5.2 version) there wasn't problem. (I cleared the cache)
Title: Re: Like Posts
Post by: ryan_dwight on September 14, 2014, 05:10:16 PM
Quote from: Joker™ on September 14, 2014, 10:07:28 AM
Quote from: ryan_dwight on September 13, 2014, 11:49:46 AM
Quote from: Joker™ on September 13, 2014, 09:14:34 AM
Quote from: ryan_dwight on September 11, 2014, 03:33:48 PM
I wonder why my Most liked user stat is empty, but the other 4 in the stat page is ok.
PM me the site link with a test account.
PM sent
Well, even the mod CSS is not loading properly on your website, can you uninstall and install/upgrade the mod?

thanks for the update but It is still empty
Quote- Added new permission to enable disable mod for specific boards
about this new feature, is it possible to have a check/uncheck all box here?

edit:
I mentioned before that the Recount members total likes is not working but I found out that when you click this the progress percentage is in the lower left hand of the forum below the forum maintenance. When it was done all the like stats are working.

Thank you
Title: Re: Like Posts
Post by: fatihtrap on September 14, 2014, 08:40:26 PM
Hello. I have some problems. Please help.






Title: Re: Like Posts
Post by: Joker™ on September 15, 2014, 12:14:32 PM
Quote from: Beelzeboss on August 09, 2014, 06:53:36 PM
Dear Joker, there is an issue in versions 1.5 & 1.5.2 when you want to show the 'likes notification" from a smartphone browser (stock android browser and chrome). Actually, you can't see the latest likes from a smartphone. This issue was not in version 1.3.1. (I didn't test 1.4.)
Oops I missed to track that one. For sure will be taking care of that one in next release, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/20).


Quote
and now there is an issue in notification with UTF-8 chars. Until now (1.5.2 version) there wasn't problem. (I cleared the cache)

Note - Make backup of Sources/Subs-LikePosts.php before editing

In the above mentioned file, there will be 2 instances of

Code (Find) Select
'subject' => utf8_encode($row['subject']),

Code (Replace with) Select
'subject' => $row['subject'],

Please do update me with the results :)
Title: Re: Like Posts
Post by: Joker™ on September 15, 2014, 12:18:14 PM
Quote from: ryan_dwight on September 14, 2014, 05:10:16 PM
thanks for the update but It is still empty
Quote- Added new permission to enable disable mod for specific boards
about this new feature, is it possible to have a check/uncheck all box here?

edit:
I mentioned before that the Recount members total likes is not working but I found out that when you click this the progress percentage is in the lower left hand of the forum below the forum maintenance. When it was done all the like stats are working.

Thank you
For now, you can click on category name to select all boards of the category at once.

For sure css related to this mod is not loading on your website.
Title: Re: Like Posts
Post by: Joker™ on September 15, 2014, 12:21:09 PM
Quote from: fatihtrap on September 14, 2014, 08:40:26 PM
Hello. I have some problems. Please help.

Mod code (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=235240;smf_version=2.0.8)

Note - Make backup of index.template.php and remove the code related to the file from the above link and proceed with mod uninstallation.
Title: Re: Like Posts
Post by: Beelzeboss on September 15, 2014, 01:05:47 PM
Quote from: Joker™ on September 15, 2014, 12:14:32 PM
Note - Make backup of Sources/Subs-LikePosts.php before editing

In the above mentioned file, there will be 2 instances of

Code (Find) Select
'subject' => utf8_encode($row['subject']),

Code (Replace with) Select
'subject' => $row['subject'],

Please do update me with the results :)

Yes, it's all right now. Thanks for your support.  :)
Title: Re: Like Posts
Post by: ryan_dwight on September 15, 2014, 02:09:06 PM
Quote from: Joker™ on September 15, 2014, 12:18:14 PM
Quote from: ryan_dwight on September 14, 2014, 05:10:16 PM
thanks for the update but It is still empty
Quote- Added new permission to enable disable mod for specific boards
about this new feature, is it possible to have a check/uncheck all box here?

edit:
I mentioned before that the Recount members total likes is not working but I found out that when you click this the progress percentage is in the lower left hand of the forum below the forum maintenance. When it was done all the like stats are working.

Thank you
For now, you can click on category name to select all boards of the category at once.

For sure css related to this mod is not loading on your website.
so that is the reason, thanks Jocker I just check one by one all the boards. Any idea what is the CSS problem?
Title: Re: Like Posts
Post by: Joker™ on September 15, 2014, 10:04:29 PM
Quote from: Beelzeboss on September 15, 2014, 01:05:47 PM
Quote from: Joker™ on September 15, 2014, 12:14:32 PM
Note - Make backup of Sources/Subs-LikePosts.php before editing

In the above mentioned file, there will be 2 instances of

Code (Find) Select
'subject' => utf8_encode($row['subject']),

Code (Replace with) Select
'subject' => $row['subject'],

Please do update me with the results :)

Yes, it's all right now. Thanks for your support.  :)
Does you forum uses utf8 character support?
Title: Re: Like Posts
Post by: Joker™ on September 15, 2014, 10:05:56 PM
Quote from: ryan_dwight on September 15, 2014, 02:09:06 PM
Quote from: Joker™ on September 15, 2014, 12:18:14 PM
Quote from: ryan_dwight on September 14, 2014, 05:10:16 PM
thanks for the update but It is still empty
Quote- Added new permission to enable disable mod for specific boards
about this new feature, is it possible to have a check/uncheck all box here?

edit:
I mentioned before that the Recount members total likes is not working but I found out that when you click this the progress percentage is in the lower left hand of the forum below the forum maintenance. When it was done all the like stats are working.

Thank you
For now, you can click on category name to select all boards of the category at once.

For sure css related to this mod is not loading on your website.
so that is the reason, thanks Jocker I just check one by one all the boards. Any idea what is the CSS problem?
Will try to see....
Title: Re: Like Posts
Post by: Beelzeboss on September 16, 2014, 06:50:13 AM
Quote from: Joker™ on September 15, 2014, 10:04:29 PM
Quote from: Beelzeboss on September 15, 2014, 01:05:47 PM
Yes, it's all right now. Thanks for your support.  :)
Does you forum uses utf8 character support?

Yes, I have added a utf8 language and the database uses utf8 collation.
Title: Re: Like Posts
Post by: Joker™ on September 16, 2014, 12:08:12 PM
Quote from: Beelzeboss on September 16, 2014, 06:50:13 AM
Quote from: Joker™ on September 15, 2014, 10:04:29 PM
Quote from: Beelzeboss on September 15, 2014, 01:05:47 PM
Yes, it's all right now. Thanks for your support.  :)
Does you forum uses utf8 character support?

Yes, I have added a utf8 language and the database uses utf8 collation.
Thanks for the info :)
Title: Re: Like Posts
Post by: Joker™ on September 16, 2014, 12:12:45 PM
Quote from: ryan_dwight on September 15, 2014, 02:09:06 PM
so that is the reason, thanks Jocker I just check one by one all the boards. Any idea what is the CSS problem?
Download the mod from here (http://custom.simplemachines.org/mods/index.php?mod=3708). make sure LikePosts.css is in 'Themes/default/css'.

Also check the edits required for Load.php are there from here (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=235240;smf_version=2.0.8)
Title: Re: Like Posts
Post by: ryan_dwight on September 18, 2014, 03:29:05 PM
//end enotify


include($boarddir.'/mobiquo/smartbanner.php'); if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

include_once($boarddir.'/mobiquo/smartbanner.php');
$context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

include_once($boarddir.'/mobiquo/smartbanner.php');
$context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

$context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' ' : ' | ';
    }


is that supposed to be two times, I didn't edit yet since it was already there but there are two.
and the css is in the right folder
Title: Re: Like Posts
Post by: Joker™ on September 20, 2014, 01:48:26 AM
Quote from: ryan_dwight on September 18, 2014, 03:29:05 PM
//end enotify


include($boarddir.'/mobiquo/smartbanner.php'); if (isset($_GET['board']) || isset($_GET['topic'])) {
        $context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

include_once($boarddir.'/mobiquo/smartbanner.php');
$context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

include_once($boarddir.'/mobiquo/smartbanner.php');
$context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

$context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' ' : ' | ';
    }


is that supposed to be two times, I didn't edit yet since it was already there but there are two.
and the css is in the right folder
Its more that 2 times

Note - Make backup of file before editing it

Code (Change above code to:) Select
//end enotify


include_once($boarddir.'/mobiquo/smartbanner.php');
$context['html_headers'] .= '<link rel="stylesheet" type="text/css" href="'. $settings['default_theme_url']. '/css/LikePosts.css" />';

$context['menu_separator'] = !empty($settings['use_image_buttons']) ? ' ' : ' | ';


Also, make sure if other files are fine as per mod requirements, mod code (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=235240;smf_version=2.0.8)
Title: Re: Like Posts
Post by: Joker™ on September 20, 2014, 10:18:58 AM
Mod updated. Uninstall the older version and install the new package

Version 1.6.1
- Fixes for UTF8 encoding on notifications
- Fixes for notification panel for smart devices
- Select all board functionality
- Persist settings on mod update
- Acknowledging contributors
Title: Re: Like Posts
Post by: ryan_dwight on September 22, 2014, 05:06:22 PM
thanks for the update Joker

the check all is working in chrome but not on firefox, maybe its just for me.

the like stats is better now after I edited the load.php but the background is on a default theme color. If its not too much, is it possible for the blacknblack theme?

again thanks for the help
Title: Re: Like Posts
Post by: Grej on September 22, 2014, 09:49:20 PM
Can the text of the like button be changed based on how many people like a post?

For example if only 1 person liked a post can you make it say "1 person liked this" instead of "1 people liked this"?

And if more than 1 person liked a post it could say "2, 3, 4, etc. people liked this"

Also if only 2 people liked a post it could say "(You & 1 other person liked this)" instead of "(You & 1 others liked this)"

And if more than 2 people liked a post it could say "(You & 2, 3, 4, etc. other people liked this)"

Title: Re: Like Posts
Post by: Kimmie on September 23, 2014, 01:59:52 PM
Installing this mod but I need just a little help getting it into one of my themes. (Graystyle theme)

Code mod calls for:

/Themes/default/index.template.php

Find: <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Replace with: <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>
               <li><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';


Code in this theme:

(http://i.imgur.com/cZNiXmz.png)



I wasn't sure how to add it since it uses span instead of li. Any help is appreciated. :)


=========================


Another question: Permission settings "Can Like Posts" -  do not list my post count based groups. It only lists regular members. I only want specific groups to use this feature. How can I add them to the list?


=========================

- Select all board functionality  - this would be better if the option was under each Category.
Title: Re: Like Posts
Post by: margarett on September 23, 2014, 02:20:09 PM
Just add this:
<span><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></span>
After the "unread replies" span entry ;)
Title: Re: Like Posts
Post by: Kimmie on September 23, 2014, 02:24:38 PM
Quote from: margarett on September 23, 2014, 02:20:09 PM
Just add this:
<span><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></span>
After the "unread replies" span entry ;)



TY :)
Title: Re: Like Posts
Post by: Joker™ on September 27, 2014, 10:16:18 AM
Quote from: ryan_dwight on September 22, 2014, 05:06:22 PM
the like stats is better now after I edited the load.php but the background is on a default theme color. If its not too much, is it possible for the blacknblack theme?
Try to edit this class '.like_post_stats_data' in LikePosts.css
Title: Re: Like Posts
Post by: Joker™ on September 27, 2014, 10:16:43 AM
Quote from: Grej on September 22, 2014, 09:49:20 PM
Can the text of the like button be changed based on how many people like a post?

For example if only 1 person liked a post can you make it say "1 person liked this" instead of "1 people liked this"?

And if more than 1 person liked a post it could say "2, 3, 4, etc. people liked this"

Also if only 2 people liked a post it could say "(You & 1 other person liked this)" instead of "(You & 1 others liked this)"

And if more than 2 people liked a post it could say "(You & 2, 3, 4, etc. other people liked this)"


Will be taking care of this in next release
Title: Re: Like Posts
Post by: a10 on September 30, 2014, 06:03:25 AM
Hello, got 2 3 questions about this nice mod:

-When a topic is moved to another board, any 'like' does not follow, and any given 'like' shows up as 'null' in the Show Likes notification (this may also apply if posts are merged, haven't tested that).

-When updating the mod, looks like the previous version should be uninstalled, will the previous given 'likes' stay?

Thanks

edit: and this error appeared today:

Apply Filter: Only show the error messages of this URL
http://www.*/forum/index.php?action=likeposts;sa=like_posts_notification
Apply Filter: Only show the errors with the same message
2: json_encode(): Invalid UTF-8 sequence in argument
Apply Filter: Only show the errors from this file
File: /customers/*httpd.www/forum/Sources/LikePosts.php
Line: 458
Title: Re: Like Posts
Post by: Joker™ on September 30, 2014, 07:46:06 AM
Quote from: a10 on September 30, 2014, 06:03:25 AM
-When a topic is moved to another board, any 'like' does not follow, and any given 'like' shows up as 'null' in the Show Likes notification (this may also apply if posts are merged, haven't tested that).
Thanks for reporting the issue, tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/22)


Quote from: a10 on September 30, 2014, 06:03:25 AM
-When updating the mod, looks like the previous version should be uninstalled, will the previous given 'likes' stay?
Yup, as long as while uninstalling the mod one doesn't select, remove database changes.


Quote from: a10 on September 30, 2014, 06:03:25 AM
edit: and this error appeared today:

Apply Filter: Only show the error messages of this URL
http://www.*/forum/index.php?action=likeposts;sa=like_posts_notification
Apply Filter: Only show the errors with the same message
2: json_encode(): Invalid UTF-8 sequence in argument
Apply Filter: Only show the errors from this file
File: /customers/*httpd.www/forum/Sources/LikePosts.php
Line: 458
Strange and nice :P. Can you provide me the text of the topic which was supposed to come up in the notification?
Title: Re: Like Posts
Post by: a10 on September 30, 2014, 10:01:55 AM
QuoteStrange and nice :P. Can you provide me the text of the topic which was supposed to come up in the notification?

Thanks for replying.

Seems it's all tied to moving the topic, nothing special with the post's content (likes behaved normal before it was moved). After the topic move, any likes to any post in that topic generates the error in the log, and any new like in that topic turns up as 'null' in the notification.

If of interest, clicking 'unlike' does not generate any error on the log. btw, forum is non utf-8.

Likes on any normal (non-moved) post works as normal, zero errors.
Title: Re: Like Posts
Post by: Kimmie on September 30, 2014, 02:57:16 PM
Quote from: Kimmie on September 23, 2014, 01:59:52 PM


Permission settings "Can Like Posts" -  do not list my post count based groups. It only lists "regular members". I only want specific groups to use this feature. How can I add them to the list?



Is there any way this can be updated? thanks :)
Title: Re: Like Posts
Post by: Joker™ on September 30, 2014, 11:55:05 PM
Quote from: a10 on September 30, 2014, 10:01:55 AM
QuoteStrange and nice :P. Can you provide me the text of the topic which was supposed to come up in the notification?

Thanks for replying.

Seems it's all tied to moving the topic, nothing special with the post's content (likes behaved normal before it was moved). After the topic move, any likes to any post in that topic generates the error in the log, and any new like in that topic turns up as 'null' in the notification.

If of interest, clicking 'unlike' does not generate any error on the log. btw, forum is non utf-8.

Likes on any normal (non-moved) post works as normal, zero errors.
Great :). It looks like its time to make a major overhaul in the mod.


Quote from: Kimmie on September 30, 2014, 02:57:16 PM
Quote from: Kimmie on September 23, 2014, 01:59:52 PM


Permission settings "Can Like Posts" -  do not list my post count based groups. It only lists "regular members". I only want specific groups to use this feature. How can I add them to the list?



Is there any way this can be updated? thanks :)
Thats one hell of task. I've always hated that thinggy. I've tracked this over here (https://github.com/siddhartha-gupta/SMF-Likes/issues/23). Well, let me see the code flow/issues that can arise and will get back with some questions for brainstorming/teasing session ;D
Title: Re: Like Posts
Post by: Elizabeth II on October 01, 2014, 09:01:00 AM
How do I remove the Like Stats tab from the menu? I can't seem to find it anywhere?
Title: Re: Like Posts
Post by: Kimmie on October 01, 2014, 12:42:32 PM
Quote from: Joker™ on September 30, 2014, 11:55:05 PM


Quote from: Kimmie on September 30, 2014, 02:57:16 PM
Quote from: Kimmie on September 23, 2014, 01:59:52 PM


Permission settings "Can Like Posts" -  do not list my post count based groups. It only lists "regular members". I only want specific groups to use this feature. How can I add them to the list?



Is there any way this can be updated? thanks :)
Thats one hell of task. I've always hated that thinggy. I've tracked this over here (https://github.com/siddhartha-gupta/SMF-Likes/issues/23). Well, let me see the code flow/issues that can arise and will get back with some questions for brainstorming/teasing session ;D


Thanks for looking into updating this. Most have post count groups so it will come in handy for those of us who don't want every group having these types of permissions. It gives them something to work for. :)
Title: Re: Like Posts
Post by: Kimmie on October 01, 2014, 12:44:05 PM
Quote from: Britannia360 on October 01, 2014, 09:01:00 AM
How do I remove the Like Stats tab from the menu? I can't seem to find it anywhere?


It will be in the same place all your other buttons up there are. I am not real familiar with 2.0 yet but this may help you locate the area you need

http://wiki.simplemachines.org/smf/Buttons_-_How_do_I_add_buttons_to_SMF_2.0
Title: Re: Like Posts
Post by: Elizabeth II on October 01, 2014, 02:24:48 PM
I did check that file before and searched but I didn't find anything relating to it
Title: Re: Like Posts
Post by: Joker™ on October 02, 2014, 12:10:06 AM
Quote from: Britannia360 on October 01, 2014, 09:01:00 AM
How do I remove the Like Stats tab from the menu? I can't seem to find it anywhere?
Umm, its added via hook, so no SMF file is being modified to add the menu item. AFAIR, there is already a permission to disable the like stats based on member group, why don't you give it a try.
Title: Re: Like Posts
Post by: Joker™ on October 02, 2014, 12:12:15 AM
Quote from: Kimmie on October 01, 2014, 12:42:32 PM
Thanks for looking into updating this. Most have post count groups so it will come in handy for those of us who don't want every group having these types of permissions. It gives them something to work for. :)
So lets say I have a post group 'Friend' and a normal/regular group 'Coder'.

Now both of these groups have different permissions provided to them, so which group permission should be used for the user in terms of like mod permission system?
Title: Re: Like Posts
Post by: Elizabeth II on October 02, 2014, 11:14:48 AM
Quote from: Joker™ on October 02, 2014, 12:10:06 AM
Quote from: Britannia360 on October 01, 2014, 09:01:00 AM
How do I remove the Like Stats tab from the menu? I can't seem to find it anywhere?
Umm, its added via hook, so no SMF file is being modified to add the menu item. AFAIR, there is already a permission to disable the like stats based on member group, why don't you give it a try.

So I can't remove the tab?
Title: Re: Like Posts
Post by: Joker™ on October 02, 2014, 12:33:07 PM
Quote from: Britannia360 on October 02, 2014, 11:14:48 AM
So I can't remove the tab?
Quote from: Joker™ on October 02, 2014, 12:10:06 AM
AFAIR, there is already a permission to disable the like stats based on member group, why don't you give it a try.
Title: Re: Like Posts
Post by: Elizabeth II on October 02, 2014, 08:31:53 PM
But that doesnt stop me from seeing it..
Title: Re: Like Posts
Post by: Joker™ on October 02, 2014, 11:24:09 PM
Quote from: Britannia360 on October 02, 2014, 08:31:53 PM
But that doesnt stop me from seeing it..
Are you using an admin account, as admin have all permissions enabled. Try with some normal account
Title: Re: Like Posts
Post by: gorbi on October 03, 2014, 08:47:05 AM
Do you have russian localisation for this mod?
Title: Re: Like Posts
Post by: Joker™ on October 03, 2014, 10:01:16 AM
Quote from: gorbi on October 03, 2014, 08:47:05 AM
Do you have russian localisation for this mod?
Nope
Title: Re: Like Posts
Post by: gorbi on October 03, 2014, 01:32:04 PM
Are Like in smf 2.0.x and 2.1 similar?
Title: Re: Like Posts
Post by: a10 on October 04, 2014, 08:29:34 AM
Hello, now om 2.09, am getting this specific error upon any and all use of the 'like' (also clicking 'Show Likes notification' makes the error). But the like's themselves appears to work fine, only symptom is (seemingly) the entry in the error log.


http://www.*/forum/index.php?action=likeposts;sa=like_posts_notification
Apply Filter: Only show the errors with the same message
2: json_encode(): Invalid UTF-8 sequence in argument
Apply Filter: Only show the errors from this file
File: /customers/*/httpd.www/forum/Sources/LikePosts.php
Line: 458
Title: Re: Like Posts
Post by: Joker™ on October 04, 2014, 02:28:02 PM
Quote from: gorbi on October 03, 2014, 01:32:04 PM
Are Like in smf 2.0.x and 2.1 similar?
Nope. BTW, this mod is not compatible for 2.1 as of now.


Quote from: a10 on October 04, 2014, 08:29:34 AM
Hello, now om 2.09, am getting this specific error upon any and all use of the 'like' (also clicking 'Show Likes notification' makes the error). But the like's themselves appears to work fine, only symptom is (seemingly) the entry in the error log.


http://www.*/forum/index.php?action=likeposts;sa=like_posts_notification
Apply Filter: Only show the errors with the same message
2: json_encode(): Invalid UTF-8 sequence in argument
Apply Filter: Only show the errors from this file
File: /customers/*/httpd.www/forum/Sources/LikePosts.php
Line: 458




Quote from: Joker™ on September 30, 2014, 11:55:05 PM
Great :). It looks like its time to make a major overhaul in the mod.
And I'm working on the same, as mod has too much of unused and unoptimized code. So, with the next major version release this big will also be fixed :). You can see the activity over here (https://github.com/siddhartha-gupta/SMF-Likes/commits/v_2.0), also this bug is already tracked on github.
Title: Re: Like Posts
Post by: gorbi on October 06, 2014, 03:39:59 AM
The mod is great. I started to make Russian localization. Front-end is ready )

Please add the All Notifications and My Posts in language file.

P.S. Statistics likes is logical to move down the page to the general statistics, or make a check-box in the settings.
Title: Re: Like Posts
Post by: mikenye on October 08, 2014, 11:50:23 PM
This mod is really cool, thank you.

I personally like the look and feel of the below forum's like system:

htt p://talkaboutmarriage. com/sex-marriage/210858-erotic-films-couples-not-pure-porn.html

It has username whose liked the post listed right on the post, instead of in a popup.  Can we have an option to display like that?

Also, I had to add a tweak so that it can work with PortaMX SEF.

In PortaMxSEF.php:

function pmxsef_redir_perm($url)
{
//fix likepost ajax
if(strpos($_SERVER['REQUEST_URL'], 'sa=like_post') !== false || strpos($_SERVER['REQUEST_URL'], 'sa=get_message_like_info') !== false) {
return;
}

define('WIRELESS', false);
header('HTTP/1.1 301 Moved Permanently');
redirectexit($url);
}


and added 'clearfix' in LikePosts.js, line 163:

completeString += '<div class="like_posts_member_info"><img class="avatar" src="' + data[i].avatar.href + '" /><div class="like_posts_member_info_details clearfix"><a href="' + data[i].href + '">' + data[i].name + '</a></div></div>';
Title: Re: Like Posts
Post by: Rain Forest on October 09, 2014, 07:15:14 AM
Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

Add after:


if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isBoardIncluded($context['current_board']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes', 'can_view_likes_in_boards'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="', $context['like_posts']['single_topic_data']['already_liked'] ? 'like_link' : 'unlike_link', '" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo(array('can_view_likes', 'can_view_likes_in_boards'))) {
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';
}

echo '
</div>';
}


I can't find this line in messageindex.template.php on 2.0.8.

<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
Title: Re: Like Posts
Post by: Joker™ on October 09, 2014, 12:39:44 PM
Quote from: gorbi on October 06, 2014, 03:39:59 AM
The mod is great. I started to make Russian localization. Front-end is ready )
Thats great. If you are familiar with the github you can send me a PR with new lang string over here https://github.com/siddhartha-gupta/SMF-Likes


Quote from: gorbi on October 06, 2014, 03:39:59 AM
Please add the All Notifications and My Posts in language file.
Opps! Thanks for pointing it out, tracked over here - https://github.com/siddhartha-gupta/SMF-Likes/issues/24


Quote from: gorbi on October 06, 2014, 03:39:59 AM
P.S. Statistics likes is logical to move down the page to the general statistics, or make a check-box in the settings.
Umm moving it down requires a SMF file edit, I really hate that. Will try to find some alternative.
Title: Re: Like Posts
Post by: Joker™ on October 09, 2014, 12:46:28 PM
Quote from: mikenye on October 08, 2014, 11:50:23 PM
This mod is really cool, thank you.

I personally like the look and feel of the below forum's like system:

htt p://talkaboutmarriage. com/sex-marriage/210858-erotic-films-couples-not-pure-porn.html

It has username whose liked the post listed right on the post, instead of in a popup.  Can we have an option to display like that?
You mean on the top right? Just before where first post start? If thats the case, I think its showing all users who have liked the post. Please provide me some further details.
Title: Re: Like Posts
Post by: Joker™ on October 09, 2014, 12:47:00 PM
Quote from: Magic Coconut on October 09, 2014, 07:15:14 AM
Find:
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';

Add after:


if(!empty($modSettings['like_post_enable']) && !empty($modSettings['lp_show_like_on_boards']) && LP_isBoardIncluded($context['current_board']) && LP_isAllowedTo(array('can_like_posts', 'can_view_likes', 'can_view_likes_in_boards'))) {
$context['like_posts']['single_topic_data'] = LP_isTopicLiked($context['like_posts']['topics_liked_data'], $topic['id']);
echo '
<div class="like_post_box floatright">';

if($context['user']['id'] !== $topic['first_post']['member']['id'] && LP_isAllowedTo('can_like_posts')) {
echo '
<a class="', $context['like_posts']['single_topic_data']['already_liked'] ? 'like_link' : 'unlike_link', '" id="like_',$topic['first_post']['id'],'" href="#', $context['like_posts']['single_topic_data']['already_liked'], '" onclick="lpObj.likeUnlikePosts(event, ', $topic['first_post']['id'],', ',$topic['id'],', ',$context['current_board'],', ',$topic['first_post']['member']['id'],'); return false;">', $context['like_posts']['single_topic_data']['text'],'</a>';
}

if(LP_isAllowedTo(array('can_view_likes', 'can_view_likes_in_boards'))) {
echo '
<a id="like_post_info_'. $topic['first_post']['id'] .'" href="javascript:void(0)" onclick="lpObj.showMessageLikedInfo(', $topic['first_post']['id'], ')">', !empty($context['like_posts']['single_topic_data']['count']) ? '<span id="like_count_'. $topic['first_post']['id'] .'">('. $context['like_posts']['single_topic_data']['count_text'] .')</span>' : '', '</a>';
}

echo '
</div>';
}


I can't find this line in messageindex.template.php on 2.0.8.

<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
The code is near line number 260

// Is this topic new? (assuming they are logged in!)
if ($topic['new'] && $context['user']['is_logged'])
echo '
<a href="', $topic['new_href'], '" id="newicon' . $topic['first_post']['id'] . '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>';
Title: Re: Like Posts
Post by: Rain Forest on October 09, 2014, 12:57:51 PM
Hmm, do you have an alternative for putting that code after?
Title: Re: Like Posts
Post by: gorbi on October 09, 2014, 01:21:42 PM
Quote from: Joker™ on October 09, 2014, 12:39:44 PM
Quote from: gorbi on October 06, 2014, 03:39:59 AM
The mod is great. I started to make Russian localization. Front-end is ready )
Thats great. If you are familiar with the github you can send me a PR with new lang string over here https://github.com/siddhartha-gupta/SMF-Likes


Quote from: gorbi on October 06, 2014, 03:39:59 AM
Please add the All Notifications and My Posts in language file.
Opps! Thanks for pointing it out, tracked over here - https://github.com/siddhartha-gupta/SMF-Likes/issues/24


Quote from: gorbi on October 06, 2014, 03:39:59 AM
P.S. Statistics likes is logical to move down the page to the general statistics, or make a check-box in the settings.
Umm moving it down requires a SMF file edit, I really hate that. Will try to find some alternative.
Ок.  I will modify the draft and send. Thank you for your work!
Title: Re: Like Posts
Post by: Joker™ on October 11, 2014, 03:40:59 AM
Quote from: .Elephant on October 09, 2014, 12:57:51 PM
Hmm, do you have an alternative for putting that code after?
Try the attached file
Title: Re: Like Posts
Post by: gorbi on October 11, 2014, 03:59:05 AM
Google Chrome 37.0.2062.124 m
Title: Re: Like Posts
Post by: Rain Forest on October 11, 2014, 07:43:03 AM
Quote from: Joker™ on October 11, 2014, 03:40:59 AM
Quote from: .Elephant on October 09, 2014, 12:57:51 PM
Hmm, do you have an alternative for putting that code after?
Try the attached file
Thanks! :)

Any tips for adding an icon in front of 'like/unlike' text? :)

(http://i.imgur.com/QEJiJ3N.png)
Title: Re: Like Posts
Post by: gorbi on October 11, 2014, 08:32:11 AM
.Elephant
Mark Zuckerberg will not mind? )))
Title: Re: Like Posts
Post by: Rain Forest on October 11, 2014, 12:23:37 PM
Quote from: gorbi on October 11, 2014, 08:32:11 AM
.Elephant
Mark Zuckerberg will not mind? )))

He'd be jealous, yes. ;)
Title: Re: Like Posts
Post by: gorbi on October 11, 2014, 12:57:43 PM
)))
Title: Re: Like Posts
Post by: Joker™ on October 11, 2014, 01:38:03 PM
Quote from: gorbi on October 11, 2014, 03:59:05 AM
Google Chrome 37.0.2062.124 m
Thanks for the translation and reporting bugs :)



Quote from: .Elephant on October 11, 2014, 07:43:03 AM
Thanks! :)

Any tips for adding an icon in front of 'like/unlike' text? :)

(http://i.imgur.com/QEJiJ3N.png)
In Theme/Default/CSS/LikePosts.css

find '.unlike_link' and '.like_link' classes, and change the background-image as you like ;).
Title: Re: Like Posts
Post by: Rain Forest on October 11, 2014, 06:13:23 PM
I wonder how I get the icon 'before' the text..

.like_link {
background: #fff;
background-image: url(../images/like.png);
padding: 1px 5px;
color: #0474B4 !important;
position: relative;
}
Title: Re: Like Posts
Post by: Arantor on October 11, 2014, 06:29:02 PM
By setting background-repeat to none and making the left padding (only) bigger.
Title: Re: Like Posts
Post by: Rain Forest on October 11, 2014, 06:57:17 PM
Quote from: Arantor on October 11, 2014, 06:29:02 PM
By setting background-repeat to none and making the left padding (only) bigger.

Mm, it's not a great try for me :(

.like_link {
background: #fff;
background-image: url(../images/like.png) no-repeat;
padding-left: 50px !important;
color: #0474B4 !important;
position: relative;
}

a:hover {
text-decoration: underline;
}


.unlike_link {
background: #fff;
background-image: url(../images/like.png) no-repeat;
    padding-left: 50px !important;
color: #0474B4 !important;
position: relative;
}

a:hover {
text-decoration: underline;
}
Title: Re: Like Posts
Post by: Arantor on October 11, 2014, 08:00:02 PM
Hard to fix without seeing what the result currently is...
Title: Re: Like Posts
Post by: Kimmie on October 11, 2014, 10:30:26 PM
How hard would it be to incorporate this into this mod? There was a Thank You mod on here a while back (1.x) that tied both together but that one no longer works on 2.x. I still use the hide tag even though it isn't available on here anymore.

http://www.simplemachines.org/community/index.php?topic=32954.0
Title: Re: Like Posts
Post by: Arantor on October 11, 2014, 10:35:36 PM
Why would you want people to like something they can't see?
Title: Re: Like Posts
Post by: Joker™ on October 12, 2014, 04:23:58 AM
Quote from: .Elephant on October 11, 2014, 06:57:17 PM
Quote from: Arantor on October 11, 2014, 06:29:02 PM
By setting background-repeat to none and making the left padding (only) bigger.

Mm, it's not a great try for me :(

.like_link {
background: #fff;
background-image: url(../images/like.png) no-repeat;
padding-left: 50px !important;
color: #0474B4 !important;
position: relative;
}

a:hover {
text-decoration: underline;
}


.unlike_link {
background: #fff;
background-image: url(../images/like.png) no-repeat;
    padding-left: 50px !important;
color: #0474B4 !important;
position: relative;
}

a:hover {
text-decoration: underline;
}

Try this

.like_link {
background-color: #C44E19;
background-image: url(../images/email_sm.gif);
background-repeat: no-repeat;
background-position: 0px 3px;
padding: 1px 5px 1px 15px;
color: #FFF !important;
position: relative;
display: inline-block;
text-indent: 6px;
}

.unlike_link {
background-color: #000;
background-image: url(../images/email_sm.gif);
background-repeat: no-repeat;
background-position: 0px 3px;
padding: 1px 5px 1px 15px;
color: #FFF !important;
position: relative;
display: inline-block;
text-indent: 6px;
}
Title: Re: Like Posts
Post by: Joker™ on October 12, 2014, 04:25:14 AM
Quote from: Kimmie on October 11, 2014, 10:30:26 PM
How hard would it be to incorporate this into this mod? There was a Thank You mod on here a while back (1.x) that tied both together but that one no longer works on 2.x. I still use the hide tag even though it isn't available on here anymore.

http://www.simplemachines.org/community/index.php?topic=32954.0
And what feature should be exactly tied up?

Quote from: Arantor on October 11, 2014, 10:35:36 PM
Why would you want people to like something they can't see?
+1
Title: Re: Like Posts
Post by: Rain Forest on October 12, 2014, 06:04:17 AM
Quote from: Joker™ on October 12, 2014, 04:23:58 AM
Quote from: .Elephant on October 11, 2014, 06:57:17 PM
Quote from: Arantor on October 11, 2014, 06:29:02 PM
By setting background-repeat to none and making the left padding (only) bigger.

Mm, it's not a great try for me :(

.like_link {
background: #fff;
background-image: url(../images/like.png) no-repeat;
padding-left: 50px !important;
color: #0474B4 !important;
position: relative;
}

a:hover {
text-decoration: underline;
}


.unlike_link {
background: #fff;
background-image: url(../images/like.png) no-repeat;
    padding-left: 50px !important;
color: #0474B4 !important;
position: relative;
}

a:hover {
text-decoration: underline;
}

Try this

.like_link {
background-color: #C44E19;
background-image: url(../images/email_sm.gif);
background-repeat: no-repeat;
background-position: 0px 3px;
padding: 1px 5px 1px 15px;
color: #FFF !important;
position: relative;
display: inline-block;
text-indent: 6px;
}

.unlike_link {
background-color: #000;
background-image: url(../images/email_sm.gif);
background-repeat: no-repeat;
background-position: 0px 3px;
padding: 1px 5px 1px 15px;
color: #FFF !important;
position: relative;
display: inline-block;
text-indent: 6px;
}


Thanks :)
Title: Re: Like Posts
Post by: Kimmie on October 14, 2014, 07:43:06 AM
Quote from: Arantor on October 11, 2014, 10:35:36 PM
Why would you want people to like something they can't see?


Because that way they don't have to reply if they don't want to. This gives them a choice. Most of my members prefer the like button like we had before (only then it was a Thank You button). They have been begging me to try and get it put back on.


I also need to know how to change the background color or the color of the names. You can't see them because you have this as white on white.



(http://i.imgur.com/wQkSvan.png)
Title: Re: Like Posts
Post by: Rain Forest on October 14, 2014, 11:16:04 AM
Quote from: Britannia360 on October 02, 2014, 11:14:48 AM
Quote from: Joker™ on October 02, 2014, 12:10:06 AM
Quote from: Britannia360 on October 01, 2014, 09:01:00 AM
How do I remove the Like Stats tab from the menu? I can't seem to find it anywhere?
Umm, its added via hook, so no SMF file is being modified to add the menu item. AFAIR, there is already a permission to disable the like stats based on member group, why don't you give it a try.

So I can't remove the tab?

Try this.. [back up file first]

In sources/LikePostsHooks.php

remove

$menu_buttons = array_merge(
array_slice($menu_buttons, 0, $initPos),
array(
'like_post_stats' => array(
'title' => $txt['lp_stats'],
'href' => $scripturl . '?action=likepostsstats',
'show' => true,
),
),
array_slice($menu_buttons, $initPos, count($menu_buttons) - $initPos)
);
Title: Re: Like Posts
Post by: gorbi on October 14, 2014, 12:09:38 PM
.Elephant

Where can I find a forum with the mod?
Title: Re: Like Posts
Post by: Rain Forest on October 14, 2014, 01:03:32 PM
I use it on my forums but I don't want to spam this topic to advertise :P
Title: Re: Like Posts
Post by: Joker™ on October 14, 2014, 03:02:17 PM
Quote from: Kimmie on October 14, 2014, 07:43:06 AM
Quote from: Arantor on October 11, 2014, 10:35:36 PM
Why would you want people to like something they can't see?


Because that way they don't have to reply if they don't want to. This gives them a choice. Most of my members prefer the like button like we had before (only then it was a Thank You button). They have been begging me to try and get it put back on.

Quote from: Joker™ on October 12, 2014, 04:25:14 AM
Quote from: Kimmie on October 11, 2014, 10:30:26 PM
How hard would it be to incorporate this into this mod? There was a Thank You mod on here a while back (1.x) that tied both together but that one no longer works on 2.x. I still use the hide tag even though it isn't available on here anymore.

http://www.simplemachines.org/community/index.php?topic=32954.0
And what feature should be exactly tied up?
You really need to explain in simple words, as I'm confused about what feature do you exactly want.
Title: Re: Like Posts
Post by: Joker™ on October 14, 2014, 03:02:59 PM
Quote from: Kimmie on October 14, 2014, 07:43:06 AM
I also need to know how to change the background color or the color of the names. You can't see them because you have this as white on white.



(http://i.imgur.com/wQkSvan.png)
Which section i.e notification/boards/topics/profile section?
Title: Re: Like Posts
Post by: Joker™ on October 14, 2014, 03:15:51 PM
Okzzzz, everyone heres the list of things completed for next version (very near to release)

- PHP files converted to OOP, easy management for me :P
- JS file converted to singleton, in layman words, its more efficient
- All inline css removed from JS and templates
- Likes text based on number of likes, ref (http://www.simplemachines.org/community/index.php?topic=506743.msg3746658#msg3746658)
- Handling for likes data when post is deleted/merged/move, ref (http://www.simplemachines.org/community/index.php?topic=506743.msg3748949#msg3748949)
- Like posts permission based on post count group, ref (http://www.simplemachines.org/community/index.php?topic=506743.msg3749117#msg3749117)
- New permission in admin panel to disbale like stats completely (including button ;))
- Permission to disbale notification for eveyone or based on user group
- In admin panel, new feature to optimize like tabel and remove likes from delete topic
- Some hidden/fun JS features added in admin panel
- Permissions fixes through out the codebase
- Tons of fixes

If you have any new feature in mind, which is not listed above or in previous version, please do let me know asap by replying  in this topic.



NOTE - Strictly for test sites, not for live forums. If by using this package anything broke down I'm not responsible. You this at your own risk :laugh:

Sneak peek of LikePosts2.0 (https://github.com/siddhartha-gupta/SMF-Likes/releases/tag/v_2.0_beta1)
Title: Re: Like Posts
Post by: shayneb on October 14, 2014, 11:14:05 PM
I am using SMF 2.0.9 and the Like Posts version 1.6.1, and the Like links in the posts (or on the boards/topics) just don't show. However, the "Total likes: 0" part below the avatar does.
The theme I am using is called Concept, and it isn't the most compatible thing out there, but I've been able to make it work with every other mod I've ever tried.

(http://www.shaynebundy.com/dndftw/Capture.PNG)

Thanks so much for your help.
Title: Re: Like Posts
Post by: gorbi on October 15, 2014, 12:52:52 AM
2.0 beta is not installed through the package manager. His need to repack...
Title: Re: Like Posts
Post by: Rain Forest on October 15, 2014, 04:30:45 AM
Quote from: shayneb on October 14, 2014, 11:14:05 PM
I am using SMF 2.0.9 and the Like Posts version 1.6.1, and the Like links in the posts (or on the boards/topics) just don't show. However, the "Total likes: 0" part below the avatar does.
The theme I am using is called Concept, and it isn't the most compatible thing out there, but I've been able to make it work with every other mod I've ever tried.

(http://www.shaynebundy.com/dndftw/Capture.PNG)

Thanks so much for your help.

I think because you don't have profile.template.php in your custom theme and it will auto select the profile.template.php from the default theme. Display.template.php in your custom theme needs to be tweaked. Make sure you have edit all files for custom theme.. (theme/concept/display.template.php, index.template.php and messageindex.template.php)
Title: Re: Like Posts
Post by: shayneb on October 15, 2014, 10:54:19 AM
QuoteI think because you don't have profile.template.php in your custom theme and it will auto select the profile.template.php from the default theme. Display.template.php in your custom theme needs to be tweaked. Make sure you have edit all files for custom theme.. (theme/concept/display.template.php, index.template.php and messageindex.template.php)

The theme just doesn't come with display.template.php or messageindex.template.php (but it does have index.template.php). They're not in the zip of the theme itself.
Can I just copy the ones from the default theme into my custom theme (named Concept)?
Title: Re: Like Posts
Post by: Arantor on October 16, 2014, 02:07:30 PM
QuoteBecause that way they don't have to reply if they don't want to. This gives them a choice. Most of my members prefer the like button like we had before (only then it was a Thank You button). They have been begging me to try and get it put back on.

Likes are great for indicating interest in a post without replying, sure, but making someone *like a post* just to be able to *see* it pretty much defeats the value in having it as a metric for anything.
Title: Re: Like Posts
Post by: gorbi on October 16, 2014, 02:24:07 PM
Has anyone tried the 2.0 version?
Title: Re: Like Posts
Post by: Steve on October 16, 2014, 05:06:20 PM
I'll wait till the final release before trying 2.0 ... :)
Title: Re: Like Posts
Post by: Joker™ on October 17, 2014, 12:13:50 AM
Quote from: shayneb on October 14, 2014, 11:14:05 PM
I am using SMF 2.0.9 and the Like Posts version 1.6.1, and the Like links in the posts (or on the boards/topics) just don't show. However, the "Total likes: 0" part below the avatar does.
The theme I am using is called Concept, and it isn't the most compatible thing out there, but I've been able to make it work with every other mod I've ever tried.

(http://www.shaynebundy.com/dndftw/Capture.PNG)

Thanks so much for your help.
Check if the board is selected from 'Like Posts' admin panel board settings.
Title: Re: Like Posts
Post by: Joker™ on October 17, 2014, 12:14:17 AM
Its friday ;D. Will be trying to complete 2.0 by this weekend only :)
Title: Re: Like Posts
Post by: barnaby jonez on October 17, 2014, 11:32:17 AM
Nice job Joker. Keeping an eye on 2.0, fingers crossed for success
Title: Re: Like Posts
Post by: Joker™ on October 17, 2014, 02:24:43 PM
Version 2.0, released

- PHP files converted to OOP, easy code management and readability
- JS file converted to singleton and compressed, in layman words, its more efficient and fast
- All inline css removed from JS and templates
- Likes text based on number of likes, reference url
- Handling for likes data when post is deleted/merged/move, reference url
- Like posts permission based on post count group, reference url
- New permission in admin panel to disbale like stats completely
- Permission to disbale notification for eveyone or based on user group
- In admin panel, new feature to optimize like tabel and remove likes from delete topic
- Some hidden/fun JS features added in admin panel
- Permissions fixes through out the codebase
- Tons of fixes
Title: Re: Like Posts
Post by: Elizabeth II on October 17, 2014, 02:44:35 PM
Is there an option to recount likes? as when that bug was present were you could like a single post more than once, some members have silly amounts of likes from 1 post.
Title: Re: Like Posts
Post by: Joker™ on October 17, 2014, 02:49:43 PM
Quote from: Britannia360 on October 17, 2014, 02:44:35 PM
Is there an option to recount likes? as when that bug was present were you could like a single post more than once, some members have silly amounts of likes from 1 post.
Yup option it still there.

QuoteRecount Like Stats
- To remove the deleted messages from likes count and stats
- To recount the total likes user has received so far. One should run this once a month at least.

Edit - I think what you are asking for requires a completely separate functionality
Title: Re: Like Posts
Post by: ryan_dwight on October 18, 2014, 02:30:53 PM
Great update Joker.

a little stuff due to my laziness is the permission which doesn't have a check all but nevertheless it was a great work. Thank you
Title: Re: Like Posts
Post by: Elizabeth II on October 18, 2014, 02:53:35 PM
Well I completely uninstalled the last version and db tables and reinstalled with the new version. I noticed that if you like a post, the Total Likes :- of that person stays 0.

Title: Re: Like Posts
Post by: gorbi on October 19, 2014, 01:55:05 AM
I installed the 2.0 mod, he began to swear at Theme, although Theme I have a standard. Went back to 1.6.1, he began to work with bugs (
Title: Re: Like Posts
Post by: gorbi on October 19, 2014, 02:04:49 AM
Unknown column 'lp.id_board' in 'where clause'
file: /var/www/gnewsR/g-news.com.ua/forum_smf/Sources/Subs-LikePosts.php
line: 172
Title: Re: Like Posts
Post by: Joker™ on October 19, 2014, 06:12:38 AM
Quote from: Britannia360 on October 18, 2014, 02:53:35 PM
Well I completely uninstalled the last version and db tables and reinstalled with the new version. I noticed that if you like a post, the Total Likes :- of that person stays 0.
Will look into it.


Quote from: gorbi on October 19, 2014, 01:55:05 AM
I installed the 2.0 mod, he began to swear at Theme, although Theme I have a standard. Went back to 1.6.1, he began to work with bugs (
You can't degrade from 2.0 to earlier version as, 2.0 contains DB changes. Due to DB changes old versions are going to fail. I'd strongly recommend to install 2.0, and if you come across issues, please post them in this topic itself.
Title: Re: Like Posts
Post by: gorbi on October 19, 2014, 08:04:31 AM
I repared DB and 1.6.1 began work.
Title: Re: Like Posts
Post by: Joker™ on October 19, 2014, 12:52:59 PM
Quote from: gorbi on October 19, 2014, 08:04:31 AM
I repared DB and 1.6.1 began work.
And whats the exact issue with 2.0?
Title: Re: Like Posts
Post by: gorbi on October 19, 2014, 01:05:50 PM
2.0 swore on the template, although  template is a standard. 'll post a screenshot later.
Title: Re: Like Posts
Post by: heisenberg3041 on October 19, 2014, 04:50:44 PM
I have a Problem. In the post Show, under the User Avatar, stay " Total Likes ". So i have 7 Likes for one Thread... but under my Avatar stayed only " Total Likes : 0 " ...

/EDIT

Look in my Forum. ( German Forum ) http://movie-point.net/index.php?topic=127.0#msg553
Title: Re: Like Posts
Post by: Steve on October 19, 2014, 07:36:35 PM
He's already looking into that ...

Quote from: Joker™ on October 19, 2014, 06:12:38 AM
Quote from: Britannia360 on October 18, 2014, 02:53:35 PM
Well I completely uninstalled the last version and db tables and reinstalled with the new version. I noticed that if you like a post, the Total Likes :- of that person stays 0.
Will look into it.
Title: Re: Like Posts
Post by: Joker™ on October 20, 2014, 12:12:14 AM
Quote from: ryan_dwight on October 18, 2014, 02:30:53 PM
Great update Joker.

a little stuff due to my laziness is the permission which doesn't have a check all but nevertheless it was a great work. Thank you
Try to click on permission name and see the magic ;).


Quote from: Steve on October 19, 2014, 07:36:35 PM
He's already looking into that ...

Quote from: Joker™ on October 19, 2014, 06:12:38 AM
Quote from: Britannia360 on October 18, 2014, 02:53:35 PM
Well I completely uninstalled the last version and db tables and reinstalled with the new version. I noticed that if you like a post, the Total Likes :- of that person stays 0.
Will look into it.
Thanks for the reply. Thats why I love SMF :D
Title: Re: Like Posts
Post by: heisenberg3041 on October 20, 2014, 04:19:16 AM
So what i have too do now ?
Title: Re: Like Posts
Post by: Joker™ on October 20, 2014, 08:12:01 AM
Quote from: heisenberg3041 on October 20, 2014, 04:19:16 AM
So what i have too do now ?
Just wait for a while, before I can find the root cause of the issue
Title: Re: Like Posts
Post by: heisenberg3041 on October 20, 2014, 08:16:53 AM
Okey. Thank you.
Title: Re: Like Posts
Post by: gorbi on October 20, 2014, 09:23:41 AM
Can you fix and 1.6.1 at the same time? )
Title: Re: Like Posts
Post by: shayneb on October 20, 2014, 02:36:07 PM
I just cannot get this to work correctly (SMF 2.0.9, LikePosts 2.0, used package manager but also had to enter some things manually).

It worked once, and hasn't since. If you see the attached picture, you can see that I was able to like a post, but am now unable to "unlike" it. When I click the button, nothing happens at all. Clicking "You liked this" does nothing, either.

I made a test account (Global Moderator) if that is necessary.

Edit: In my error log, I have this: 2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback
Title: Re: Like Posts
Post by: ryan_dwight on October 20, 2014, 04:49:53 PM
Quote from: Joker™ on October 20, 2014, 12:12:14 AM
Quote from: ryan_dwight on October 18, 2014, 02:30:53 PM
Great update Joker.

a little stuff due to my laziness is the permission which doesn't have a check all but nevertheless it was a great work. Thank you
Try to click on permission name and see the magic ;).


Quote from: Steve on October 19, 2014, 07:36:35 PM
He's already looking into that ...

Quote from: Joker™ on October 19, 2014, 06:12:38 AM
Quote from: Britannia360 on October 18, 2014, 02:53:35 PM
Well I completely uninstalled the last version and db tables and reinstalled with the new version. I noticed that if you like a post, the Total Likes :- of that person stays 0.
Will look into it.
Thanks for the reply. Thats why I love SMF :D
hahaha great magic you have there lol. Thanks
Title: Re: Like Posts
Post by: Joker™ on October 20, 2014, 11:34:30 PM
Found the issue for total likes not appearing. Will be releasing a fixed version by tomorrow :)
Title: Re: Like Posts
Post by: Joker™ on October 20, 2014, 11:36:04 PM
Quote from: gorbi on October 20, 2014, 09:23:41 AM
Can you fix and 1.6.1 at the same time? )
Gorbi,

There isn't an extra theme edit introduced in 2.0, so if 1.6.1 is working fine on your forum, 2.0 should also work fine. Also you can parse the mod and make edits manually. Moreover, I'm not fixing any older version as we are progressing ahead with 2.0+ only.
Title: Re: Like Posts
Post by: Joker™ on October 20, 2014, 11:37:46 PM
Quote from: shayneb on October 20, 2014, 02:36:07 PM
I just cannot get this to work correctly (SMF 2.0.9, LikePosts 2.0, used package manager but also had to enter some things manually).

It worked once, and hasn't since. If you see the attached picture, you can see that I was able to like a post, but am now unable to "unlike" it. When I click the button, nothing happens at all. Clicking "You liked this" does nothing, either.

I made a test account (Global Moderator) if that is necessary.

Edit: In my error log, I have this: 2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback
Hi shayneb,

Whats the php version you are using?
Also can you make a fresh test forum and see if the error persist?
Title: Re: Like Posts
Post by: Joker™ on October 20, 2014, 11:38:01 PM
Quote from: ryan_dwight on October 20, 2014, 04:49:53 PM
Quote from: Joker™ on October 20, 2014, 12:12:14 AM
Quote from: ryan_dwight on October 18, 2014, 02:30:53 PM
Great update Joker.

a little stuff due to my laziness is the permission which doesn't have a check all but nevertheless it was a great work. Thank you
Try to click on permission name and see the magic ;).


Quote from: Steve on October 19, 2014, 07:36:35 PM
He's already looking into that ...

Quote from: Joker™ on October 19, 2014, 06:12:38 AM
Quote from: Britannia360 on October 18, 2014, 02:53:35 PM
Well I completely uninstalled the last version and db tables and reinstalled with the new version. I noticed that if you like a post, the Total Likes :- of that person stays 0.
Will look into it.
Thanks for the reply. Thats why I love SMF :D
hahaha great magic you have there lol. Thanks

:D
Title: Re: Like Posts
Post by: shayneb on October 20, 2014, 11:53:07 PM
Quote from: Joker™ on October 20, 2014, 11:37:46 PM
Quote from: shayneb on October 20, 2014, 02:36:07 PM
I just cannot get this to work correctly (SMF 2.0.9, LikePosts 2.0, used package manager but also had to enter some things manually).

It worked once, and hasn't since. If you see the attached picture, you can see that I was able to like a post, but am now unable to "unlike" it. When I click the button, nothing happens at all. Clicking "You liked this" does nothing, either.

I made a test account (Global Moderator) if that is necessary.

Edit: In my error log, I have this: 2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback
Hi shayneb,

Whats the php version you are using?
Also can you make a fresh test forum and see if the error persist?

PHP version 5.4.24.  I made a completely new forum with *nothing* changed but adding this mod, and the "Like" button still does nothing.On the completely fresh forum, I still have the two errors in my error log:
http://www.shaynebundy.com/dndftw/forum2/index.php?action=likeposts;sa=like_post
Unable to load the 'main' template.

and

http://www.shaynebundy.com/dndftw/forum2/index.php?action=likeposts;sa=like_post
2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callbackApply Filter: Only show the errors from this file File: /home7/shaynebu/public_html/dndftw/forum2/index.php
Line: 161
Title: Re: Like Posts
Post by: Joker™ on October 21, 2014, 08:24:55 AM
Quote from: shayneb on October 20, 2014, 11:53:07 PM
Quote from: Joker™ on October 20, 2014, 11:37:46 PM
Quote from: shayneb on October 20, 2014, 02:36:07 PM
I just cannot get this to work correctly (SMF 2.0.9, LikePosts 2.0, used package manager but also had to enter some things manually).

It worked once, and hasn't since. If you see the attached picture, you can see that I was able to like a post, but am now unable to "unlike" it. When I click the button, nothing happens at all. Clicking "You liked this" does nothing, either.

I made a test account (Global Moderator) if that is necessary.

Edit: In my error log, I have this: 2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callback
Hi shayneb,

Whats the php version you are using?
Also can you make a fresh test forum and see if the error persist?

PHP version 5.4.24.  I made a completely new forum with *nothing* changed but adding this mod, and the "Like" button still does nothing.On the completely fresh forum, I still have the two errors in my error log:
http://www.shaynebundy.com/dndftw/forum2/index.php?action=likeposts;sa=like_post
Unable to load the 'main' template.

and

http://www.shaynebundy.com/dndftw/forum2/index.php?action=likeposts;sa=like_post
2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callbackApply Filter: Only show the errors from this file File: /home7/shaynebu/public_html/dndftw/forum2/index.php
Line: 161
Are you able to access the like stats, likes admin panel etc?
Title: Re: Like Posts
Post by: shayneb on October 21, 2014, 10:32:32 AM
Ah, sorry for not including that: Likes Admin Page, yes (and as far as I can tell, every checkbox does what ti's supposed to), but Like Stats says: Unable to load the 'main' template.
Title: Re: Like Posts
Post by: gorbi on October 21, 2014, 11:10:13 AM
Quote from: shayneb on October 21, 2014, 10:32:32 AM
Ah, sorry for not including that: Likes Admin Page, yes (and as far as I can tell, every checkbox does what ti's supposed to), but Like Stats says: Unable to load the 'main' template.
+1
Title: Re: Like Posts
Post by: Joker™ on October 21, 2014, 01:14:26 PM
It looks like the required files aren't uploaded/extract properly.

1. Download the mod from here (http://custom.simplemachines.org/mods/index.php?mod=3708)
2. Extract it on your computer
3. Upload the files from source folder and theme folders manually and see if the error persist.
Title: Re: Like Posts
Post by: shayneb on October 21, 2014, 02:12:09 PM
Quote from: Joker™ on October 21, 2014, 01:14:26 PM
It looks like the required files aren't uploaded/extract properly.

1. Download the mod from here (http://custom.simplemachines.org/mods/index.php?mod=3708)
2. Extract it on your computer
3. Upload the files from source folder and theme folders manually and see if the error persist.

"Unable to load main template" error persists after replacing the files automatically added by the installer with ones extracted from the .zip on my computer. Like button still does nothing.
Title: Re: Like Posts
Post by: Joker™ on October 21, 2014, 02:24:02 PM
Quote from: shayneb on October 21, 2014, 02:12:09 PM
Quote from: Joker™ on October 21, 2014, 01:14:26 PM
It looks like the required files aren't uploaded/extract properly.

1. Download the mod from here (http://custom.simplemachines.org/mods/index.php?mod=3708)
2. Extract it on your computer
3. Upload the files from source folder and theme folders manually and see if the error persist.

"Unable to load main template" error persists after replacing the files automatically added by the installer with ones extracted from the .zip on my computer. Like button still does nothing.
Okzzz, instead of going round with the issue, can you set up a fresh forum with mod for me. I would be happy to look at it all, but will need ftp/admin account pm me if interested
Title: Re: Like Posts
Post by: shayneb on October 21, 2014, 02:36:45 PM
Quote from: Joker™ on October 21, 2014, 02:24:02 PM
Quote from: shayneb on October 21, 2014, 02:12:09 PM
Quote from: Joker™ on October 21, 2014, 01:14:26 PM
It looks like the required files aren't uploaded/extract properly.

1. Download the mod from here (http://custom.simplemachines.org/mods/index.php?mod=3708)
2. Extract it on your computer
3. Upload the files from source folder and theme folders manually and see if the error persist.

"Unable to load main template" error persists after replacing the files automatically added by the installer with ones extracted from the .zip on my computer. Like button still does nothing.
Okzzz, instead of going round with the issue, can you set up a fresh forum with mod for me. I would be happy to look at it all, but will need ftp/admin account pm me if interested

I already set up the fresh forum with the mod, per my previous post. I PMd you the details, including the username/pw of a test administrator account.
Title: Re: Like Posts
Post by: Joker™ on October 21, 2014, 03:55:37 PM
Quote from: shayneb on October 20, 2014, 11:53:07 PM
PHP version 5.4.24.  I made a completely new forum with *nothing* changed but adding this mod, and the "Like" button still does nothing.On the completely fresh forum, I still have the two errors in my error log:
http://www.shaynebundy.com/dndftw/forum2/index.php?action=likeposts;sa=like_post
Unable to load the 'main' template.

and

http://www.shaynebundy.com/dndftw/forum2/index.php?action=likeposts;sa=like_post
2: call_user_func(LikePostsRouter::routeLikes) [<a href='function.call-user-func'>function.call-user-func</a>]: First argument is expected to be a valid callbackApply Filter: Only show the errors from this file File: /home7/shaynebu/public_html/dndftw/forum2/index.php
Line: 161
Thanks to shayneb for providing the admin account and ftp access. At last I was able to get hold of the issue and it'll be rolled out in next release with other bug fixes. In the mean time if someone else is also facing the similar issue, simple replace the attached file with the one in 'Sources/LikePosts/LikePostsRouter.php"
Title: Re: Like Posts
Post by: shayneb on October 21, 2014, 03:58:27 PM
To everyone who is having issues with version 2.0:

Joker is working on it and is aware of some problems, including (but possibly not limited to):
Nothing happening when you click the Like button
"Like" not changing to "Unlike" after being clicked (if anything happened at all)
Board Like buttons reflecting the likes of single posts inside them
"Unable to load main template" issue in the Like Stats and error log
"First argument is expected to be a valid callback" in the error log
Title: Re: Like Posts
Post by: heisenberg3041 on October 21, 2014, 05:06:08 PM
So we have too wait for a update. About the thing with the " Total Likes " under the Avatar ?
Title: Re: Like Posts
Post by: Steve on October 21, 2014, 08:11:09 PM
You don't HAVE to but if you're smart you will. ;) :D
Title: Re: Like Posts
Post by: gorbi on October 22, 2014, 12:57:18 AM
Maybe go smaller steps? 8)
Title: Re: Like Posts
Post by: Joker™ on October 22, 2014, 03:34:12 AM
Updated the mod version2.0.1 with the following fixes

- Fix for total likes not appearing
- Fix for method accessing issue via action hook
- Fix for like button text not changing
- Added admin function to remove duplicate like entries from DB
- Fixes for upgrade cleaning out the mod settings
Title: Re: Like Posts
Post by: shayneb on October 22, 2014, 10:18:01 AM
Quote from: Joker™ on October 22, 2014, 03:34:12 AM
Updated the mod version2.0.1 with the following fixes

- Fix for total likes not appearing
- Fix for method accessing issue via action hook
- Fix for like button text not changing
- Added admin function to remove duplicate like entries from DB
- Fixes for upgrade cleaning out the mod settings

This appears to be working for me! Like button works, text changes correctly when pressed, animation is adorable, and no more errors in my error log!
Thank you so much for your dedication to this mod. For a small forum with a lot of "lazy" people (:D), being able to just press a button to show support is a wonderful thing.

Can I remove my test forum now, or do you need/want it for any further testing?
Title: Re: Like Posts
Post by: Joker™ on October 22, 2014, 10:42:38 AM
Quote from: shayneb on October 22, 2014, 10:18:01 AM
This appears to be working for me! Like button works, text changes correctly when pressed, animation is adorable, and no more errors in my error log!
Thank you so much for your dedication to this mod. For a small forum with a lot of "lazy" people (:D), being able to just press a button to show support is a wonderful thing.

Can I remove my test forum now, or do you need/want it for any further testing?
Thanks for the nice words. Yup, you can remove the test forum and thanks for providing me the required resources for fixing the issue :).
Title: Re: Like Posts
Post by: gorbi on October 22, 2014, 11:45:31 AM
installation is not successful
Title: Re: Like Posts
Post by: Joker™ on October 22, 2014, 12:16:49 PM
Quote from: gorbi on October 22, 2014, 11:45:31 AM
installation is not successful
In that case you can go ahead with the errors and make the remaining(error'd) edit manually by referring the required changes from here (http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=236547;smf_version=2.0.9)
Title: Re: Like Posts
Post by: gorbi on October 22, 2014, 01:42:55 PM
Where can I see working 2.0.1?
Title: Re: Like Posts
Post by: Beelzeboss on October 22, 2014, 02:00:05 PM
Quote from: Joker™ on October 22, 2014, 03:34:12 AM
Updated the mod version2.0.1 with the following fixes

- Fix for total likes not appearing
- Fix for method accessing issue via action hook
- Fix for like button text not changing
- Added admin function to remove duplicate like entries from DB
- Fixes for upgrade cleaning out the mod settings

Thanks for the update. :)

Now the only problem that I noticed is in "Recount members total likes". It can not be started. The other two ( "Check likes table/ Remove duplicate likes") start after a few seconds you click the button.
Title: Re: Like Posts
Post by: Joker™ on October 23, 2014, 03:30:36 AM
Quote from: gorbi on October 22, 2014, 01:42:55 PM
Where can I see working 2.0.1?
Ummm, set up a test forum and install the mod :P

Quote from: Beelzeboss on October 22, 2014, 02:00:05 PM
Quote from: Joker™ on October 22, 2014, 03:34:12 AM
Updated the mod version2.0.1 with the following fixes

- Fix for total likes not appearing
- Fix for method accessing issue via action hook
- Fix for like button text not changing
- Added admin function to remove duplicate like entries from DB
- Fixes for upgrade cleaning out the mod settings

Thanks for the update. :)

Now the only problem that I noticed is in "Recount members total likes". It can not be started. The other two ( "Check likes table/ Remove duplicate likes") start after a few seconds you click the button.
Which browser are you using?
Title: Re: Like Posts
Post by: Beelzeboss on October 23, 2014, 06:09:17 AM
Quote from: Joker™ on October 23, 2014, 03:30:36 AM
Which browser are you using?

Firefox  32.x or 33.x and chrome 38.x. I have cleared the cache and repaired the database. The table like_post has ~55.000 entries.
Title: Re: Like Posts
Post by: power505 on October 24, 2014, 08:13:05 AM
Hello, I would like to ask you two things:

1. Is it possible to somehow remove "Total likes" field from profile (under avatar)?
2. How can i realign LIKE button before "Report to moderator" line?
Title: Re: Like Posts
Post by: Joker™ on October 24, 2014, 09:47:16 AM
Quote from: Beelzeboss on October 23, 2014, 06:09:17 AM
Quote from: Joker™ on October 23, 2014, 03:30:36 AM
Which browser are you using?

Firefox  32.x or 33.x and chrome 38.x. I have cleared the cache and repaired the database. The table like_post has ~55.000 entries.
Hmmm, I'll try to reproduce the issue.


Quote from: power505 on October 24, 2014, 08:13:05 AM
Hello, I would like to ask you two things:

1. Is it possible to somehow remove "Total likes" field from profile (under avatar)?
2. How can i realign LIKE button before "Report to moderator" line?
Will be giving you the directions in a few hrs, right now bit busy with something.
Title: Re: Like Posts
Post by: heisenberg3041 on October 24, 2014, 05:44:16 PM
Quote from: Joker™ on October 22, 2014, 03:34:12 AM
Updated the mod version2.0.1 with the following fixes

- Fix for total likes not appearing
- Fix for method accessing issue via action hook
- Fix for like button text not changing
- Added admin function to remove duplicate like entries from DB
- Fixes for upgrade cleaning out the mod settings

Very nice. It works ! :) Thanks
Title: Re: Like Posts
Post by: BiGBLiZZ on October 26, 2014, 05:01:00 PM
I have a weird problem, I couldn't find it posted in this thread (My apologies if its been covered already).

Running 2.0.9 with this mod 2.0.1  Everything works. And it all works very well. But only when I am logged in as Admin.  When logged in as a regular member (does not matter which membergroup) the pop up for "Like Stats" on the main menu bar never loads. It just opens, then shows the loading graphic forever. When I am logged in as Admin, it opens and loads right away, and all works (all the secondary tabs inside the pop up)

The only error in the error log is from this mod, but I am not sure if its related or not.


Apply Filter: Only show the error messages of this URL
/path/tomy/foum/index.php?action=likepostsstatsajax
Apply Filter: Only show the errors with the same message
Database Error: Unknown column 'b.member_groups' in 'where clause'
Apply Filter: Only show the errors from this file
File: /path/tomy/forum/Sources/LikePosts/DB/LikePostsStatsDB.php
Line: 58


I don't know how to fix it.
Title: Re: Like Posts
Post by: johndays on October 27, 2014, 10:41:55 AM
Quote from: Joker™ on September 06, 2014, 03:51:56 AM
Quote from: johndays on August 14, 2014, 04:15:04 PM
Quote from: johndays on July 27, 2014, 07:14:17 AM
Thank you for your continuous feedback.

@Joker™

Some samples :

João (ã)
Informação (ç and ã)

At least this 2.

Best regards,
Quote from: Joker™Thanks for the info, will be trying it out soon.

There is some update? Thank you so much in advance.
Hey there,

I tried with the above mentioned text and several other texts, but wasn't able to reproduce the error. Umm.. does your forum uses UTF-8, also pm me a test account of your forum.

As soon as I have time, I will try to reproduce the error. Thank you very much @Joker™
Title: Re: Like Posts
Post by: Joker™ on October 27, 2014, 11:03:44 AM
Quote from: BiGBLiZZ on October 26, 2014, 05:01:00 PM
I have a weird problem, I couldn't find it posted in this thread (My apologies if its been covered already).

Running 2.0.9 with this mod 2.0.1  Everything works. And it all works very well. But only when I am logged in as Admin.  When logged in as a regular member (does not matter which membergroup) the pop up for "Like Stats" on the main menu bar never loads. It just opens, then shows the loading graphic forever. When I am logged in as Admin, it opens and loads right away, and all works (all the secondary tabs inside the pop up)

The only error in the error log is from this mod, but I am not sure if its related or not.


Apply Filter: Only show the error messages of this URL
/path/tomy/foum/index.php?action=likepostsstatsajax
Apply Filter: Only show the errors with the same message
Database Error: Unknown column 'b.member_groups' in 'where clause'
Apply Filter: Only show the errors from this file
File: /path/tomy/forum/Sources/LikePosts/DB/LikePostsStatsDB.php
Line: 58


I don't know how to fix it.

Quote from: Beelzeboss on October 22, 2014, 02:00:05 PM
Now the only problem that I noticed is in "Recount members total likes". It can not be started. The other two ( "Check likes table/ Remove duplicate likes") start after a few seconds you click the button.
Found both of the above mentioned bugs, fixed it, will be rolled out with next release
Title: Re: Like Posts
Post by: Joker™ on October 27, 2014, 12:01:27 PM
Quote from: power505 on October 24, 2014, 08:13:05 AM
Hello, I would like to ask you two things:

1. Is it possible to somehow remove "Total likes" field from profile (under avatar)?
2. How can i realign LIKE button before "Report to moderator" line?
Added 1st point as an option in admin panel
Title: Re: Like Posts
Post by: Joker™ on October 27, 2014, 12:12:39 PM
Updated the mod version 2.0.2 with the following fixes

- Fix for like stats not showing for regular/general groups
- Fix for recount like stats not working in admin panel
- Added option to show/hide total likes in posts

You can read the complete change log over here[url] (https://github.com/siddhartha-gupta/SMF-Likes/blob/master/changelog.md)
Title: Re: Like Posts
Post by: BiGBLiZZ on October 28, 2014, 01:13:07 AM
Thanks so much. That has fixed my issue. 'Grats. My members love the mod. Well done!
Title: Re: Like Posts
Post by: gorbi on October 28, 2014, 03:23:22 AM
Here's another error with version 1.6.1. The window with new likes is shifted.
Title: Re: Like Posts
Post by: Beelzeboss on October 28, 2014, 08:18:47 AM
Quote from: Joker™ on October 27, 2014, 11:03:44 AM
Found both of the above mentioned bugs, fixed it, will be rolled out with next release

Thanks so much. I'll try the next version and I'll come for feedback.

Quote from: gorbi on October 28, 2014, 03:23:22 AM
Here's another error with version 1.6.1. The window with new likes is shifted.

Is this from a smartphone? Which OS/browser do you use? I also use this version and I have not these issues with android stock browser or chrome. I had reported these (http://www.simplemachines.org/community/index.php?topic=506743.msg3730165#msg3730165) but Joker have fixed them from version 1.6.1 and after.
Title: Re: Like Posts
Post by: gorbi on October 28, 2014, 08:57:46 AM
This is Google Chrome 38.0.2125.104 m. Mod 2.0.2
Title: Re: Like Posts
Post by: Beelzeboss on October 28, 2014, 09:16:53 AM
Quote from: gorbi on October 28, 2014, 08:57:46 AM
This is Google Chrome 38.0.2125.104 m. Mod 2.0.2

I have installed the latest android Chrome browser ver 38.0.2125.102 and I have no issues. So I'll suggest you to try a more stable version.
Title: Re: Like Posts
Post by: gorbi on October 28, 2014, 10:43:57 AM
I have not problem with Android, problem for Windows XP 8)
Title: Re: Like Posts
Post by: Joker™ on October 30, 2014, 12:24:13 AM
Quote from: gorbi on October 28, 2014, 03:23:22 AM
Here's another error with version 1.6.1. The window with new likes is shifted.

Quote from: gorbi on October 28, 2014, 08:57:46 AM
This is Google Chrome 38.0.2125.104 m. Mod 2.0.2

Quote from: gorbi on October 28, 2014, 10:43:57 AM
I have not problem with Android, problem for Windows XP 8)

Hi gorbi,

Which version of mod are you exactly using?
Is that issue occurring on Mobile/tablet or desktop?
As you have said its google chrome, I tried with the same on desktop and wasn't able to reproduce it. Can you try on some other machine as well?
Title: Re: Like Posts
Post by: gorbi on October 30, 2014, 01:23:35 AM
2.0.2, desktop. And i hide this option in admin panel  ;)
Title: Re: Like Posts
Post by: Beelzeboss on October 30, 2014, 08:34:15 AM
Quote from: Beelzeboss on October 28, 2014, 08:18:47 AM
Thanks so much. I'll try the next version and I'll come for feedback.

Here, everything works fine. I haven't noticed any issue. Thanks again! :D
Title: Re: Like Posts
Post by: Joker™ on October 31, 2014, 12:35:28 PM
Quote from: gorbi on October 30, 2014, 01:23:35 AM
2.0.2, desktop. And i hide this option in admin panel  ;)
PM me the site link and a test account
Title: Re: Like Posts
Post by: gorbi on October 31, 2014, 02:04:35 PM
send
Title: Re: Like Posts
Post by: gorbi on November 01, 2014, 07:25:37 AM
With love from Ukraine :-) New russian for 2.0.2

Joker the best!
Title: Re: Like Posts
Post by: Joker™ on November 02, 2014, 11:05:56 PM
Hi gorbi,

I'm unable to see the like notification button.

Quote from: gorbi on November 01, 2014, 07:25:37 AM
With love from Ukraine :-) New russian for 2.0.2

Joker the best!
Thanks, will be including it in the next release :)
Title: Re: Like Posts
Post by: gorbi on November 03, 2014, 12:14:00 AM
Quote from: Joker™ on November 02, 2014, 11:05:56 PM
Hi gorbi,
I'm unable to see the like notification button.
I turn again )
Title: Re: Like Posts
Post by: larry007 on November 03, 2014, 06:09:29 AM
Hi

look please to the picture...

1. The menu (template inferno) shines thru the like box overview and it is clickable...

I don't want this.... any help?

2. How can I put a image under "Unlike and like" button?

THX
Title: Re: Like Posts
Post by: power505 on November 04, 2014, 04:59:32 AM
If I update mod on new version, does like stats resets or stayed the same?
Title: Re: Like Posts
Post by: gorbi on November 04, 2014, 05:34:23 AM
not reset
Title: Re: Like Posts
Post by: Joker™ on November 04, 2014, 11:54:35 AM
Quote from: larry007 on November 03, 2014, 06:09:29 AM
Hi

look please to the picture...

1. The menu (template inferno) shines thru the like box overview and it is clickable...

I don't want this.... any help?

2. How can I put a image under "Unlike and like" button?

THX
Thanks for reporting it, will be fixed with the next release.


Quote from: power505 on November 04, 2014, 04:59:32 AM
If I update mod on new version, does like stats resets or stayed the same?
Likes stays intact and nothing gets deleted ;)


@gorbi, I've see the issue with likes notification and it'll be fixed with the next release.


Issues are tracked over here (https://github.com/siddhartha-gupta/SMF-Likes/issues). Please do let me know if I missed to track something.
Title: Re: Like Posts
Post by: power505 on November 04, 2014, 12:12:07 PM
Quote from: Joker™ on October 27, 2014, 12:01:27 PM
Quote from: power505 on October 24, 2014, 08:13:05 AM
1. Is it possible to somehow remove "Total likes" field from profile (under avatar)?
Added 1st point as an option in admin panel
Quote from: Joker™ on November 04, 2014, 11:54:35 AM
Quote from: power505 on November 04, 2014, 04:59:32 AM
If I update mod on new version, does like stats resets or stayed the same?
Likes stays intact and nothing gets deleted ;)

Thx for answer. I especially appreciate what you did from first quote :)
Title: Re: Like Posts
Post by: Elizabeth II on November 04, 2014, 03:45:20 PM
tiny detail issue, if you like a post, sometimes (when it already has likes) it goes:

(You &amp; 2 other people liked this)
Title: Re: Like Posts
Post by: Joker™ on November 04, 2014, 08:46:54 PM
Quote from: Britannia360 on November 04, 2014, 03:45:20 PM
tiny detail issue, if you like a post, sometimes (when it already has likes) it goes:

(You &amp; 2 other people liked this)

Opps, look like text is not parsed into HTML entity. Tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/34)

Joker made a booboo :laugh:
Title: Re: Like Posts
Post by: szinski on November 07, 2014, 04:10:00 PM
I seem to be having an issue with SSL. When I connect to my forum via https: none of the javascript works. Will someone point me in the right direction how to fix this? Thanks!
Title: Re: Like Posts
Post by: szinski on November 07, 2014, 04:21:57 PM
Never mind, I edited LikePosts.php and changed all references of http://ajax... to https://ajax... which solved the problem.
Title: Re: Like Posts
Post by: Joker™ on November 09, 2014, 08:21:25 AM
Quote from: Blue Crab on November 07, 2014, 04:21:57 PM
Never mind, I edited LikePosts.php and changed all references of http://ajax... to https://ajax... which solved the problem.
Nice to hear, still tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/35)
Title: Re: Like Posts
Post by: RoadRanger on November 22, 2014, 04:32:48 PM
Awesome mod, I replaced my kludged "karma" usage with it :) . I do wish it looked a bit more integrated with the forum, maybe with the "Like" button next to the "report to moderator"? It'd be cool to change the "report to moderator" to a "report" button similar to the "like" button too :) . One minor bug I see is if a topic is "pinned" the (x people like this) message on the topic overstrikes the "pinned" icon:
http://cacophony.aspinock.com/index.php?board=26.0
Title: Re: Like Posts
Post by: iain sherriff on November 25, 2014, 09:30:04 AM
Hi
I installed  this on a test board. It went ok but gave install error on index.template.php.

I'm sure this is because I have the "unread enhancement" mod so the bit of code your mod looks for isn't there !

The like button appeared and all the admin stuff was there and useable. When I clicked the button there was no action tho...............could this be just because of the error ?

(I can't show you as the test site crashed  over something else)
Title: Re: Like Posts
Post by: Steve on November 27, 2014, 07:25:41 PM
Hopefully someone with coding skills (because I have none) can help me here ...

I have a test fail on 3 themes and all 3 are for the same reason. In index.template.php the mod is looking for:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

And wants to add after that:


if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
}


But in these 3 themes, the only place where 'action=unreadreplies' shows is in this code:

<div id="t_bar">';
if ($context['user']['is_logged'])
{
  echo'
<div class="time_bar">
<span>', $context['current_time'], '</span>
</div>
<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>
</div>';
}
else
{
echo '
<div class="user_bar">
<script type="text/javascript" src="', $settings['default_theme_url'], '/scripts/sha1.js"></script>
<form id="guest_form" action="', $scripturl, '?action=login2" method="post" accept-charset="', $context['character_set'], '" ', empty($context['disable_login_hashing']) ? ' onsubmit="hashLoginPassword(this, \'' . $context['session_id'] . '\');"' : '', '>
<span>'.$txt['username'].': </span><input type="text" name="user" size="10" class="input_text" />
<span>'.$txt['password'].': </span><input type="password" name="passwrd" size="10" class="input_password" />
<input type="submit" value="', $txt['login'], '" class="button_submit" />
</form>
</div>';
}
 
echo'
</div>


How do I rewrite the last code to make this work?
Title: Re: Like Posts
Post by: Black Tiger on November 27, 2014, 07:29:10 PM
I just installed this mod on a 2.0.9 forum via the package manager and got a white screen afterwards.
It seemed instead of making some "Likepost" directory's in the Theme section in the images and scripts directory, it made empty files called "likeposts.
Same happened with the DB directory in Sources/Likeposts.

After I deleted the empty files and created the directory's as should be. Things were working fine again.

Maye this can be fixed in the next release?
Title: Re: Like Posts
Post by: njsuperglide on November 29, 2014, 01:59:47 PM
I installed this mod on my SMF 2.06 and can access the admin screens but the Like button does not appear on my posts.
Title: Re: Like Posts
Post by: iain sherriff on November 30, 2014, 05:21:33 AM
Quote from: Steve on November 27, 2014, 07:25:41 PM
Hopefully someone with coding skills (because I have none) can help me here ...

Steve. This will be due to a mod you have (see my post above). If you read this topic there are examples people have posted that have answers......none of them help with my theme issue but you may be lucky :)
Otherwise someone will answer .....
Title: Re: Like Posts
Post by: Steve on November 30, 2014, 09:18:58 AM
I can't imagine it being a mod issue as all my other themes worked just fine. I've read this entire thread and there's nothing that suggests a solution for me. I just need to know how to code that one section in those 3 themes so the mod works the way it's supposed to. Thanks though. :)
Title: Re: Like Posts
Post by: iain sherriff on November 30, 2014, 09:26:35 AM
My guess is that you have a mod that has altered that part of the SMF code (a navigation mod of some type like mine). The mod works fine but as it has altered the code this "like" mod can't see the code it looks for when installing
Title: Re: Like Posts
Post by: Steve on November 30, 2014, 09:28:58 AM
If that were the case it wouldn't work on any theme that I have, would it not?

Besides, I really don't care WHY it's not working, I'd just like to know how to write the code above so that it WILL work on those themes.
Title: Re: Like Posts
Post by: iain sherriff on November 30, 2014, 09:39:11 AM
If all your themes have been changed the same way......yes.

as I said......this is my guess. if I know I would probably not have needed to ask the question about my theme  ;)
Title: Re: Like Posts
Post by: Steve on November 30, 2014, 09:41:18 AM
I edited my previous post and I do appreciate your input but it's not helping me answer my question. :)
Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 09:45:01 AM
I would like to change the language and the "like" button on this mod. Is there a possibility?
For example, there is no default .gif or .jpg that is used so I presume the noavatar.png is used and the text "Like" is projected on there with color some way?

Is there an easy way to change that to for example "Bedankt" and also translate the lines about the Like mod in the user profile field?

I'm sorry I forgot to mention that we found the English language file and translated that to LikePosts.dutch.php but when using that, it's producing an error on the forums.
Title: Re: Like Posts
Post by: kelvincool on November 30, 2014, 10:05:26 AM
Replace this bit:

<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>
</div>';


With this:

<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>';
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo ' |
<span><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></span>';
}
echo ' </div>';



Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 10:23:26 AM
@Kevin: I presume that code is ment for Steve?
Title: Re: Like Posts
Post by: kelvincool on November 30, 2014, 10:54:46 AM
@Black Tiger, yes that was for Steve.
Title: Re: Like Posts
Post by: Steve on November 30, 2014, 05:31:45 PM
Thanks kelvin. Will get back to you on it. :)
Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 06:47:06 PM
Anybody a clue on why the forums turn off with a "template error" notice when creating for example LikePosts.dutch.php and putting that in the language directory next to LikePosts.english.php?
Title: Re: Like Posts
Post by: Arantor on November 30, 2014, 08:21:04 PM
What error *exactly* do you get?
Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 08:37:07 PM
Now I get a white screen, probably because a mod I implemented.
But this is what the error_log says now:
PHP Parse error:  syntax error, unexpected T_STRING in /home/duckfile/public_html/forum/Themes/default/languages/LikePosts.dutch.php on line 154

I checked the Russion translation and saw that the frontend part (first part) was not translated, can that be the cause?
Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 08:39:20 PM
This is line 154 in LikePosts.dutch.php:
$txt['lp_select_all_boards'] = 'Selecteer alle (sub)forums';
Title: Re: Like Posts
Post by: Arantor on November 30, 2014, 08:41:01 PM
So then there's something wrong with line 153.
Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 09:02:47 PM
With 153, not with 154? Oke I'll compare both, but tomorrow, going to sleep now. :)
Title: Re: Like Posts
Post by: Arantor on November 30, 2014, 09:49:28 PM
Well, it's complaining that line 154 is where it hits an unexpected string which implies the one on line 153 wasn't terminated properly or was otherwise damaged.
Title: Re: Like Posts
Post by: Black Tiger on November 30, 2014, 09:59:37 PM
Yes I have fixed it.... there was a ' missing on line 153 indeed. ;)
Title: Re: Like Posts
Post by: Sacha on November 30, 2014, 10:00:26 PM
After the installation i had this error:

(http://i.imgur.com/Rqnc0ve.png)
Title: Re: Like Posts
Post by: Joker™ on December 02, 2014, 08:12:26 AM
Quote from: RoadRanger on November 22, 2014, 04:32:48 PM
Awesome mod, I replaced my kludged "karma" usage with it :) . I do wish it looked a bit more integrated with the forum, maybe with the "Like" button next to the "report to moderator"? It'd be cool to change the "report to moderator" to a "report" button similar to the "like" button too :) . One minor bug I see is if a topic is "pinned" the (x people like this) message on the topic overstrikes the "pinned" icon:
http://cacophony.aspinock.com/index.php?board=26.0
Tracked - https://github.com/siddhartha-gupta/SMF-Likes/issues/36
Title: Re: Like Posts
Post by: Joker™ on December 02, 2014, 08:13:21 AM
Quote from: iain sherriff on November 25, 2014, 09:30:04 AM
Hi
I installed  this on a test board. It went ok but gave install error on index.template.php.

I'm sure this is because I have the "unread enhancement" mod so the bit of code your mod looks for isn't there !

The like button appeared and all the admin stuff was there and useable. When I clicked the button there was no action tho...............could this be just because of the error ?

(I can't show you as the test site crashed  over something else)
Well I need to see the website and only then I can identify and comment on the issue
Title: Re: Like Posts
Post by: Joker™ on December 02, 2014, 08:41:36 PM
Quote from: njsuperglide on November 29, 2014, 01:59:47 PM
I installed this mod on my SMF 2.06 and can access the admin screens but the Like button does not appear on my posts.
have you selected the boards as well where this mod should be active?
Title: Re: Like Posts
Post by: Joker™ on December 02, 2014, 08:45:45 PM
Quote from: Sacha on November 30, 2014, 10:00:26 PM
After the installation i had this error:

(http://i.imgur.com/Rqnc0ve.png)
Which PHP version are you using?
Title: Re: Like Posts
Post by: Joker™ on December 02, 2014, 08:46:30 PM
Quote from: Steve on November 30, 2014, 05:31:45 PM
Thanks kelvin. Will get back to you on it. :)
Do you require any further help on the same
Title: Re: Like Posts
Post by: Steve on December 02, 2014, 08:51:34 PM
Quote from: Joker™ on December 02, 2014, 08:46:30 PM
Quote from: Steve on November 30, 2014, 05:31:45 PM
Thanks kelvin. Will get back to you on it. :)
Do you require any further help on the same
Sorry, haven't had a chance to try it yet. Too much turkey and all. ;)
Title: Re: Like Posts
Post by: Arantor on December 02, 2014, 08:55:25 PM
wut, it's only 3rd December. Now, if it was eggnog, I could understand... ;)
Title: Re: Like Posts
Post by: Steve on December 02, 2014, 09:43:25 PM
Been doing that too ... :P
Title: Re: Like Posts
Post by: Sacha on December 04, 2014, 10:08:17 AM
Quote from: Joker™ on December 02, 2014, 08:45:45 PM
Quote from: Sacha on November 30, 2014, 10:00:26 PM
After the installation i had this error:

(http://i.imgur.com/Rqnc0ve.png)
Which PHP version are you using?

I've already solved it. The problem was the PHP Version. Thank you! :)
Title: Re: Like Posts
Post by: Joker™ on December 06, 2014, 03:43:08 AM
Mod update to version 2.0.3 with fixes. So can read the complete change log over here

https://github.com/siddhartha-gupta/SMF-Likes/blob/master/changelog.md
Title: Re: Like Posts
Post by: fotografo74 on December 18, 2014, 07:41:38 AM
Hi @Joker,
thanks for this MOD!
I installed manually this mod in my custom theme  Pelikan by DzinerStudio), it works ok, i have only one little problem:
the box that appears after click to Show likes notification closes after few moments and i'm unable see this box :(
How can i fix this problem?
I think this functionality of your Mod ( Show likes notification)  conflicts with Highslide Image viewer Mod
If i enable Show likes notification the mod Highslide Image viewer not works.



Thanks
Antonio
Title: Re: Like Posts
Post by: Joker™ on January 03, 2015, 10:07:38 PM
Quote from: fotografo74 on December 18, 2014, 07:41:38 AM
Hi @Joker,
thanks for this MOD!
I installed manually this mod in my custom theme  Pelikan by DzinerStudio), it works ok, i have only one little problem:
the box that appears after click to Show likes notification closes after few moments and i'm unable see this box :(
How can i fix this problem?
I think this functionality of your Mod ( Show likes notification)  conflicts with Highslide Image viewer Mod
If i enable Show likes notification the mod Highslide Image viewer not works.



Thanks
Antonio
Tracked https://github.com/siddhartha-gupta/SMF-Likes/issues/38
Title: Re: Like Posts
Post by: coltp45 on January 04, 2015, 01:33:31 AM
Quote from: kelvincool on November 30, 2014, 10:05:26 AM
Replace this bit:

<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>
</div>';


With this:

<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>';
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo ' |
<span><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></span>';
}
echo ' </div>';

Hello, in which file must make this modification
Title: Re: Like Posts
Post by: TrackMustangsOnline on January 10, 2015, 05:13:16 PM
Great mod, thanks!
Title: Re: Like Posts
Post by: gaurav09 on January 12, 2015, 06:33:30 AM
how to install this mod on different theme ??
It's giving error :-

./Themes/demo/index.template.php       Test failed

Find
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Add After
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
}


I tried to install on 2-3 themes, but it's giving this same "index.template.php" error  :'(

Please fix..i tried on this theme also : http://www.simplemachines.org/community/index.php?topic=519444.0
Title: Re: Like Posts
Post by: Steve on January 12, 2015, 09:32:52 AM
Have you read through this yet?

http://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: Like Posts
Post by: gaurav09 on January 12, 2015, 10:23:02 AM
Quote from: Steve on January 12, 2015, 09:32:52 AM
Have you read through this yet?

http://wiki.simplemachines.org/smf/Error_in_mod_installation
yeh read this,..but i checked my index.template.php file,..there is no code which needs to be found !!

i found one some type of similar code that is :-

<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>


this below code is not atall present in themes index.template.php file !!

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Joker only you can help,..please help !!
Title: Re: Like Posts
Post by: _monotiz_ on January 12, 2015, 11:14:56 AM
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>


is the equivalent piece of code of

<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>
Title: Re: Like Posts
Post by: gaurav09 on January 13, 2015, 07:48:11 AM
Quote from: _monotiz_ on January 12, 2015, 11:14:56 AM
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>


is the equivalent piece of code of

<a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a>

I also tried to edit index.template.php manually, i added this below code after above code, but forum got error.

if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
}
Title: Re: Like Posts
Post by: margarett on January 13, 2015, 07:49:08 AM
Can you please add here some more 5-10 lines, above and below this:
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>

Title: Re: Like Posts
Post by: gaurav09 on January 13, 2015, 08:48:40 AM
@margarett
<div id="userbox" class="dropup" style="display: none;">
<ul class="dropdown-menu">
<li>
<a href="'. $scripturl. '?action=profile">
<img src="'. $settings['images_url'] .'/userbox/profile.png" alt="*" />
', $txt['profile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=account">
<img src="'. $settings['images_url'] .'/userbox/account.png" alt="*" />
', $txt['account'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=forumprofile">
<img src="'. $settings['images_url'] .'/userbox/editprofile.png" alt="*" />
', $txt['forumprofile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unread">
<img src="'. $settings['images_url'] .'/userbox/topics.png" alt="*" />
', $txt['unread_topics_visit'], '
</a>
</li>
</ul>
</div>';
}
echo'
</div>';
}
?>
Title: Re: Like Posts
Post by: margarett on January 13, 2015, 09:53:08 AM
This should work (untested)

<div id="userbox" class="dropup" style="display: none;">
<ul class="dropdown-menu">
<li>
<a href="'. $scripturl. '?action=profile">
<img src="'. $settings['images_url'] .'/userbox/profile.png" alt="*" />
', $txt['profile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=account">
<img src="'. $settings['images_url'] .'/userbox/account.png" alt="*" />
', $txt['account'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=forumprofile">
<img src="'. $settings['images_url'] .'/userbox/editprofile.png" alt="*" />
', $txt['forumprofile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li>
<a href="'. $scripturl. '?action=unread">
<img src="'. $settings['images_url'] .'/userbox/topics.png" alt="*" />
', $txt['unread_topics_visit'], '
</a>
</li>
</ul>
</div>';
}
echo'
</div>';
}
?>
Title: Re: Like Posts
Post by: desiamerican26 on January 16, 2015, 10:13:53 PM
Hi,

I installed Like Posts Mod for my forums. It is working fine everywhere else but it's not opening up too the Guests. I checked at the back end and everything is checked for Guests to click like. Is it because I am using a different Template?

I am using Golove-Gradient Theme. Also, attaching the screenshot from Guest checked section.

Please let me know.

Thank You
Regards,

Nikhil
Title: Re: Like Posts
Post by: Joker™ on January 18, 2015, 08:51:49 AM
Quote from: coltp45 on January 04, 2015, 01:33:31 AM
Quote from: kelvincool on November 30, 2014, 10:05:26 AM
Replace this bit:

<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>
</div>';


With this:

<div class="user_bar">
  <span><a href="', $scripturl, '?action=unread">', $txt['unread'], '</a></span> |
<span><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></span>';
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo ' |
<span><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></span>';
}
echo ' </div>';

Hello, in which file must make this modification
Hi,

You can check the changes over here - http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=238068;smf_version=2.0.9


Looking at the changes you have asked

/Themes/theme_you_are_using/index.template.php

Code (Find) Select
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Code (Add after) Select


if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
}
Title: Re: Like Posts
Post by: Joker™ on January 18, 2015, 08:54:04 AM
Quote from: gaurav09 on January 13, 2015, 08:48:40 AM
@margarett
<div id="userbox" class="dropup" style="display: none;">
<ul class="dropdown-menu">
<li>
<a href="'. $scripturl. '?action=profile">
<img src="'. $settings['images_url'] .'/userbox/profile.png" alt="*" />
', $txt['profile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=account">
<img src="'. $settings['images_url'] .'/userbox/account.png" alt="*" />
', $txt['account'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=forumprofile">
<img src="'. $settings['images_url'] .'/userbox/editprofile.png" alt="*" />
', $txt['forumprofile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unread">
<img src="'. $settings['images_url'] .'/userbox/topics.png" alt="*" />
', $txt['unread_topics_visit'], '
</a>
</li>
</ul>
</div>';
}
echo'
</div>';
}
?>



The code provided by margarett looks fine - http://www.simplemachines.org/community/index.php?topic=506743.msg3782684#msg3782684
Title: Re: Like Posts
Post by: Joker™ on January 18, 2015, 08:54:28 AM
Quote from: desiamerican26 on January 16, 2015, 10:13:53 PM
Hi,

I installed Like Posts Mod for my forums. It is working fine everywhere else but it's not opening up too the Guests. I checked at the back end and everything is checked for Guests to click like. Is it because I am using a different Template?

I am using Golove-Gradient Theme. Also, attaching the screenshot from Guest checked section.

Please let me know.

Thank You
Regards,

Nikhil
Hi, does it work fine on default theme?
Title: Re: Like Posts
Post by: desiamerican26 on January 18, 2015, 01:24:23 PM
Thank You for the Reply Joker.

Unfortunately, I was trying to delete some code that I inserted, And I am having the following error message:

my Site:

www.desi-american.com/forum/

Template Parse Error!

It seems something has gone sour on the forum with the template system. This problem should only be temporary, so please come back later and try again. If you continue to see this message, please contact the administrator.


Can you please help me with that. I guess something else got deleted by mistake.

Thank You
Title: Re: Like Posts
Post by: Korsar13 on January 22, 2015, 03:10:31 AM
trying to install on SMF 2.0.9 via Package Manager

Tests successful, but...

ERROR: syntax error at or near "FROM"
LINE 3: FROM smf_like_post
^
File: /(cut)/forum/Packages/temp/installer/install.php
Line: 155
Title: Re: Like Posts
Post by: gaurav09 on January 22, 2015, 05:37:58 AM
Quote from: margarett on January 13, 2015, 09:53:08 AM
This should work (untested)

<div id="userbox" class="dropup" style="display: none;">
<ul class="dropdown-menu">
<li>
<a href="'. $scripturl. '?action=profile">
<img src="'. $settings['images_url'] .'/userbox/profile.png" alt="*" />
', $txt['profile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=account">
<img src="'. $settings['images_url'] .'/userbox/account.png" alt="*" />
', $txt['account'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=profile;area=forumprofile">
<img src="'. $settings['images_url'] .'/userbox/editprofile.png" alt="*" />
', $txt['forumprofile'], '
</a>
</li>
<li>
<a href="'. $scripturl. '?action=unreadreplies">
<img src="'. $settings['images_url'] .'/userbox/replies.png" alt="*" />
', $txt['unread_replies'], '
</a>
</li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li>
<a href="'. $scripturl. '?action=unread">
<img src="'. $settings['images_url'] .'/userbox/topics.png" alt="*" />
', $txt['unread_topics_visit'], '
</a>
</li>
</ul>
</div>';
}
echo'
</div>';
}
?>


Marg thanks very much, it worked well.
Just i have last wish that please also tell me for other theme also, i cannot find same code which needs to be find, but i found some similar code. Below is that similar code.


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';
Title: Re: Like Posts
Post by: gaurav09 on January 22, 2015, 05:49:32 AM
i am using this mod : http://custom.simplemachines.org/mods/index.php?mod=2665

but in like posts stats, no image is showing..I found bug first time  :)
proof image attached.

EDIT : and how to fix the overlapping of karma with likes ?
Title: Re: Like Posts
Post by: Steve on January 22, 2015, 09:34:33 AM
Be advised Joker won't be around for a little while due to real life taking precedence (it's a good thing in his case). :)
Title: Re: Like Posts
Post by: margarett on January 22, 2015, 07:44:32 PM
About the question above


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';
Title: Re: Like Posts
Post by: gaurav09 on January 22, 2015, 09:45:14 PM
Quote from: margarett on January 22, 2015, 07:44:32 PM
About the question above


// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';


this time something wrong happened
Title: Re: Like Posts
Post by: margarett on January 23, 2015, 04:36:01 AM
Ups :P
No idea where that $ went to...
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';
Title: Re: Like Posts
Post by: gaurav09 on January 27, 2015, 09:58:14 AM
Quote from: margarett on January 23, 2015, 04:36:01 AM
Ups :P
No idea where that $ went to...
// If the user is logged in, display stuff like their name, new messages, etc.
if ($context['user']['is_logged'])
{
echo '
<div class="floatleft">
<ul class="the_user_menu_dropdown">
<li><img src="' . $settings['images_url'] . '/theme_custom/user.png" alt="', $txt['theme_post'], '" />
<ul>
<li><a href="', $scripturl, '?action=unreadreplies" title="', $txt['user_new_replies_desc'], '">', $txt['user_new_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification())
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
echo '
<li><a href="', $scripturl, '?action=recent" title="', $txt['user_recent_posts_desc'], '">', $txt['user_recent_posts'], '</a></li>
<li><a href="', $scripturl, '?action=unread" title="', $txt['user_unread_posts_desc'], '">', $txt['user_unread_posts'], '</a></li>
</ul>
</li>
</ul>
</div>

<div class="floatleft">
<ul class="the_user_menu_box">
<li><img src="' . $settings['images_url'] . '/theme_custom/pm.png" alt="', $txt['theme_pm'], '" />
<ul>
<li>';


thanks  :-*
Title: Re: Like Posts
Post by: margarett on January 27, 2015, 10:46:48 AM
:)
Title: Re: Like Posts
Post by: heltinde on February 14, 2015, 10:15:55 AM
In our community we seem to have an issue with the mod: I have some members, who uses iPad. When they press 'You & xx other people liked this' they can't get rid of the box with the names unless they press back on the iPad.
Is this a bug?

Thx for a nice mod, We love the functionality :)

Best Regards
Title: Re: Like Posts
Post by: Joker™ on February 15, 2015, 09:28:09 AM
Quote from: heltinde on February 14, 2015, 10:15:55 AM
In our community we seem to have an issue with the mod: I have some members, who uses iPad. When they press 'You & xx other people liked this' they can't get rid of the box with the names unless they press back on the iPad.
Is this a bug?

Thx for a nice mod, We love the functionality :)

Best Regards
Thanks for the info, tracked https://github.com/siddhartha-gupta/SMF-Likes/issues/40
Title: Re: Like Posts
Post by: nax on March 09, 2015, 09:35:34 AM
A very desirable mod, I tried to install it and when parsed everything was ok for the Core theme but not for my installed theme Brightforest.  Not sure how to overcome this.
Title: Re: Like Posts
Post by: Steve on March 09, 2015, 09:38:31 AM
Did you look at what the failures were (i.e. click the clipboard icons)?
Title: Re: Like Posts
Post by: nax on March 09, 2015, 09:49:41 AM
I've looked now, here are the two items that failed. Not sure what to do.
Title: Re: Like Posts
Post by: margarett on March 09, 2015, 10:37:10 AM
The edit to index.template.php should be easy to fix. Basically you need to find the link to "unreadreplies" in your file and adapt the link to "show likes notification.

I can't see where is the the first image you attached from... That seems to be from MessageIndex.template.php but it doesn't show up as failed...
Title: Re: Like Posts
Post by: nax on March 09, 2015, 10:51:17 AM
You are correct, its only the index.template.php I think I would need to change, so should find out where the additional code should go, install the mod then make that addition in the appropriate place (is that how it works?).
Title: Re: Like Posts
Post by: margarett on March 09, 2015, 11:01:15 AM
Yes, that's it.
First you need to make sure that you are able to do the "failed" changes yourself. Ask for help if you can't ;)
Then install the MOD with errors
Then manually perform the "failed" edits
Title: Re: Like Posts
Post by: nax on March 09, 2015, 11:14:13 AM
Many thanks for your advice and Joker for this mod - So far so good! It's in and working.
Title: Re: Like Posts
Post by: halpaslan on March 12, 2015, 03:18:05 AM
Is it possible to like post as a tapatalk option?
Title: Re: Like Posts
Post by: Paracelsus on March 23, 2015, 06:23:38 AM
One feature I would much appreciate in the Like system is if there was the possibility of sorting posts in a topic by likes (ascending/descending). This way one could read from the most to the least popular posts in a topic (and vice-versa).
Title: Re: Like Posts
Post by: Gluz on April 07, 2015, 10:24:01 PM
This Mod is really good, but with Pretty URLs MOD the notification popup doesn't show, as soon I dissable Pretty URLs the notification popup shows when I press the link on the user-area. All other things of the mod work as intended, only the notification popup doesn't show up with Pretty URLs activated.

I don't know what to do, this mod is different from others I used to edit to fix some things that doesn't work by just install it or that other mods broke, and can't figure out how Pretty URLs affect this MOD.
Title: Re: Like Posts
Post by: Paracelsus on April 09, 2015, 04:49:49 AM
Hi,

I'm having problems trying to install this MOD... something in the non theme template related files but that disrupts the layout and lots of css/javascript/jquery functions in my theme making the forum unusable.

In Firefox the console shows the following:
Quote"jquery is already loaded with version: 2.1.1" index.php:1938:4
"result of version check: 1" index.php:1940:5
TypeError: $ is not a function

Any ideas on how to fix this?
Title: Re: Like Posts
Post by: Tom.B on April 09, 2015, 06:17:17 AM
Hi there, this mod looks great, and I've installed it!

However, I can't figure out how to like people's posts...

(http://i.imgur.com/22yChaq.png)

Can't see a like button!

(http://i.imgur.com/9VfsKG5.png)

(http://i.imgur.com/lSG7mv6.png)

(http://i.imgur.com/OXdUE1W.png)

Any ideas?

Thanks in advance,
Tom.B
Title: Re: Like Posts
Post by: Paracelsus on April 09, 2015, 01:57:14 PM
Tom, I see your theme is based on Reseller, same here. Read the post above yours, I'm having similar problems. My guess is that is something related to JQuery being declared several times at the same time. Hope someone with more expertise can help here.
Title: Re: Like Posts
Post by: Tom.B on April 09, 2015, 05:16:20 PM
Quote from: Paracelsus on April 09, 2015, 01:57:14 PM
Tom, I see your theme is based on Reseller, same here. Read the post above yours, I'm having similar problems. My guess is that is something related to JQuery being declared several times at the same time. Hope someone with more expertise can help here.

Ah right. I'm based on Redsy, not Reseller... unless it's the same thing and I'm being dumb. :P

Yes would be nice if someone could come and help!
Title: Re: Like Posts
Post by: Gluz on April 09, 2015, 07:34:34 PM
For the like button not showing, is not the Jquery problem is the CSS, the Like button have display:none; and that's why it doesn't show, but the button is there. If you open with Inspect element and search just above the signature, the button is there but is hidden. I see that after I installed the MOD but as I say, after Inspecting the elements got it work.


And for my problem, I still can't figure out what to do, the only way to get the Notification popup to work is when I disable Pretty URLs.



EDIT:
Nevermind, I change from html <a> to <span> and it works, better than I though, as it doesn't reload the page.
Title: Re: Like Posts
Post by: Paracelsus on April 10, 2015, 02:26:25 AM
Quote from: Tom.B on April 09, 2015, 05:16:20 PM
Quote from: Paracelsus on April 09, 2015, 01:57:14 PM
Tom, I see your theme is based on Reseller, same here. Read the post above yours, I'm having similar problems. My guess is that is something related to JQuery being declared several times at the same time. Hope someone with more expertise can help here.

Ah right. I'm based on Redsy, not Reseller... unless it's the same thing and I'm being dumb. :P

Yes would be nice if someone could come and help!

Sorry, yours is based on Redsy, mine on Reseller, but it's the same author and the same type of coding so in the end it's pretty similar.
Title: Re: Like Posts
Post by: Paracelsus on April 10, 2015, 02:36:14 AM
Quote from: Gluz on April 09, 2015, 07:34:34 PM
For the like button not showing, is not the Jquery problem is the CSS, the Like button have display:none; and that's why it doesn't show, but the button is there. If you open with Inspect element and search just above the signature, the button is there but is hidden. I see that after I installed the MOD but as I say, after Inspecting the elements got it work.


And for my problem, I still can't figure out what to do, the only way to get the Notification popup to work is when I disable Pretty URLs.



EDIT:
Nevermind, I change from html <a> to <span> and it works, better than I though, as it doesn't reload the page.

Yeah, but why is the Like button hidden with display:none in the first place? It doesn't make sense.

In my case, that's not the only problem, I have also issues with the layout being changed in several places without even touching the template files. I can only suspect some conflict at code level.
Title: Re: Like Posts
Post by: Gluz on April 10, 2015, 04:25:39 AM
I have one site with Reseller, and I tested there, and as I said, it's hidden with display:none

Also, the MOD have a little bit ugly CSS in my opinion, I changed a lot of things for my site, to get it some how integrated with the theme, but for get it work only need to delete the hidden rule.

I almost forgot to mention, you can't Like your own post, so to test, aside of checking permissions on groups that can see/give Likes and the permissions of the boards, the post need to be from another user. That's how I see that the Like button was present but hidden.

Some pics on the Reseller theme with the inspector:
http://puu.sh/h8mT4.png
http://puu.sh/h8mTC.png
Title: Re: Like Posts
Post by: Tom.B on April 10, 2015, 10:21:16 AM
If it's hidden with Display: None, how do I revert that so it is displayed?
Title: Re: Like Posts
Post by: Gluz on April 10, 2015, 10:17:15 PM
Are you sure that the MOD is installed in your theme? Inspecting your page doesn't seem to have it enabled in the theme. Check in yout Theme folder, in Display.template.php that above this line:
// Show the member's signature?
there are code of LikePost MOD, 'cause the first time I installed the MOD, I only installed in the default theme and not in my theme.
Title: Re: Like Posts
Post by: Tom.B on April 11, 2015, 07:17:16 AM
I've installed it now, although now I'm unsure of what to do. I'm a newbie to this sort of thing!
Title: Re: Like Posts
Post by: Paracelsus on April 15, 2015, 05:06:53 AM
Quote from: Gluz on April 10, 2015, 04:25:39 AM
I have one site with Reseller, and I tested there, and as I said, it's hidden with display:none

Also, the MOD have a little bit ugly CSS in my opinion, I changed a lot of things for my site, to get it some how integrated with the theme, but for get it work only need to delete the hidden rule.

I almost forgot to mention, you can't Like your own post, so to test, aside of checking permissions on groups that can see/give Likes and the permissions of the boards, the post need to be from another user. That's how I see that the Like button was present but hidden.

Some pics on the Reseller theme with the inspector:
http://puu.sh/h8mT4.png
http://puu.sh/h8mTC.png

That can be solved, but I've got also other problems with the Mod. For instance, the "New" button just disappears from messageindex, and I see no way to retrieve it.
Title: Re: Like Posts
Post by: Schachazubi on April 17, 2015, 09:31:20 AM
Joker, thank you for the Great Like-Mod and your Help and Answers at this Thread.


Problem:

Board 2.0.7 + Like 1.3.1 = Works fine
Board 2.0.7 + Like 1.3.1 + SMF Quiz 1.1.0 = Like Works, but Quiz did not load. Maybe a JQuery-Thing.

Board 2.0.7 + Like 2.0.3 + SMF Quiz 1.1.0 = Likes did not Work but Quiz Works

Board 2.0.9 + Like 1.3.1 = Works fine - fresh Installation, no other Mods - only Like
Board 2.0.9 + Like 2.0.3 = Works not - same Installation, no other Mods - only Like (tested on Webspace + tested on a own root-Server)

Board 2.0.7 + Like 2.0.3 = Works not - fresh Installation, no other Mods - only Like (tested on Webspace + tested on a own root-Server)


Summary:

I wanted to use Like Posts + SMF Quiz working on my 2.0.9
Like Posts 2.0.3 don't want to work on my Forum, even on a fresh 2.0.7, even on a 2.0.9 - on 2 different Websites (once tried on Webspace, once tried on a root-Server)


I dont get/find a Error-Message.

2.0.7 Likes did not work = There is simply no (orange) Like-Button.
Using 1.3.1, the Like Button appear instandly.


Sorry, English is not my Native Language.
Did anyone has the same Issues and like to share Information - or has a Tip or a Solution for me?

Greetings, Schachazubi
Title: Re: Like Posts
Post by: suhaneankit on April 19, 2015, 05:16:52 AM
Sounds good.

Quote from: barnaby jonez on July 16, 2013, 12:22:05 PM
Joker,

Using an example from vBullitin, when you receive a Like, you click on that notification, and it will show you what posts were given likes, and by whom. [X Person liked your post(s) in this thread...]

Similarly, Facebook does this the same way. [X Person liked your Status...]

It doesnt have to be as specific as this, but something that basically says "Hey, there is some activity. Someone read your post, and liked it." -- this gets the user to zip straight there and see who is giving them props.

Does this help?
Title: Re: Like Posts
Post by: roshaoar on April 27, 2015, 04:30:40 AM
Great mod - the only issue for me on 2.0.10 with a bunch of mods and responsive curve is that the popup window on "Show new replies to your posts" automatically disappears after a second or so. Can you give me a hint which file I'd want to look at to make this popup stay open?

Thank you for your time,

-Johan
Title: Re: Like Posts
Post by: Gluz on April 27, 2015, 05:00:16 AM
You mean, the popup on "Show Likes notification".

I have that problem too, and what I did is change from <a> to <span> in the index.template.php of my Theme, and the only thing missing to be viewed as another link is to add a CSS rule for hover over that span and underline the text as a normal link.

index.template.php:
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><span class="showLikeNotification" style="cursor:pointer" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</span></li>';
}


CSS:
.showLikeNotification:hover {
text-decoration: underline;
}
Title: Re: Like Posts
Post by: roshaoar on April 27, 2015, 06:45:33 AM
Thank you Gluz, yes that's exactly what I meant. Which CSS file (name?) is this referring to?

Thanks again,

-Johan
Title: Re: Like Posts
Post by: digiflash on April 27, 2015, 07:19:07 AM
I updated from 1.0.3 to 2.0.3.
"Recount Like stats" doesn't help. Likes are gone? I don't know if the table was dropped as I uninstalled the old mod?!
Title: Re: Like Posts
Post by: roshaoar on April 27, 2015, 04:18:07 PM
Thanks again Gluz, perfect fix. I'm a bit new here so not familiar with which css file does what, but I guessed the biggest one in the theme which worked for me (index.css).

Thanks again
Title: Re: Like Posts
Post by: Gluz on April 27, 2015, 05:34:04 PM
Yeah, index.css or the main one according to the Theme.
Title: Re: Like Posts
Post by: GMCbris on April 28, 2015, 02:49:33 AM
Hello

I have this installed on a default theme - all working except the button doesnt show.

Its there when I look at the "page source" with firefox and IE 11.

What can I do to show the button?

Cheers

G
Title: Re: Like Posts
Post by: Schachazubi on April 28, 2015, 03:29:09 AM
@GMCbris

Thats what I (and some others) said before: http://www.simplemachines.org/community/index.php?topic=506743.msg3805811#msg3805811 (http://www.simplemachines.org/community/index.php?topic=506743.msg3805811#msg3805811).
Title: Re: Like Posts
Post by: Gluz on April 28, 2015, 04:01:21 AM
@GMCbris Yeah, the button is there, as I said in my other post (http://www.simplemachines.org/community/index.php?topic=506743.msg3804416#msg3804416), to fix that just search in the /Themes/default/css/LikePost.css the rule .like_post_box and delete the line that say display:none; and the Like button should appear.
Title: Re: Like Posts
Post by: GMCbris on April 28, 2015, 04:17:47 AM
Quote from: Gluz on April 28, 2015, 04:01:21 AM
@GMCbris Yeah, the button is there, as I said in my other post (http://www.simplemachines.org/community/index.php?topic=506743.msg3804416#msg3804416), to fix that just search in the /Themes/default/css/LikePost.css the rule .like_post_box and delete the line that say display:none; and the Like button should appear.
thank you

Trying that now :)

edit:  Showing now - again, thanks


Sadly it doesnt work  -  but thats a different story
Title: Re: Like Posts
Post by: Joker™ on April 29, 2015, 11:14:36 AM
Quote from: Paracelsus on March 23, 2015, 06:23:38 AM
One feature I would much appreciate in the Like system is if there was the possibility of sorting posts in a topic by likes (ascending/descending). This way one could read from the most to the least popular posts in a topic (and vice-versa).
It sounds nice, but will be very query extensive, i.e not very DB friendly
Title: Re: Like Posts
Post by: Joker™ on April 29, 2015, 11:16:01 AM
Quote from: Gluz on April 07, 2015, 10:24:01 PM
This Mod is really good, but with Pretty URLs MOD the notification popup doesn't show, as soon I dissable Pretty URLs the notification popup shows when I press the link on the user-area. All other things of the mod work as intended, only the notification popup doesn't show up with Pretty URLs activated.

I don't know what to do, this mod is different from others I used to edit to fix some things that doesn't work by just install it or that other mods broke, and can't figure out how Pretty URLs affect this MOD.
Are you still facing the issue?

Tracked - https://github.com/siddhartha-gupta/SMF-Likes/issues/41
Title: Re: Like Posts
Post by: Joker™ on April 29, 2015, 11:18:57 AM
Quote from: Paracelsus on April 10, 2015, 02:36:14 AM
Yeah, but why is the Like button hidden with display:none in the first place? It doesn't make sense.

In my case, that's not the only problem, I have also issues with the layout being changed in several places without even touching the template files. I can only suspect some conflict at code level.
As when you click like the post is liked via jQuery, and if jQuery is not loaded properly nothing will happen. So its better to hide the like button in first place. If you guys are still facing the issue provide me the theme link and mods installed on your forum.
Title: Re: Like Posts
Post by: Joker™ on April 29, 2015, 11:21:00 AM
Quote from: Schachazubi on April 17, 2015, 09:31:20 AM
Joker, thank you for the Great Like-Mod and your Help and Answers at this Thread.


Problem:

Board 2.0.7 + Like 1.3.1 = Works fine
Board 2.0.7 + Like 1.3.1 + SMF Quiz 1.1.0 = Like Works, but Quiz did not load. Maybe a JQuery-Thing.

Board 2.0.7 + Like 2.0.3 + SMF Quiz 1.1.0 = Likes did not Work but Quiz Works

Board 2.0.9 + Like 1.3.1 = Works fine - fresh Installation, no other Mods - only Like
Board 2.0.9 + Like 2.0.3 = Works not - same Installation, no other Mods - only Like (tested on Webspace + tested on a own root-Server)

Board 2.0.7 + Like 2.0.3 = Works not - fresh Installation, no other Mods - only Like (tested on Webspace + tested on a own root-Server)


Summary:

I wanted to use Like Posts + SMF Quiz working on my 2.0.9
Like Posts 2.0.3 don't want to work on my Forum, even on a fresh 2.0.7, even on a 2.0.9 - on 2 different Websites (once tried on Webspace, once tried on a root-Server)


I dont get/find a Error-Message.

2.0.7 Likes did not work = There is simply no (orange) Like-Button.
Using 1.3.1, the Like Button appear instandly.


Sorry, English is not my Native Language.
Did anyone has the same Issues and like to share Information - or has a Tip or a Solution for me?

Greetings, Schachazubi

Tracked - https://github.com/siddhartha-gupta/SMF-Likes/issues/42
Title: Re: Like Posts
Post by: peterwaalker on April 30, 2015, 01:33:40 AM
It gave me double error when i want to reinstall on my current theme. What shall i do?
see image
Title: Re: Like Posts
Post by: Paracelsus on April 30, 2015, 03:34:58 AM
Quote from: Joker™ on April 29, 2015, 11:18:57 AM
Quote from: Paracelsus on April 10, 2015, 02:36:14 AM
Yeah, but why is the Like button hidden with display:none in the first place? It doesn't make sense.

In my case, that's not the only problem, I have also issues with the layout being changed in several places without even touching the template files. I can only suspect some conflict at code level.
As when you click like the post is liked via jQuery, and if jQuery is not loaded properly nothing will happen. So its better to hide the like button in first place. If you guys are still facing the issue provide me the theme link and mods installed on your forum.

Hi Joker,

That issue is easy to solve, the biggest problem is actually the layout disruption, among other things the "new" posts button that comes along with every topic on messageindex just disappears. If you try to test your MOD on Reseller (http://custom.simplemachines.org/themes/index.php?lemma=2806) theme you should probably be able to identify the problem.
Title: Re: Like Posts
Post by: peterwaalker on April 30, 2015, 03:32:30 PM

I was using this mod on another theme until recently when i changed theme. i found out that it is not showing on posts bottom and profile post avatar of all members. So i decided to uninstall and reinstall before i come up with that error on installation.
It gave me double error when i want to reinstall on my current theme. What shall i do?
see image


Please i'm still waiting for a detailed guide.
Thank you
Title: Re: Like Posts
Post by: Joker™ on May 01, 2015, 11:49:44 PM
Quote from: Paracelsus on April 30, 2015, 03:34:58 AM
Quote from: Joker™ on April 29, 2015, 11:18:57 AM
Quote from: Paracelsus on April 10, 2015, 02:36:14 AM
Yeah, but why is the Like button hidden with display:none in the first place? It doesn't make sense.

In my case, that's not the only problem, I have also issues with the layout being changed in several places without even touching the template files. I can only suspect some conflict at code level.
As when you click like the post is liked via jQuery, and if jQuery is not loaded properly nothing will happen. So its better to hide the like button in first place. If you guys are still facing the issue provide me the theme link and mods installed on your forum.

Hi Joker,

That issue is easy to solve, the biggest problem is actually the layout disruption, among other things the "new" posts button that comes along with every topic on messageindex just disappears. If you try to test your MOD on Reseller (http://custom.simplemachines.org/themes/index.php?lemma=2806) theme you should probably be able to identify the problem.
Tracked (https://github.com/siddhartha-gupta/SMF-Likes/issues/43)
Title: Re: Like Posts
Post by: Joker™ on May 01, 2015, 11:53:20 PM
Quote from: peterwaalker on April 30, 2015, 03:32:30 PM

I was using this mod on another theme until recently when i changed theme. i found out that it is not showing on posts bottom and profile post avatar of all members. So i decided to uninstall and reinstall before i come up with that error on installation.
It gave me double error when i want to reinstall on my current theme. What shall i do?
see image


Please i'm still waiting for a detailed guide.
Thank you
Make backup of files before editing anything

Error in mod installation - http://wiki.simplemachines.org/smf/Error_in_mod_installation
How to install mods manually - http://wiki.simplemachines.org/smf/Manual_installation_of_mods

Edits for this mod - http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=238068;smf_version=2.0.10

I hope this will be helpful in resolving the issue :)
Title: Re: Like Posts
Post by: peterwaalker on May 02, 2015, 04:31:57 AM
Quote from: Joker™ on May 01, 2015, 11:53:20 PM
Quote from: peterwaalker on April 30, 2015, 03:32:30 PM

I was using this mod on another theme until recently when i changed theme. i found out that it is not showing on posts bottom and profile post avatar of all members. So i decided to uninstall and reinstall before i come up with that error on installation.
It gave me double error when i want to reinstall on my current theme. What shall i do?
see image


Please i'm still waiting for a detailed guide.
Thank you
Make backup of files before editing anything

Error in mod installation - http://wiki.simplemachines.org/smf/Error_in_mod_installation
How to install mods manually - http://wiki.simplemachines.org/smf/Manual_installation_of_mods

Edits for this mod - http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=238068;smf_version=2.0.10

I hope this will be helpful in resolving the issue :)

Please my question is if I continue with the installation is it going to break something?
The test passed on other themes except reseller theme which is my current theme.
See image of failed installation test.
I have downloaded mysql data base.
Title: Re: Like Posts
Post by: peterwaalker on May 02, 2015, 04:38:38 PM
i have installed this mod with test errors in index.template.php thinking that i could locate exactly where i can place the code.
I am supposed to place it here: <li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>'; instead i found this <li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>';
so, i placed the code after and got syntax error parse.

for reference
I'm using Reseller theme

./Themes/default/index.template.php
Find:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>';

Add After:
      if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
}


This above refused to work for me. I need help
Attached below is my forum index.template.php
Title: Re: Like Posts
Post by: Gluz on May 02, 2015, 05:57:36 PM
Here you are.

I have Reseller Theme on one of my forums and I see the error on the file, so I modify your index.template according to the parser.
Title: Re: Like Posts
Post by: peterwaalker on May 02, 2015, 06:54:13 PM
Quote from: Gluz on May 02, 2015, 05:57:36 PM
Here you are.

I have Reseller Theme on one of my forums and I see the error on the file, so I modify your index.template according to the parser.

I have done exactly what you did in that index.template.php but likes refused to show under posts on post pages. There is no like/unlike button under posted message.
Instead the total likes received by users on user profile avatar are showing.

Find:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>

Replace:
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>';
if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><a href="#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</a></li>';
}
echo '


There was no error after replacing code above. But the likes button are not displaying. I have verified 'like mod' codes in various files directories and all codes are in there. Or Is there any other thing i am missing?
Title: Re: Like Posts
Post by: Gluz on May 02, 2015, 10:10:58 PM
In my site the Like Button didn't show either, but the button is there, so I modified /Themes/default/css/LikePost.css this rule in particular to see the button:

Line 52:
.like_post_box {
    line-height: 22px;
    position: relative;
    display: none;
}


to this:
.like_post_box {
    line-height: 22px;
    position: relative;
    display: block;
}


And it show the button.


Searching trough the GitHub of the MOD I found this fix commit (https://github.com/siddhartha-gupta/SMF-Likes/commit/5149ab8887ea0a5a18308a50ca8d5b0e1dfba6c0), where that display: none; were introduced, but if I'm not wrong that fix is only for the MessageIndex in the Sticky Threads, in the posts the button didn't show because of that display: none;

That's why most of the users that install the latest versions didn't see the button but I know is there because I inspect the page elements and see the button.
Title: Re: Like Posts
Post by: Joker™ on May 03, 2015, 11:03:51 AM
Quote from: peterwaalker on May 02, 2015, 04:31:57 AM
Quote from: Joker™ on May 01, 2015, 11:53:20 PM
Quote from: peterwaalker on April 30, 2015, 03:32:30 PM

I was using this mod on another theme until recently when i changed theme. i found out that it is not showing on posts bottom and profile post avatar of all members. So i decided to uninstall and reinstall before i come up with that error on installation.
It gave me double error when i want to reinstall on my current theme. What shall i do?
see image


Please i'm still waiting for a detailed guide.
Thank you
Make backup of files before editing anything

Error in mod installation - http://wiki.simplemachines.org/smf/Error_in_mod_installation
How to install mods manually - http://wiki.simplemachines.org/smf/Manual_installation_of_mods

Edits for this mod - http://custom.simplemachines.org/mods/index.php?action=parse;mod=3708;attach=238068;smf_version=2.0.10

I hope this will be helpful in resolving the issue :)

Please my question is if I continue with the installation is it going to break something?
The test passed on other themes except reseller theme which is my current theme.
See image of failed installation test.
I have downloaded mysql data base.

No it won't break anything, but the functionality added to index template won't work, i.e notification thinggy :)
Title: Re: Like Posts
Post by: peterwaalker on May 03, 2015, 02:17:45 PM
Quote from: Gluz on May 02, 2015, 10:10:58 PM
In my site the Like Button didn't show either, but the button is there, so I modified /Themes/default/css/LikePost.css this rule in particular to see the button:

Line 52:
.like_post_box {
    line-height: 22px;
    position: relative;
    display: none;
}


to this:
.like_post_box {
    line-height: 22px;
    position: relative;
    display: block;
}


And it show the button.


Searching trough the GitHub of the MOD I found this fix commit (https://github.com/siddhartha-gupta/SMF-Likes/commit/5149ab8887ea0a5a18308a50ca8d5b0e1dfba6c0), where that display: none; were introduced, but if I'm not wrong that fix is only for the MessageIndex in the Sticky Threads, in the posts the button didn't show because of that display: none;

That's why most of the users that install the latest versions didn't see the button but I know is there because I inspect the page elements and see the button.

Thanks a lot. It worked like charm.
I owe great appreciation. How i wish you could help me on the questions i have been asking here (http://www.simplemachines.org/community/index.php?topic=525855.msg3809055#msg3809055)
Title: Re: Like Posts
Post by: ⓜⓤⓡⓐⓣ on May 05, 2015, 04:05:45 AM
Hi, I want to add a button to the form.
I am writing this code into subs.php .
'Begeniler' => array(
'title' => $txt['like_show_notifications'],
'href' => '"#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification',
'show' => true,
),

of course, it does not.
What should be the correct code for popup?

Edit: Because every theme "unreadpost" There is no.
Title: Re: Like Posts
Post by: digiflash on May 05, 2015, 05:30:40 AM
I updated from 1.0.3 to 2.0.3.
"Recount Like stats" doesn't help. Likes are gone? I don't know if the table was dropped as I uninstalled the old mod?!
Title: Re: Like Posts
Post by: Gluz on May 05, 2015, 11:34:34 AM
Quote from: mert1i on May 05, 2015, 04:05:45 AM
Hi, I want to add a button to the form.
I am writing this code into subs.php .
'Begeniler' => array(
'title' => $txt['like_show_notifications'],
'href' => '"#" class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification',
'show' => true,
),

of course, it does not.
What should be the correct code for popup?

Edit: Because every theme "unreadpost" There is no.

I think the right code for a menu button is:
'Begeniler' => array(
'title' => $txt['like_show_notifications'],
'href' => 'javascript: lpObj.likePostsNotification.showLikeNotification()',
'show' => true,
),


#Untested
Title: Re: Like Posts
Post by: ⓜⓤⓡⓐⓣ on May 06, 2015, 02:18:32 AM
Quote from: Gluz on May 05, 2015, 11:34:34 AM


I think the right code for a menu button is:
'Begeniler' => array(
'title' => $txt['like_show_notifications'],
'href' => 'javascript: lpObj.likePostsNotification.showLikeNotification()',
'show' => true,
),


#Untested
Thank you, but Unfortunately it didn't work. It's as page loading, staying on the same page.

EDIT:I'm sorry, it works well.
Title: Re: Like Posts
Post by: Siirist on May 14, 2015, 11:20:05 AM
Hi Joker,

Thanks for this GREAT MOD!!!!  ;D

However, it only works on Curve theme.  :(

SMF v2.0.10

MODs
1.    Like Posts    2.0.3    
2.    Menu_Icons    1.0    
3.    PM Warning    1.0    
4.    Topic Solved    1.1.1    
5.    Google Translate for SMF 2.0    1.4    
6.    Default_Membergroup    2.0    
7.    Enhanced Dropdown    1.3    
8.    Board-color-and-icons    1.1    
9.    Caps_Lock_Detection_on_Login    1.1.0.2    

Themes that the user is able to select:
    SMF Default Theme - Curve
    Core Theme
    Hope
    Bright Forest
    Ostara
    Sunshine

Link to Test Forum (http://www.asanctuary.net/TestForum/index.php)
USERNAME=testmember    (is a regular member)
PASSWORD=letmesee
Title: Re: Like Posts
Post by: margarett on May 15, 2015, 06:54:56 PM
Which errors do you get in the other themes? Isn't it just the small error in index.template.php?
http://www.simplemachines.org/community/index.php?topic=506743.msg3782211#msg3782211
Title: Re: Like Posts
Post by: Siirist on May 15, 2015, 09:54:29 PM
Quote from: margarett on May 15, 2015, 06:54:56 PM
Which errors do you get in the other themes? Isn't it just the small error in index.template.php?
http://www.simplemachines.org/community/index.php?topic=506743.msg3782211#msg3782211

Yum, yes?

   Execute Modification    ./Themes/brightforest_23/Display.template.php    Test successful
      1.    Add Before    ./Themes/brightforest_23/Display.template.php    Test successful
      2.    Add Before    ./Themes/brightforest_23/Display.template.php    Test successful
      Execute Modification    ./Themes/brightforest_23/MessageIndex.template.php    Test successful
      1.    Add After    ./Themes/brightforest_23/MessageIndex.template.php    Test successful
      Execute Modification    ./Themes/brightforest_23/index.template.php    Test failed
      1.    Add After    ./Themes/brightforest_23/index.template.php    Test failed

Title: Re: Like Posts
Post by: Joker™ on May 16, 2015, 05:21:42 AM
Quote from: Schachazubi on April 17, 2015, 09:31:20 AM
Joker, thank you for the Great Like-Mod and your Help and Answers at this Thread.


Problem:

Board 2.0.7 + Like 1.3.1 = Works fine
Board 2.0.7 + Like 1.3.1 + SMF Quiz 1.1.0 = Like Works, but Quiz did not load. Maybe a JQuery-Thing.

Board 2.0.7 + Like 2.0.3 + SMF Quiz 1.1.0 = Likes did not Work but Quiz Works

Board 2.0.9 + Like 1.3.1 = Works fine - fresh Installation, no other Mods - only Like
Board 2.0.9 + Like 2.0.3 = Works not - same Installation, no other Mods - only Like (tested on Webspace + tested on a own root-Server)

Board 2.0.7 + Like 2.0.3 = Works not - fresh Installation, no other Mods - only Like (tested on Webspace + tested on a own root-Server)


Summary:

I wanted to use Like Posts + SMF Quiz working on my 2.0.9
Like Posts 2.0.3 don't want to work on my Forum, even on a fresh 2.0.7, even on a 2.0.9 - on 2 different Websites (once tried on Webspace, once tried on a root-Server)


I dont get/find a Error-Message.

2.0.7 Likes did not work = There is simply no (orange) Like-Button.
Using 1.3.1, the Like Button appear instandly.


Sorry, English is not my Native Language.
Did anyone has the same Issues and like to share Information - or has a Tip or a Solution for me?

Greetings, Schachazubi

Hey there,

I tried reproducing the issue, but couldn't reproduce the same. Lets see if its resolved with the upcoming version.
Title: Re: Like Posts
Post by: Schachazubi on May 16, 2015, 08:43:49 AM
OK, thank you.
Title: Re: Like Posts
Post by: Joker™ on May 16, 2015, 09:35:56 AM
Please try out 2.0.4

- Not pretty url friendly - https://github.com/siddhartha-gupta/SMF-Likes/issues/41
- Issue with reseller theme - https://github.com/siddhartha-gupta/SMF-Likes/issues/43
- Issue on iPad for overlays - https://github.com/siddhartha-gupta/SMF-Likes/issues/40
- Issue with SMF Quiz mod - https://github.com/siddhartha-gupta/SMF-Likes/issues/42
- Use isNullUndefined instead of typeof - https://github.com/siddhartha-gupta/SMF-Likes/issues/44
- Added Turkish translations - https://github.com/siddhartha-gupta/SMF-Likes/pull/37
- Few css changes for like posts notification box
Title: Re: Like Posts
Post by: Siirist on May 16, 2015, 02:12:53 PM
Thanks Joker,  :)

Okay, will uninstall 2.0.3 and then install 2.0.4

Be Well,
Siirist
Title: Re: Like Posts
Post by: Siirist on May 16, 2015, 02:47:17 PM
Quote from: Siirist on May 14, 2015, 11:20:05 AM
Hi Joker,

Thanks for this GREAT MOD!!!!  ;D

However, it only works on Curve theme.  :(

SMF v2.0.9

MODs
1.    Like Posts    2.0.4       
2.    Menu_Icons    1.0    
3.    PM Warning    1.0    
4.    Topic Solved    1.1.1    
5.    Google Translate for SMF 2.0    1.4    
6.    Default_Membergroup    2.0    
7.    Enhanced Dropdown    1.3    
8.    Board-color-and-icons    1.1    
9.    Caps_Lock_Detection_on_Login    1.1.0.2    

Themes that the user is able to select:
    SMF Default Theme - Curve
    Core Theme
    Hope
    Bright Forest (haven't even tried this theme due to failed when installing)
    Ostara
    Sunshine

Link to Test Forum (http://www.asanctuary.net/TestForum/index.php)
USERNAME=testmember    (is a regular member)
PASSWORD=letmesee

Hi again,

I tried the MOD after uninstalling v2.0.3 and then installing v2.0.4.
The results were
while using default theme (Curve) the mod seemed to function as intended
while using Ostara theme the box didn't appear (see screenshot)

Thoughts?

Be Well,
Siirist
Title: Re: Like Posts
Post by: Gluz on May 16, 2015, 07:07:00 PM
For me is working now very well, I resolved some jQuery conflicts with the Theme itself and now works great. Good job.

PD: I'm Al-eXs in Github :P
Title: Re: Like Posts
Post by: Joker™ on May 17, 2015, 12:11:35 AM
Sorry guys, Joker made a boo boo

Please update to v_2.0.5
- Updated LikePosts.min.js with recent changes
Title: Re: Like Posts
Post by: Joker™ on May 17, 2015, 12:12:15 AM
Quote from: Siirist on May 16, 2015, 02:47:17 PM
Quote from: Siirist on May 14, 2015, 11:20:05 AM
Hi Joker,

Thanks for this GREAT MOD!!!!  ;D

However, it only works on Curve theme.  :(

SMF v2.0.9

MODs
1.    Like Posts    2.0.4       
2.    Menu_Icons    1.0    
3.    PM Warning    1.0    
4.    Topic Solved    1.1.1    
5.    Google Translate for SMF 2.0    1.4    
6.    Default_Membergroup    2.0    
7.    Enhanced Dropdown    1.3    
8.    Board-color-and-icons    1.1    
9.    Caps_Lock_Detection_on_Login    1.1.0.2    

Themes that the user is able to select:
    SMF Default Theme - Curve
    Core Theme
    Hope
    Bright Forest (haven't even tried this theme due to failed when installing)
    Ostara
    Sunshine

Link to Test Forum (http://www.asanctuary.net/TestForum/index.php)
USERNAME=testmember    (is a regular member)
PASSWORD=letmesee

Hi again,

I tried the MOD after uninstalling v2.0.3 and then installing v2.0.4.
The results were
while using default theme (Curve) the mod seemed to function as intended
while using Ostara theme the box didn't appear (see screenshot)

Thoughts?

Be Well,
Siirist
Check settings from admin panel
Title: Re: Like Posts
Post by: Joker™ on May 17, 2015, 12:13:24 AM
Quote from: Gluz on May 16, 2015, 07:07:00 PM
For me is working now very well, I resolved some jQuery conflicts with the Theme itself and now works great. Good job.

PD: I'm Al-eXs in Github :P
First of all a big thanks for providing such a great support in resolving the issues :).

Can you tell me the jQuery issues you have faced and theme name.
Title: Re: Like Posts
Post by: Gluz on May 17, 2015, 12:53:27 AM
The issue is that the theme uses a jquery_bits.js for theme animations and stuff, that file use $ as function, and from one or another mod installed that uses jQuery I get errors in the Console Log, telling that $ is not a function, so I edited that file to update with a more suitable syntax to work with the MODs.

Code (Change from this) Select
$(document).ready(function() {

Code (To this) Select
jQuery(document).ready(function($) {

And other file that just have a deprecated syntax at the beggining, and all my problems where solved. But it was weird, as the other jQuery file of the theme have the right syntax(the second one) to make the functions.



Just one thing that didn't work for me, in my iPod Touch if I press the link to the members that Liked one post can't do anything else, the box don't disappear no matter what, the only way is to go back one page, but I'm not sure if my iPod loaded the new files or uses the ones that have in the cache, need to test that again.
Title: Re: Like Posts
Post by: gorbi on May 17, 2015, 01:50:38 AM
Install 2.0.5. Link for like posts notification box is non-active.
Title: Re: Like Posts
Post by: Siirist on May 17, 2015, 10:16:14 AM
Quote from: Joker™ on May 17, 2015, 12:12:15 AM
Quote
Hi Joker,

Thanks for this GREAT MOD!!!!  ;D

SMF v2.0.9

MODs
1.    Like Posts    2.0.5       
2.    Menu_Icons    1.0    
3.    PM Warning    1.0    
4.    Topic Solved    1.1.1    
5.    Google Translate for SMF 2.0    1.4    
6.    Default_Membergroup    2.0    
7.    Enhanced Dropdown    1.3    
8.    Board-color-and-icons    1.1    
9.    Caps_Lock_Detection_on_Login    1.1.0.2    

Themes that the user is able to select:
    SMF Default Theme - Curve
    Core Theme
    Hope
    Bright Forest (haven't even tried this theme due to failed when installing)
    Ostara
    Sunshine

Link to Test Forum (http://www.asanctuary.net/TestForum/index.php)
USERNAME=testmember    (is a regular member)
PASSWORD=letmesee

Check settings from admin panel

Hi again,

I tried the MOD after uninstalling v2.0.4 and then installing v2.0.5.
The results were
while using default theme (Curve) the mod seems to function as intended
while using Hope theme the mod seemed to function as intended
(although I think I broke the "Hope" theme when I manually removed the "Send" and "Print" Buttons from the Display Template.php)
while using Sunshine theme the mod seemed to function as intended

while using Ostara theme the box didn't appear

See attachments for ScreenShots of Admin Panel Settings

Be Well,
Siirist
Title: Re: Like Posts
Post by: Siirist on May 18, 2015, 03:30:44 PM
Should I go to the parse and verify each and every action?  O:)
Title: Re: Like Posts
Post by: Gluz on May 18, 2015, 10:40:55 PM
If you are sure that you ticked the checkbox to install on that theme, I think that you need to check that, yes.

When I updated in my production site I forgot to check my theme and I think that I broke something, then I realized that I didn't install it in the theme :P then have to uninstall and reinstall to check all themes and works again.
Title: Re: Like Posts
Post by: Siirist on May 19, 2015, 11:23:29 AM
Quote from: Gluz on May 18, 2015, 10:40:55 PM
If you are sure that you ticked the checkbox to install on that theme, I think that you need to check that, yes.

Okay, will manually verify the three (3) themes that are not functioning properly (Bright Forest-failed on install, Ostara, and Core)
Also need to find out what damaged the HOPE theme (sceenshots included)

Be Well,
Siirist

EDIT:
Standard install (default template) changes verified

Some changes were in place for Bright Forest
HOWEVER,
<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';
is NOT present in the index.template.php, so I do NOT know where to add
      if(LikePosts::$LikePostsUtils->showLikeNotification()) {
         echo '
               <li><span class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</span></li>';
      }

Core template - verified

Ostara1 template does NOT have a display.template.php
(HOLY CRAP! How can a template "display" without a display.template.php?)
Title: Re: Like Posts
Post by: Gluz on May 19, 2015, 05:38:34 PM
For the theme that doesn't have Display.template.php, it uses the default one, so if the default theme works, that theme should work too.


On the theme Bright Forest, if the link to read Unread Replys is not present in index.template.php, then that means that there is no user zone to add the link to show Like Notifications, is not really a big deal, the thing is that in that theme there is no other way to show Like Notifications. Need to look a place to place that link and then add it there.

And for the Hope theme, I think that the design don't get in mind a big main menu, so when you have so many buttons in the menu the logo get to another line. The fix for that is really simple, in the index.css of the Hope Theme:
Code (Search) Select
#logo a {
Code (Add after) Select
position: absolute;

That fix the logo and the layout should look ok.

Can I register in your Test Forum to view all the themes when logged in? maybe ther I could help you to fix things.
Title: Re: Like Posts
Post by: Siirist on May 19, 2015, 06:54:00 PM
Quote from: Gluz on May 19, 2015, 05:38:34 PM
Can I register in your Test Forum to view all the themes when logged in? maybe ther I could help you to fix things.

Absolutely

Will begin work in a bit on the fix for Hope template
Title: Re: Like Posts
Post by: Siirist on May 20, 2015, 04:33:58 PM
Quote from: Gluz on May 19, 2015, 05:38:34 PM
For the theme that doesn't have Display.template.php, it uses the default one, so if the default theme works, that theme should work too.


On the theme Bright Forest, if the link to read Unread Replys is not present in index.template.php, then that means that there is no user zone to add the link to show Like Notifications, is not really a big deal, the thing is that in that theme there is no other way to show Like Notifications. Need to look a place to place that link and then add it there.

And for the Hope theme, I think that the design don't get in mind a big main menu, so when you have so many buttons in the menu the logo get to another line. The fix for that is really simple, in the index.css of the Hope Theme:
Code (Search) Select
#logo a {
Code (Add after) Select
position: absolute;

That fix the logo and the layout should look ok.

Can I register in your Test Forum to view all the themes when logged in? maybe there I could help you to fix things.

Yeah, fixed it mostly but still not looking completely right
Title: Re: Like Posts
Post by: Paracelsus on May 21, 2015, 06:12:34 AM
The new version works very well Joker, no more problems with Reseller theme, thank you. ;D

A question about the "show likes notification"... is it "interactive"? I mean, is it possible for a user to know whenever it receives a like on one of its posts like you get when you receive new/unread PMs?
Title: Re: Like Posts
Post by: Media-Bay on May 30, 2015, 06:40:36 AM
Hi need some help please.

This mod is great and works so well on my site. but for some reason then i look at a post a member has made is see the like icon twice.

I have attached picture.

(http://thumbnails107.imagebam.com/41255/16ddba412544845.jpg) (http://www.imagebam.com/image/16ddba412544845)
Title: Re: Like Posts
Post by: Livaco on May 31, 2015, 05:07:31 PM
It doesent work, look

(http://s15.postimg.org/xmdnjswsr/Untitled2.png)

When on the prevew on the page of the mod
(http://s4.postimg.org/6ug53rc1p/Untitled.png)
Title: Re: Like Posts
Post by: jakes_t on June 03, 2015, 06:29:36 AM
Hi Joker

Thanks for a very nice mod!

Can you help with getting the Like button to match the look and feel of the curve theme? (rounded corners button and capital letters etc)

Similar to the example below?

Thanks!
Title: Re: Like Posts
Post by: Elizabeth II on June 10, 2015, 05:10:17 PM
When you click on someones likes on a post, you get the box.. I changed the main background colour, but how do you change the colour of the small spacer in between names of people who liked, basically the border?

TIA
Title: Re: Like Posts
Post by: Elizabeth II on June 10, 2015, 08:07:14 PM
Apologies for double post can't seem to edit my own post after 2nd time... Is there also a way to make that box not transparent? As you can see through it to the nav menu

(http://i61.tinypic.com/ilbner.png)
Title: Re: Like Posts
Post by: amritsidhu on June 12, 2015, 09:09:51 PM
Like notification box is too far to the left on my mobile website how can i make it responsive to fit the mobile screen or at least show in center. Thank for nice mod :)
Title: Re: Like Posts
Post by: strano on June 13, 2015, 01:35:24 PM
hi...for an upgrade from ...... 1.3.1 version? :D

Are there any problem? it's possible?
Title: Re: Like Posts
Post by: MilanRS on June 26, 2015, 06:29:08 AM
Does this support determineActions()?
It seams that I see "Unknown Action" on Who is online when someone is doing some action with Like (Like, Dislike, View likes...).
Title: Re: Like Posts
Post by: heiho1974 on July 08, 2015, 02:20:55 AM
My Problem ist this:

SQL logic error or missing database
near "SHOW": syntax error
Datei: /mnt/webo/c0/78/54140778/htdocs/forum/Packages/temp/installer/install.php
Zeile: 155
Title: Re: Like Posts
Post by: strano on July 10, 2015, 09:13:03 AM
I've some problem with stats: when i want to see the stats about the Users, there is an infinite loading.
Title: Re: Like Posts
Post by: Anjuna on July 13, 2015, 04:17:09 AM
Could someone modify this mod further so that it can work with my theme (Redsy)?
Title: Re: Like Posts
Post by: Gluz on July 13, 2015, 05:06:22 AM
Quote from: Anjuna on July 13, 2015, 04:17:09 AM
Could someone modify this mod further so that it can work with my theme (Redsy)?

The way to make it work is to modify the Theme to pass the required modifications to install it from the package manager.
Title: Re: Like Posts
Post by: Anjuna on July 13, 2015, 10:43:05 AM
Quote from: Gluz on July 13, 2015, 05:06:22 AM
The way to make it work is to modify the Theme to pass the required modifications to install it from the package manager.

And if I knew how to do that, I wouldn't be here.   ;D
Title: Re: Like Posts
Post by: Gluz on July 13, 2015, 06:04:23 PM
Well, first of all, have you tried to see what errors have the Package Manager when check in the Theme?

After that it's easy to help you modify the Theme to install the MOD.
Title: Re: Like Posts
Post by: johndays on July 15, 2015, 05:16:48 PM
Anyone knows the reason why special characters like "João" or "Cão", "á" are getting null in the response of getMessageLikeInfo?

I discovered, needed this ->

'name' => (!$context['utf8']) ? utf8_encode($row['real_name']) : $row['real_name'],

Thanks
Title: Re: Like Posts
Post by: johndays on July 16, 2015, 07:21:27 AM
Quote from: halpaslan on March 12, 2015, 03:18:05 AM
Is it possible to like post as a tapatalk option?
Title: Re: Like Posts
Post by: Yorel on July 19, 2015, 08:26:43 AM
Thanks Joker for the mod  ;)

Is there any chance of translating it to Spanish?.

Regards
Title: Re: Like Posts
Post by: SirLouen on July 19, 2015, 09:34:54 AM
Quote from: Yorel on July 19, 2015, 08:26:43 AM
Thanks Joker for the mod  ;)

Is there any chance of translating it to Spanish?.

Regards

Translate it by yourself:
Create LikePosts.spanish.php with the strings translated from here:
Themes/default/languages/LikePosts.english.php

Depending in your translation config you have to create a new file
For example:
Themes/default/languages/LikePosts.spanish_es-utf8.php
or just
Themes/default/languages/LikePosts.spanish_es.php
Title: Re: Like Posts
Post by: Yorel on July 19, 2015, 11:54:23 AM
Thanks SirLouen. I translated the Mod the way you said.

Now, could someone say to me how notifications work?. Do arrive a PM to the user who receives 1 Like?, I enabled this feature, received Like but no notification (of any kind) arrived.
Title: Re: Like Posts
Post by: smitch6 on August 01, 2015, 07:09:52 AM
Hi installed on the latest version
i have the menu icons on my forum and notice that the like stats is showing twice with a broken image
Title: Re: Like Posts
Post by: FinalBoss on August 08, 2015, 11:05:58 PM
I cant even find the menu for this - its not in 'admin > configuration > modifications' Where is the option to turn this on and make configurations.

*EDIT - disregard menu loss- install failed, had to reinstall the sucker. Thanks for the love if you read this!!!!!!!!!!!!!!

However, I dont have the like button though - I am running SMF 2.0.10 and a mobile responsive theme from SMFPACKS. I don't have the like button on my mobile response page or browser page? I turned on all the buttons in the settings, including on all the boards and member groups.
Title: Re: Like Posts
Post by: FinalBoss on August 10, 2015, 02:37:16 AM
Yeah I had a play around with it this arvo, and still I don't have the like button on my forum at all - I have activated everything, in every board, for every membergroup, turned it on - the only thing that works is the 'likes' menu that takes me to the statistics page, which is pretty much useless because no one has a like button on their posts to use.
Title: Re: Like Posts
Post by: Gluz on August 10, 2015, 06:23:48 PM
Maybe you have some conflict with jQuery, that's the main reason to not display the Like button in the posts.

When load your page press F12 and go to the "Console" section, then reload the page and check for any errors in javascript.
Title: Re: Like Posts
Post by: FinalBoss on August 11, 2015, 10:25:04 PM
Sorry for late reply. Thanks for advice I will give it a Crack this arvo and let you know.

Cheers
Title: Re: Like Posts
Post by: TomW on August 15, 2015, 11:56:14 PM
I manually edited the files, verified the changes, then uploaded them to my server, again verifying that the changed plus new files were uploaded successfully.  install.php also works.  However when I try installHooks.php I get this error:

Notice: Undefined index: lp_all_notification in /home/hotrod21/public_html/Sources/LikePosts/LikePosts.php on line 275

Notice: Undefined index: lp_my_posts in /home/hotrod21/public_html/Sources/LikePosts/LikePosts.php on line 276

Notice: Undefined index: lp_no_notification in /home/hotrod21/public_html/Sources/LikePosts/LikePosts.php on line 277

Notice: Undefined index: lp_stats in /home/hotrod21/public_html/Sources/LikePosts/LikePosts.php on line 306


what could be the problem ?  I've made many mods changes over the 8 years that I have used SMF with success.  This is the first time that I need help.
Title: Re: Like Posts
Post by: FinalBoss on August 16, 2015, 07:13:26 AM
Ok so i reinstalled the whole thing - yeah it works a bit better now but the like button only shows in sticky topics, it doesnt show in all topics or posts, any ideas?

thanks
Title: Re: Like Posts
Post by: FinalBoss on August 16, 2015, 08:56:04 AM
Ok fixed it lol - disregard last post

I reinstalled it. Must have been an install error to start with. Thanks for all the help people. Cheers ;D
Title: Re: Like Posts
Post by: vkot on August 17, 2015, 04:25:47 AM
Quote from: Joker™ on April 29, 2015, 11:14:36 AM
Quote from: Paracelsus on March 23, 2015, 06:23:38 AM
One feature I would much appreciate in the Like system is if there was the possibility of sorting posts in a topic by likes (ascending/descending). This way one could read from the most to the least popular posts in a topic (and vice-versa).
It sounds nice, but will be very query extensive, i.e not very DB friendly

I cannot imagine why this would not be very "DB friendly". It's just sorting, the same way as there is sorting by date (default), title, user, views, replies, etc.
I would like to have this feature too. SMF Likes (http://www.smfpacks.com/likes) does this.
Title: Re: Like Posts
Post by: Casa Grande on August 28, 2015, 03:33:01 PM
OK, so I've read this thread, I've gone back and forth with the mod, checked and double checked the coding and I'm still not able to get it to work. I've checked my permissions in the admin.  Everything seems to be in order, but there are two things happening that aren't making any sense to me. First, what is this supposed to do for me:  "Show Likes notification" -at the top of the page?   It's not even a link, it just sits there.

Second, when I click on the "like" link (no image) at the bottom of the post, nothing happens.  It's just dead. No running count under the avatar, no nothing.  What am I missing here?
Title: Re: Like Posts
Post by: Gluz on August 28, 2015, 05:14:49 PM
If you click on the "Show Likes Notification" and nothing happens, then you have an issue with jQuery, and the same goes to the "Like" link at the bottom of the post, it should animate and change to "Unlike" with another background color.

Can you give a link to your forum?
Title: Re: Like Posts
Post by: Casa Grande on August 31, 2015, 08:13:19 AM
Quote from: Gluz on August 28, 2015, 05:14:49 PM
If you click on the "Show Likes Notification" and nothing happens, then you have an issue with jQuery, and the same goes to the "Like" link at the bottom of the post, it should animate and change to "Unlike" with another background color.

Can you give a link to your forum?

The "Show Likes Notification" isn't even a link; it's unclickable.  The LIKE is a text link and does nothing.  I'll check the jquery stuff.  I'll PM you a link to the forum as it is not live yet.

Thanks for your help!
David
Title: Re: Like Posts
Post by: fungolfer on September 02, 2015, 02:59:23 PM
Great mod, thanks alot. Thats what I was looking for :)

Had to uninstall once and after second install it is working perfect...
Title: Re: Like Posts
Post by: Jingaling on September 22, 2015, 06:15:40 AM
Unfortunately, I can't get this working with my theme, Redsy. Looking at the errors when I try to install, it's to do with index.template.php. The installer looks for the following:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

Then adds it's code afterward. However, that piece of code isn't present in my index.template.php file. I've tried to add the code manually, but I'm not sure where to add it. When I try, I just get a link in the header saying "Likes Menu".

If someone could assist in getting this working with my theme, I've really appreciate it. I've attached my index.template.php file to this post.
Title: Re: Like Posts
Post by: margarett on September 22, 2015, 06:56:17 AM
Yeah, Redsy if *very* different from Curve so most MODs struggle with it.

The line you're looking for is
<li><a href="' , $scripturl , '?action=unreadreplies;"><i class="fa fa-comments fa-fw"></i>' , $txt['new_replies'] , '</a></li>
But there is no span in Redsy so it might need some "love" to have it in place.
Title: Re: Like Posts
Post by: SaMania on September 22, 2015, 07:35:25 PM
Bug+ Bug+Bug!  >:(
Title: Re: Like Posts
Post by: margarett on September 22, 2015, 07:54:22 PM
What? :o
Title: Re: Like Posts
Post by: Adonix on September 24, 2015, 12:33:57 AM
waiting for this module to have compatibility with this theme : http://custom.simplemachines.org/themes/index.php?lemma=2835
Title: Like Posts - theme & text change?
Post by: debiwebi on October 20, 2015, 01:03:16 PM
I've just installed this mod for the newcomers to my forum, migrating recently from another forum that had a Like button. I'd like to change the text from 'like' to 'thank you' -- that shouldn't be too difficult, correct?

Also, my default theme is Sunset, which is not compatible with the mod.
Any plans to make this mod work with other themes? Is that difficult? Time consuming?

Thanks for a great mod  ~
Title: Please help!!!
Post by: Piilot on October 21, 2015, 03:29:22 PM
Hi all,

I have been at this for HOURS and can not find a solution;       

Execute Modification   ./Themes/Reseller_1/index.template.php   Test failed
   1.   Add After   ./Themes/Reseller_1/index.template.php   Test failed

There is no code in the php, only this,

// Show the menu here, according to the menu sub template.
               template_menu();
               
            echo'
            </ul>
         </div>
      </div>
   </div>
</nav>
<header>
   <div class="container">
      <div class="row">
         <div class="col-md-9">
            <a href="', $scripturl, '"><img src="' , !empty($context['header_logo_url_html_safe']) ? $context['header_logo_url_html_safe'] : $settings['images_url'] . '/logo.png' , '" alt="' . $context['forum_name'] . '" /></a>
         </div>
         <div class="col-md-3">';
         if ($context['user']['is_logged'])
         {
            if (!empty($context['user']['avatar']))
            echo '
               <img src="', $context['user']['avatar']['href'], '" class="avatar img-circle img-thumbnail" alt="*" />';
            echo'
               <ul class="reset">
                  <li class="user">', $context['user']['name'], '</li>
                  <li><a href="', $scripturl, '?action=profile">', $txt['profile'], '</a></li>
                  <li><a href="', $scripturl, '?action=profile;area=forumprofile">', $txt['forumprofile'], '</a></li>
                  <li><a href="', $scripturl, '?action=unread">', $txt['unread_topics_visit'], '</a></li>
                  <li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>
               </ul>';
         }

Thanks for helping me :D
Title: Re: Like Posts
Post by: Mimmi on October 27, 2015, 03:46:35 AM
Quote from: SirLouen on July 19, 2015, 09:34:54 AM
Quote from: Yorel on July 19, 2015, 08:26:43 AM
Thanks Joker for the mod  ;)

Is there any chance of translating it to Spanish?.

Regards

Translate it by yourself:
Create LikePosts.spanish.php with the strings translated from here:
Themes/default/languages/LikePosts.english.php

Depending in your translation config you have to create a new file
For example:
Themes/default/languages/LikePosts.spanish_es-utf8.php
or just
Themes/default/languages/LikePosts.spanish_es.php

I have created LikePosts.norwegian-utf8.php as a copy of the LikePosts.english.php and translated the strings, but the language used in the forum is still the English version. Everything else is in Norwegian. What should I do?

Title: Re: Like Posts
Post by: irishgal1971 on October 27, 2015, 02:56:35 PM
I'm getting this error in my error log:

Apply Filter: Only show the error messages of this URLhttp://www.americanpatriotcommunity.com/index.php?action=admin;area=logs;e0beb0c=cd0861f07b781859b34285efa844b971Apply Filter: Only show the errors with the same message8: Undefined index: forum_nameApply Filter: Only show the errors from this file File: /home/worldofc/public_html/americanpatriotcommunity.com/Themes/default/languages/LikePosts.english.php (eval?)
Line: 113

Any way to fix it?
Title: Re: Like Posts
Post by: sajidicma on November 09, 2015, 06:46:53 AM
Hi Joker,
I have recently started using your mode. I have observed a problem when Like Posts stats is enabled. While checking for Board stats and Most Like Giving User stats, there is no response and a time wheel appears which continues to revolve. Rest is working fine.
Title: Re: Like Posts
Post by: shabbadoof on November 19, 2015, 12:29:48 PM
Hi Joker

I would like to use this mod please however I would like to change the word from 'Like' to 'Entered' as I am going to use it on a competition subforum

Can you tell me how I would do this please?

Thanks

Jon
Title: Re: Like Posts
Post by: margarett on November 19, 2015, 12:41:35 PM
You just need to change the corresponding text string in the included file LikePosts.english.php
Title: Re: Like Posts
Post by: shabbadoof on November 19, 2015, 01:02:20 PM
sadly it doesn't appear to be that simple


I've just tried to do that and I end up with it now showing 'liked' or 'entered' on posts
Title: Re: Like Posts
Post by: margarett on November 19, 2015, 01:11:49 PM
That's because "Like" or "Liked" are very common words in this MOD. I was actually expecting something that this would happen :P

Can you please printscreen the page, where the text appears and which text is/should be there?
Title: Re: Like Posts
Post by: Siirist on January 12, 2016, 12:10:49 PM
Hello,

I installed this mod using the package manager without any problems.

I went into the APC and set it to be available on ALL boards.

I then set permissions so that all members will see the like buttons throughout the forum, in the member profiles, and be able to like all posts in the forum.

I have the following TWO problems.

ONE) On the Menu Bar, there is NO icon.

(http://i185.photobucket.com/albums/x21/1greywolf/Like_Post.jpg)

TWO)
A) In the posts, the like is a white font color Like This, and does NOT have a maroon background.

B) On the boards, SOME of the Like buttons have a maroon background, and some do not.

I parsed for SMF ver 2.0.11 and verified that all modifications were done and found no errors.

I am using the following themes:
Bright Forest
Habbingo
Habboland
Ostara (set as default template)

And the following MODs:
1.    Custom Copyright    1.0.4    
2.    Simple Menu Icons    1.0    
3.    Like Posts    2.0.5    
4.    SMF Gallery Lite    5.6    
5.    PM Warning    1.0    
6.    Topic Solved    1.1.1    
7.    Google Translate for SMF 2.0    1.4    
8.    SMF 2.0.11 Update    1.0    
9.    Optimus Brave    1.8.7    
10.    Default_Membergroup    2.0    
11.    Welcome Back    1.0    
12.    Enhanced Dropdown    1.3    
13.    Board-color-and-icons    1.1

Thank you in advance,
Siirist
Title: Re: Like Posts
Post by: Siirist on January 13, 2016, 09:27:06 AM

*nudge*
Title: Re: Like Posts
Post by: Siirist on January 13, 2016, 04:28:03 PM

Um, bump
Title: Re: Like Posts
Post by: Siirist on January 16, 2016, 10:49:45 PM

**Shove**
Title: Re: Like Posts
Post by: Siirist on January 18, 2016, 03:54:15 PM

The "shove" was a joke. Any one have any thoughts about this?
Title: Re: Like Posts
Post by: CDLehner on January 18, 2016, 09:34:05 PM
It was suggested, I post this here:

I installed the following mod, for a 'Like' button...

(http://i229.photobucket.com/albums/ee136/CDLehner/es09_zpsqsskzusg.png) (http://s229.photobucket.com/user/CDLehner/media/es09_zpsqsskzusg.png.html)

and it seems to have taken...

(http://i229.photobucket.com/albums/ee136/CDLehner/es10_zpsbaciblgw.png) (http://s229.photobucket.com/user/CDLehner/media/es10_zpsbaciblgw.png.html)

(http://i229.photobucket.com/albums/ee136/CDLehner/es12_zps8w9ai2sp.png) (http://s229.photobucket.com/user/CDLehner/media/es12_zps8w9ai2sp.png.html)

But I don't see a 'Like' button anywhere (I'm used, to seeing it...where the purple box is). Could it have something to do, with the way I already have my Karma set-up?

(http://i229.photobucket.com/albums/ee136/CDLehner/es11_zpsh5saebtw.png) (http://s229.photobucket.com/user/CDLehner/media/es11_zpsh5saebtw.png.html)

Thanks
Title: Re: Like Posts
Post by: Siirist on January 18, 2016, 09:48:33 PM
Hi CDLehner,

For me the word Like is white in color and sometimes does NOT have the maroon background to make it visible.

An example of this is in my Guest Area here (http://www.asanctuary.net/forum2/index.php?board=61.0)

And this MOD places the "Like" at the bottom of all the text in the post, an example here (http://www.asanctuary.net/forum2/index.php?topic=703.0) *Remember that because it is NOT working correctly that the word "Like" is white in color.

My Karma is fully functional and is a separate thing from "Like Post".

Are you wanting to have the Karma Buttons to say "Like" and "Dis-Like"?

Be Well,
Siirist


*EDIT -->  Forgot to mention Thank you for posting in the right place
Title: Re: Like Posts
Post by: CDLehner on January 18, 2016, 10:03:33 PM
Quote from: Siirist on January 18, 2016, 09:48:33 PM
Hi CDLehner,

For me the word Like is white in color and sometimes does NOT have the maroon background to make it visible.

An example of this is in my Guest Area here (http://www.asanctuary.net/forum2/index.php?board=61.0)

And this MOD places the "Like" at the bottom of all the text in the post, an example here (http://www.asanctuary.net/forum2/index.php?topic=703.0) *Remember that because it is NOT working correctly that the word "Like" is white in color.

My Karma is fully functional and is a separate thing from "Like Post".

Are you wanting to have the Karma Buttons to say "Like" and "Dis-Like"?

Be Well,
Siirist


*EDIT -->  Forgot to mention Thank you for posting in the right place

No...I'm happy to have Like, separate from the Karma. So it sounds like the solution, is to change the 'Like' color; to something that will stand out from your background (that is...if you don't particularly want to change your background)?

NooB alert; how do I do? :)

Thanks
Title: Re: Like Posts
Post by: Siirist on January 19, 2016, 12:32:05 AM
Quote from: CDLehner on January 18, 2016, 10:03:33 PM

No...I'm happy to have Like, separate from the Karma. So it sounds like the solution, is to change the 'Like' color; to something that will stand out from your background (that is...if you don't particularly want to change your background)?

NooB alert; how do I do? :)

Thanks

Well, truth said, I do not know how to change the color.

However, I am brave enough to look into and try something AFTER I back-up.
ALWAYS back-up BEFORE making changes.

Give me 24 hours (unless someone else comes and gives us the answer)

Be Well,
Siirist
Title: Re: Like Posts
Post by: CDLehner on January 19, 2016, 09:26:41 AM
I got it. There are screen-shots, on the mod page that helped.

(http://i229.photobucket.com/albums/ee136/CDLehner/es20_zpsspitv5fa.png) (http://s229.photobucket.com/user/CDLehner/media/es20_zpsspitv5fa.png.html)

(http://i229.photobucket.com/albums/ee136/CDLehner/es21_zpsteaugzza.png) (http://s229.photobucket.com/user/CDLehner/media/es21_zpsteaugzza.png.html)

(http://i229.photobucket.com/albums/ee136/CDLehner/es22_zpsapgbobix.png) (http://s229.photobucket.com/user/CDLehner/media/es22_zpsapgbobix.png.html)
Title: Re: Like Posts
Post by: Siirist on January 19, 2016, 11:09:48 AM
Hi CD,

Glad it worked for you!   :D

Please in the future, attach images INSTEAD of placing them in the post.

I know that some members use cell phones to access SMF and your post size make the page unreadable.

By using attachments, the post is readable and the person looking at it can check out the attachments one by one.

Be Well,
Siirist
Title: Re: Like Posts
Post by: Siirist on January 22, 2016, 04:23:08 PM
* Bump

Quote from: Siirist on January 12, 2016, 12:10:49 PM
Hello,

I installed this mod using the package manager without any problems.

I went into the APC and set it to be available on ALL boards.

I then set permissions so that all members will see the like buttons throughout the forum, in the member profiles, and be able to like all posts in the forum.

I have the following TWO problems.

ONE) On the Menu Bar, there is NO icon.

(http://i185.photobucket.com/albums/x21/1greywolf/Like_Post.jpg)

TWO)
A) In the posts, the like is a white font color Like This, and does NOT have a maroon background.

B) On the boards, SOME of the Like buttons have a maroon background, and some do not.

I parsed for SMF ver 2.0.11 and verified that all modifications were done and found no errors.

I am using the following themes:
Bright Forest
Habbingo
Habboland
Ostara (set as default template)

And the following MODs:
1.    Custom Copyright    1.0.4    
2.    Simple Menu Icons    1.0    
3.    Like Posts    2.0.5    
4.    SMF Gallery Lite    5.6    
5.    PM Warning    1.0    
6.    Topic Solved    1.1.1    
7.    Google Translate for SMF 2.0    1.4    
8.    SMF 2.0.11 Update    1.0    
9.    Optimus Brave    1.8.7    
10.    Default_Membergroup    2.0    
11.    Welcome Back    1.0    
12.    Enhanced Dropdown    1.3    
13.    Board-color-and-icons    1.1

Thank you in advance,
Siirist
Title: Re: Like Posts
Post by: Siirist on January 23, 2016, 05:42:39 PM
Sheesh, okay, never mind.

*cuts and eats a piece of humble pie*

I forgot to use the default theme.  Boy do I feel sheepish.

So yeah, the MOD functions as intended when using the default theme.

Be Well,
Siirist
Title: Re: Like Posts
Post by: Gluz on January 30, 2016, 03:32:03 AM
That means your theme overides the CSS of the Like Button, so, you need to change some things in the CSS file of your other theme.
Title: Re: Like Posts
Post by: Atrus on February 04, 2016, 04:01:02 PM
Hi Joker,

   I have your "Like Posts    2.0.5" installed on my forum, (2.0.11).  I am looking for a mod that allows like/unlike of individual posts within a topic. I do see the "Like" button at the top if the topic in the index of a board, but nothing shows up in any of the individual posts. Since I am not looking to "like" the entire topic, I have " Show like button on board index - Global settings to show like button board index" unchecked. I have set permissions for membergroups, and boards, and all looks good.

I am using a custom theme that I have modified for appearance sake to my liking, and wonder if there are any manual mods that I may have to apply ti it? Since guests can only "look but not post," I have everything unchecked for guests. I doubt visiting the forum will help, but here is the url; www.myconstitution.info (http://www.myconstitution.info)

Could you please offer any suggestions on what else I could check to activate the "Like Posts" at the individual post level?

Thanks for the mod. If I can make it work, it's EXACTLY what I  want...



Title: Re: Like Posts
Post by: Siirist on February 04, 2016, 05:16:26 PM
Quote from: Atrus on February 04, 2016, 04:01:02 PM
Hi Joker,

   I have your "Like Posts    2.0.5" installed on my forum, (2.0.11).  I am looking for a mod that allows like/unlike of individual posts within a topic. I do see the "Like" button at the top if the topic in the index of a board, but nothing shows up in any of the individual posts. Since I am not looking to "like" the entire topic, I have " Show like button on board index - Global settings to show like button board index" unchecked. I have set permissions for membergroups, and boards, and all looks good.

I am using a custom theme that I have modified for appearance sake to my liking, and wonder if there are any manual mods that I may have to apply ti it? Since guests can only "look but not post," I have everything unchecked for guests. I doubt visiting the forum will help, but here is the url; www.myconstitution.info (http://www.myconstitution.info)

Could you please offer any suggestions on what else I could check to activate the "Like Posts" at the individual post level?

Thanks for the mod. If I can make it work, it's EXACTLY what I  want...

I have heard that Joker has been absent for some time now.

They are active at the individual post level.

I am running the same MOD on 2.0.10 with SMF Default, Ostara, Bright Forest (BF), Sunshine, and Hope themes. The only one it did not function on SkyFall theme.

See attachments.

Regards,
Siirist
Title: Re: Like Posts
Post by: Atrus on February 04, 2016, 05:18:25 PM
Quote from: Atrus on February 04, 2016, 04:01:02 PM
Hi Joker,

   I have your "Like Posts    2.0.5" installed on my forum, (2.0.11).  I am looking for a mod that allows like/unlike of individual posts within a topic. I do see the "Like" button at the top if the topic in the index of a board, but nothing shows up in any of the individual posts. Since I am not looking to "like" the entire topic, I have " Show like button on board index - Global settings to show like button board index" unchecked. I have set permissions for membergroups, and boards, and all looks good.

I am using a custom theme that I have modified for appearance sake to my liking, and wonder if there are any manual mods that I may have to apply ti it? Since guests can only "look but not post," I have everything unchecked for guests. I doubt visiting the forum will help, but here is the url; www.myconstitution.info (http://www.myconstitution.info)

Could you please offer any suggestions on what else I could check to activate the "Like Posts" at the individual post level?

Thanks for the mod. If I can make it work, it's EXACTLY what I  want...

Ok, I just did some more checking and it does work as advertised on the default theme. It does not work on my modified theme, even though the installation said it was ok through the package manager. Stats work fine, but in my theme no likes show up under user's avatar, and no like button in individual posts that I did not make. Everything seems to work fine in default theme.

So now I do a "stare and compare" on files in my theme. 

Thanks for the mod!!!

Title: Re: Like Posts
Post by: Siirist on February 04, 2016, 05:26:07 PM
Quote from: Atrus on February 04, 2016, 05:18:25 PM

Ok, I just did some more checking and it does work as advertised on the default theme. It does not work on my modified theme, even though the installation said it was ok through the package manager. Stats work fine, but in my theme no likes show up under user's avatar, and no like button in individual posts that I did not make. Everything seems to work fine in default theme.

So now I do a "stare and compare" on files in my theme. 

Thanks for the mod!!!

Well, I would go to the MOD and parse it for 2.0.11, then check your files and ensure that the changes were successfully made.
Some others would uninstall and reinstall, but I think that won't help because you have verified that the MOD does in fact function with the default theme.

Just my thoughts,
Siirist
Title: Re: Like Posts
Post by: Atrus on February 05, 2016, 03:12:25 PM
Quote from: Siirist on February 04, 2016, 05:26:07 PM
Quote from: Atrus on February 04, 2016, 05:18:25 PM

Ok, I just did some more checking and it does work as advertised on the default theme. It does not work on my modified theme, even though the installation said it was ok through the package manager. Stats work fine, but in my theme no likes show up under user's avatar, and no like button in individual posts that I did not make. Everything seems to work fine in default theme.

So now I do a "stare and compare" on files in my theme. 

Thanks for the mod!!!

Well, I would go to the MOD and parse it for 2.0.11, then check your files and ensure that the changes were successfully made.
Some others would uninstall and reinstall, but I think that won't help because you have verified that the MOD does in fact function with the default theme.

Just my thoughts,
Siirist

That's precisely what I have in mind.  Thanks for the suggestion.

Title: Re: Like Posts
Post by: Siirist on February 05, 2016, 06:22:54 PM
You're Welcome,
Siirist
Title: Re: Like Posts
Post by: Atrus on February 05, 2016, 09:19:53 PM


I had to manually edit a few of the template files in my theme, and it is now working! I even changed the color and text, and rounded the corners of the button, to fit the theme.

All working great now. Thanks again!
Title: Re: Like Posts
Post by: Siirist on February 05, 2016, 11:50:20 PM
You're Welcome,
Siirist
Title: Re: Like Posts
Post by: Dylert on February 09, 2016, 08:37:43 AM
Thanks a lot for a really great mod! :)

I have a question: Is it possible to change the info in the profile field of the post from "Total likes" to "Likes given"? How do I do that?

Thanks in advance! :)
Title: Re: Like Posts
Post by: PLAYBOY on March 02, 2016, 12:14:43 PM
Does this mod sort out the msgs and topics based on how many likes it has? so It`ll show the best answer for the question on top?
and the topics with most likes are listed on top?


Also is there a Turkish translation? if not I may be able to help out on this
Title: Re: Like Posts
Post by: Kindred on March 02, 2016, 12:29:55 PM
no. It does no change in sorting the display.

What you want is the one called the "Best Answer" mod.
Title: Re: Like Posts
Post by: PLAYBOY on March 02, 2016, 01:33:57 PM
Yes. That`s it. Thx dude
Title: Re: Like Posts
Post by: violoniste18 on March 04, 2016, 12:36:44 AM
I just install mod "SMF Likes Plus 1.5" with my smf version 2.0.11

It works great but i would like to get a "total likes" at the profile, how to do that please ? It will be quite great to get it !
Title: Re: Like Posts
Post by: margarett on March 04, 2016, 01:53:13 PM
You do realize that the MOD you are mentioning is not, in any way, related to this topic/MOD, right? ;D
Title: Re: Like Posts
Post by: violoniste18 on March 04, 2016, 08:19:52 PM
yes but i don't find out how create a new thread

is there anyone who knows about my question ?
Title: Re: Like Posts
Post by: Kindred on March 04, 2016, 11:17:51 PM
You need to ask the author of that mod...  Which is not here.
Title: Re: Like Posts
Post by: violoniste18 on March 06, 2016, 03:28:38 PM
I just change to install that mod from Joker, it's better with Total likes

It's great but I got a little bug, button "like stats" is runing always without end

my smf forum is 2.0.11

thanks for helping
Title: Re: Like Posts
Post by: Kindred on March 06, 2016, 04:35:00 PM
so, you UNINSTALLED the other mod?
and then installed this mod?

Not sure what you mean by this: "button "like stats" is runing always without end"
Title: Re: Like Posts
Post by: violoniste18 on March 06, 2016, 04:44:14 PM
I see a rotating sun never stoping as I go to "like stats"

And Yes, I Uninstalled the other mod and Install that mod "LikePosts2.0.5"

Title: Re: Like Posts
Post by: Kindred on March 06, 2016, 06:22:12 PM
URL?
Title: Re: Like Posts
Post by: violoniste18 on March 07, 2016, 01:46:31 AM
yes of course ! (sorry, I forgot it ...)

it's a french forum : http://www.forum-violon.fr/forumvio_one/index.php

thanks in advance for your helping
Title: Re: Like Posts
Post by: Kindred on March 07, 2016, 08:40:33 AM
So, I have this mod installed on a site...

and, looking int he firebug console, I notice two things different about out sites.
1- my jquery checks to see if there is another jquery already loaded... (from another mod, etc)
2- My ajax call sends a response.


I can't tell if your site does #1...   it loads jquery 2.0.3, in the end, but there could be a conflict.

However... your site sends/receives the headers and params --- but never generates a response!
Title: Re: Like Posts
Post by: violoniste18 on March 07, 2016, 11:17:58 AM
what smf version do you have ? less than 2.0.11 ? I wonder about it

I understand you don't get this bug on your site with this mod ?

If you have ideas about tests or changes to do ...

thanks !
Title: Re: Like Posts
Post by: Kindred on March 07, 2016, 11:19:20 AM
I have SMF v2.0.11, of course... :)

but no.... other than noting the differences, I don't have any suggestions for fixing your issue. Sorry
Title: Re: Like Posts
Post by: violoniste18 on March 07, 2016, 11:23:09 AM
is there a method to debug that issue ? (to get some ideas in order to searching myself ...)
Title: Re: Like Posts
Post by: violoniste18 on March 08, 2016, 01:49:33 AM
I removed "like stats", as long as I didn't fix it

Another question, is it possible to get a line with who is liking ?
Title: Re: Like Posts
Post by: natcip on March 22, 2016, 03:25:22 PM
Before I install this mod. Is there a way to enable the like/dislike feature only for posts, not the thread listing.
Title: Re: Like Posts
Post by: skb on April 05, 2016, 05:35:48 AM
Yes there is. In the Admin / Configuration / Like Posts settings.

And I'm looking for a way to display username with the Likes rather than (and 3 persons liked this post)
Title: Re: Like Posts
Post by: kejesdi on April 13, 2016, 04:44:59 PM
Hi!
I installed "Like Posts" modyfication and generally it works properly, but I have a problem with encoding special characters. My forum uses the standard encoding (ISO), does not support utf-8. Unfortunately, all Like Posts notifications, contain errors with special characters. Additionally, if the user names contain special characters, it displays only "null". Can anybody help me?

(http://www.farmbook.webd.pl/magazyn/likepsot.jpg)

(http://www.farmbook.webd.pl/magazyn/likepsot2.jpg)
Title: Re: Like Posts
Post by: JerzyLS on April 14, 2016, 09:49:56 AM
Polish fonts works perfect with LikePosts. I think it's problem of your forum with UTF-8 coding.
Title: Re: Like Posts
Post by: kejesdi on April 14, 2016, 04:04:01 PM

As I wrote, my forum is based on the standard encoding (ISO), not utf-8. The script attempts to forcibly change the encoding to utf-8. Can I turn it off?

I found in the: Sources / LikePosts / DB / LikePostsDB.php
'Subject' => (! $ Context [ 'utf8'])? utf8_encode ($ row [ 'subject']): $ row [ 'subject']

I tried to change it like this:
'Subject' => $ row [ 'subject']

However, it does not work, because the script is displayed as "null" all topics that contain at least one special character (the others are displayed correctly).
Title: Re: Like Posts
Post by: kejesdi on April 24, 2016, 04:31:56 PM
Anyone can help? :)
Title: Re: Like Posts
Post by: Dhayzon on April 25, 2016, 05:27:22 PM
 :-[ :-[ how to get avatar and name llikes on display.. 
examples

likes . jhon, evanescence, romeo, juliet, and more

show name and avatar
Title: Re: Like Posts
Post by: qc on April 30, 2016, 10:19:54 PM
Quote from: Dhayzon on April 25, 2016, 05:27:22 PM
:-[ :-[ how to get avatar and name llikes on display.. 
examples

likes . jhon, evanescence, romeo, juliet, and more

show name and avatar
We are using this mod on our site, too, and showing a few of the users that liked a post - e.g. "You, Jon, Barbara and Dhayzon like this" instead of just "You and x others like this" would be a great enhancement.

Adding the profile image though... I don't know - you would need a smaller version of the profile image first (or have to resize a big image in the client browser which might be bad for the bandwith).

Also, the database tables might not be optimally designed for showing these names right now (just guessing). But still, would be nice to have :)
Title: Re: Like Posts
Post by: gorbi on May 01, 2016, 02:02:02 AM
Do I understand correctly that the author does not support mode anymore?
Title: Re: Like Posts
Post by: Dhayzon on May 05, 2016, 05:52:58 AM
Quote from: Dhayzon on April 25, 2016, 05:27:22 PM
:-[ :-[ how to get avatar and name llikes on display.. 
examples

likes . jhon, evanescence, romeo, juliet, and more

show name and avatar
}

solved
8)

(https://lh3.googleusercontent.com/-NleCOuD_KUo/VysXsD3v79I/AAAAAAAAAVo/LufWuUZ0Nko/s0/chrome_2016-05-05_04-51-38.png)

(https://lh3.googleusercontent.com/-UHwG37Uf4sU/VysX8yWhZUI/AAAAAAAAAVs/q1naTaUR8lc/s0/chrome_2016-05-05_04-52-37.png)
Title: Re: Like Posts
Post by: Dhayzon on May 06, 2016, 12:04:39 PM
how to show total  likes on profile
Title: Re: Like Posts
Post by: Steve on May 07, 2016, 09:00:09 AM
Quote from: gorbi on May 01, 2016, 02:02:02 AM
Do I understand correctly that the author does not support mode anymore?

He hasn't been here since August 2015 so it's unlikely.

Quote from: Dhayzon on May 06, 2016, 12:04:39 PM
how to show total  likes on profile

The first post here indicates how to do that.
Title: Re: Like Posts
Post by: Dhayzon on May 10, 2016, 04:15:25 PM
steve
I can not find it
Title: Re: Like Posts
Post by: jholla on June 22, 2016, 06:06:02 PM
Could anyone help me figure out how to install this with the Reseller theme? When installing the package, everything checks out OK except for the index.template.php page. I'm not sure what I'd need to add to the file to make it compatible.
Title: Re: Like Posts
Post by: Grammy on June 22, 2016, 06:24:16 PM
Quote from: jholla on June 22, 2016, 06:06:02 PM
Could anyone help me figure out how to install this with the Reseller theme? When installing the package, everything checks out OK except for the index.template.php page. I'm not sure what I'd need to add to the file to make it compatible.


First, back up your files (by saving copies from your server onto your computer prior to any editing).

Then, you have to manually edit that template file.  Are you able to find this line in it?

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['show_unread_replies'], '</a></li>';

If so, add this after:



if(LikePosts::$LikePostsUtils->showLikeNotification()) {
echo '
<li><span class="showLikeNotification" onclick="lpObj.likePostsNotification.showLikeNotification()">', $txt['like_show_notifications'], '</span></li>';
}



If you see that you'll be able to edit Reseller's index.template.php, then go ahead and install the mod and then upload your edited Reseller index.template.php file.   :)


EDIT:  Actually, on your template file, I think the bit you look for is:

<li><a href="', $scripturl, '?action=unreadreplies">', $txt['unread_replies'], '</a></li>
Title: Re: Like Posts
Post by: jholla on June 23, 2016, 05:05:05 PM
Thanks! Got it all set up.
Title: Re: Like Posts
Post by: Grammy on June 23, 2016, 06:39:22 PM
Quote from: jholla on June 23, 2016, 05:05:05 PM
Thanks! Got it all set up.

Great!   ;)
Title: Re: Like Posts
Post by: OriginalHomesoil on July 27, 2016, 03:13:14 PM
I have installed this mod and I dont see any errors however I dont know how to activate it in my forum? There is nothing showing up. New to all this, be gentle on me :)

Thanks
Title: Re: Like Posts
Post by: Shambles on July 27, 2016, 03:18:13 PM
It's all there in post #1 of this topic.
Title: Re: Like Posts
Post by: OriginalHomesoil on July 27, 2016, 04:23:44 PM
Quote from: Shambles on July 27, 2016, 03:18:13 PM
It's all there in post #1 of this topic.

I have been trying to find out how to do this all day. I have gone over those instructions many, many, times.

I am obviously either not understanding or missing something.

Thanks for your help (not)
Title: Re: Like Posts
Post by: Grammy on July 27, 2016, 05:02:38 PM
Quote from: OriginalHomesoil on July 27, 2016, 03:13:14 PM
I have installed this mod and I dont see any errors however I dont know how to activate it in my forum? There is nothing showing up. New to all this, be gentle on me :)

Thanks


Hi.   :)
Do you see, in Admin----> Configuration----> Like Posts  ?  It should be beneath Modification Settings.  Is it not showing up for you?   There are permission settings, board settings, etc.,  to set there, as well as the general settings. 
Title: Re: Like Posts
Post by: skb on July 28, 2016, 05:57:02 AM
By playing around with the css I have managed to have rounded corners to the Like / Unlike buttons.

The mod adds a "Like stats" button to the Menu. I wonder if a Notification can be added under the button which when clicked will open up a list of the last liked post/s since last login by that member. vB has that feature.
Title: Re: Like Posts
Post by: Siirist on July 28, 2016, 09:31:03 AM
Quote from: skb on July 28, 2016, 05:57:02 AM
By playing around with the css I have managed to have rounded corners to the Like / Unlike buttons.

skb,

It is always a nice gesture to include how you were able to accomplish something that you mention in a post.

By doing so your post changes from informative to useful, as I believe there are others beside myself that would like to have rounded corners.

Be Well,
Siirist

Title: Re: Like Posts
Post by: skb on July 28, 2016, 06:32:39 PM
Sure,
In the forum/Themes/default/css/LikePosts.css
Find ".like_link" and below the 4 lines of code add border: 1px solid #C44E19;
border-radius: 5px;

And right below that find ".unlike_link" and below those 4 lines of code add border: 1px solid #000;
border-radius: 5px;


I've used the same colors of the Like/Unlike boxes for the border. If you want another color, change the color to what you like.
Title: Re: Like Posts
Post by: Siirist on July 28, 2016, 07:24:43 PM
Perfect!   :D

Thanks so much.   :)

Siirist
Title: Re: Like Posts
Post by: Dhayzon on August 06, 2016, 02:06:20 PM
You can sort by likes on menssage.index template?
Title: Re: Like Posts
Post by: JerzyLS on September 14, 2016, 03:02:58 AM
This modification isn't compatible with PHP 7:

[14-Sep-2016 08:46:35 Europe/Warsaw] PHP Fatal error:  Uncaught Error: Function name must be a string in /usr/home/user/domains/domain.org/public_html/Sources/LikePosts/LikePostsRouter.php:128
Stack trace:
#0 /usr/home/user/domains/domain.org/public_html/Sources/Profile.php(655): routeLikePostsProfile('75')
#1 /usr/home/user/domains/domain.org/public_html/index.php(164): ModifyProfile()
#2 {main}
  thrown in /usr/home/user/domains/domain.org/public_html/Sources/LikePosts/LikePostsRouter.php on line 128


So, if you want to run your board on PHP 7 you must change a few strings, because LikePosts mod didn't working on this PHP version.

/Sources/LikePosts/LikePostsRouter.php


return LikePosts::$LikePostsAdmin->$subActions[$_REQUEST['sa']]();

change to:

return LikePosts::$LikePostsAdmin->{$subActions[$_REQUEST['sa']]}();

There are more these strings, so you must change all of them. I prefer you to watch your error.log file, it will be easier to find more strings.

If you do it, it should work on PHP 7.
Title: Re: Like Posts
Post by: CDLehner on September 17, 2016, 12:49:26 PM
Sorry; easy question.

Can someone navigate me, to where I control why some boards/categories have the like feature...and some do not?

Thanks
Title: Re: Like Posts
Post by: Kindred on September 17, 2016, 01:56:43 PM
Are all of the boards using the same theme?
Title: Re: Like Posts
Post by: Shambles on September 17, 2016, 02:00:09 PM
From the opening post...



Quote from: Joker™ on June 29, 2013, 09:29:03 AM

...

Admin interface

...

Board Settings
- Select on which boards you want to enable the mod
- If you want to select all boards in a category, just click on the category name

Title: Re: Like Posts
Post by: CDLehner on September 17, 2016, 02:35:16 PM
Quote from: Shambles on September 17, 2016, 02:00:09 PM
From the opening post...



Quote from: Joker™ on June 29, 2013, 09:29:03 AM

...

Admin interface

...

Board Settings
- Select on which boards you want to enable the mod
- If you want to select all boards in a category, just click on the category name


Thanks  :-[
Title: Re: Like Posts
Post by: shawnb61 on October 05, 2016, 09:22:36 AM
Is there another like-post mod out there that is currently supported?

Or is this your best bet?
Title: Re: Like Posts
Post by: lahmfan on October 24, 2016, 10:00:13 AM
Hey
I love this mod! its working great on our forum .. I have one question for you, i am using the "auto scroll" mod on my forum http://custom.simplemachines.org/mods/index.php?mod=3897 and the "like button" doesnt show when the page scroll down, it will show, however, if i click on the page number. would you know what could be the problem?
also, on the "like stats" the "Most Liked Member" page doesnt load .. i get the loading icon but nothings loads. (it works fine on the Most Like Giving User)
i am using PHP Version 5.6.25 on freebsd (hosting the server on my own)

Title: Re: Like Posts
Post by: lahmfan on October 25, 2016, 10:37:47 PM
Quote from: BubbaCat on July 16, 2014, 05:48:46 PM
This looks like an awesome mod. Great work, Joker. I have a question on converting to your Like Posts. I am currently running smf v 2.0.8 with the GPBP (good post bad post) v2.0.4 mod and have had this mod for over a year. We love that your Like Posts can be used with tapatalk and it is slicker than GPBP.

My question is, can we install Like Posts and somehow retain all the up votes or members have already accumulated?  We only use the up vote feature of that helps, so we would only care about retaining that number, if we lose the link between the up vote and the thread, it doesn't matter to us.

Thanks very much in advance.
can you please share how you made it work tapatalk?
Title: Re: Like Posts
Post by: lahmfan on October 28, 2016, 09:07:02 AM
Quote from: lahmfan on October 25, 2016, 10:37:47 PM
Quote from: BubbaCat on July 16, 2014, 05:48:46 PM
This looks like an awesome mod. Great work, Joker. I have a question on converting to your Like Posts. I am currently running smf v 2.0.8 with the GPBP (good post bad post) v2.0.4 mod and have had this mod for over a year. We love that your Like Posts can be used with tapatalk and it is slicker than GPBP.

My question is, can we install Like Posts and somehow retain all the up votes or members have already accumulated?  We only use the up vote feature of that helps, so we would only care about retaining that number, if we lose the link between the up vote and the thread, it doesn't matter to us.

Thanks very much in advance.
can you please share how you made it work tapatalk?
I sent a support email to Tapatalk and they said this is not supported. i am not sure how you got that working .. .sigh
Title: Re: Like Posts
Post by: Rob Lightbody on October 28, 2016, 01:51:06 PM
Hi,

Can you please tell me how to upgrade from version 1.6.1. to the current version?

The members of my forum are big fans of this add-on, so I don't want to lose their likes during the upgrade.

I'm running 2.0.12.

Many Thanks!

- Rob
Title: Re: Like Posts
Post by: shawnb61 on October 30, 2016, 01:42:31 AM
I am using the "Responsive Curve" theme on our forum and recently installed this mod.

I found that the little menu icons on a small form factor (i.e., smartphone) did not paint properly after installation.  To fix, I had to comment out a line in LikePosts.css as follows:

Quote.like_post_stats {
   position: relative;
   overflow: visible;
/* commented out by sjrb to fix icon overlap issue
   width: 100%;   */
}

Hope this may help others.
Title: Re: Like Posts
Post by: Rob Lightbody on October 30, 2016, 07:31:07 AM
Quote from: The QE2 Story Forum on October 28, 2016, 01:51:06 PM
Hi,

Can you please tell me how to upgrade from version 1.6.1. to the current version?

The members of my forum are big fans of this add-on, so I don't want to lose their likes during the upgrade.

I'm running 2.0.12.

Many Thanks!

- Rob

To answer my own question, when you uninstall the old package, there's an option to leave the data tables in place, so that when you reinstall they're picked up again.

Job done!
Title: Re: Like Posts
Post by: aodio on November 02, 2016, 05:12:25 AM
Running 2.0.12 .. install confirmed ... ticked in permissions, tested with test account, but still doesn't show on the posts?

any ideas?
Title: Re: Like Posts
Post by: shawnb61 on November 02, 2016, 09:56:45 AM
There are a few permissions pages...

Go back to the admin screen and double check them all.
Title: Re: Like Posts
Post by: Kindred on November 02, 2016, 12:21:09 PM
does it work if you switch to the default theme?
Title: Re: Like Posts
Post by: aodio on November 05, 2016, 07:21:18 AM
Quote from: Kindred on November 02, 2016, 12:21:09 PM
does it work if you switch to the default theme?

yes mate it does...

Ive tried all other adjustment suggested on this thread and still doesn't work on the theme I'm using ?

Any ideas?
Title: Re: Like Posts
Post by: Kindred on November 05, 2016, 12:40:35 PM
that suggests that either...

1- you installed the mod, but didn't check the "apply to other themes" at the bottom of the file-check screen, just before the mod changes were applied
or
2- you installed the theme after the mod...

you now have two chocies.
a- uninstall the mod and then re-install it, making sure to check the "apply to other themes" section
or
b- manually apply the mod changes to the template files in your custom theme
Title: Re: Like Posts
Post by: aodio on November 05, 2016, 05:41:15 PM
Quote from: Kindred on November 05, 2016, 12:40:35 PM
that suggests that either...

1- you installed the mod, but didn't check the "apply to other themes" at the bottom of the file-check screen, just before the mod changes were applied
or
2- you installed the theme after the mod...

you now have two chocies.
a- uninstall the mod and then re-install it, making sure to check the "apply to other themes" section
or
b- manually apply the mod changes to the template files in your custom theme

Cheers for that. I'll try that ...
Title: Re: Like Posts
Post by: aodio on November 05, 2016, 05:50:09 PM
Cheers kindred ... Works fine now  ;)

Can you direct me to where to change the colour please ...
Title: Re: Like Posts
Post by: Kindred on November 05, 2016, 08:29:04 PM
what what color?
Title: Re: Like Posts
Post by: aodio on November 05, 2016, 08:35:31 PM
Quote from: Kindred on November 05, 2016, 08:29:04 PM
what what color?

All good..The colour of the like button, changed now

cheers
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 07:16:17 AM
Can't seem to find where to change the colour of the "total likes" font in member states side bar

Any ideas?

(http://i269.photobucket.com/albums/jj61/cucinadio/Like%20total_zpsytg7smvd.jpg) (http://s269.photobucket.com/user/cucinadio/media/Like%20total_zpsytg7smvd.jpg.html)

cheers
Title: Re: Like Posts
Post by: Kindred on November 06, 2016, 07:18:15 AM
use firefox + firebug to determine which css file and tag is controlling it and then edit that...
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 07:19:59 AM
Quote from: Kindred on November 06, 2016, 07:18:15 AM
use firefox + firebug to determine which css file and tag is controlling it and then edit that...

As in "Inspector" on the Mac?
Title: Re: Like Posts
Post by: Kindred on November 06, 2016, 07:30:30 AM
no clue... you'd have to pay me to use a mac...:P   O:)
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 07:37:40 AM
Quote from: Kindred on November 06, 2016, 07:30:30 AM
no clue... you'd have to pay me to use a mac...:P   O:)

LOL.. Yes, well that's a discussion for a different day!..

But yes, I've inspected it and it lead to

(http://i269.photobucket.com/albums/jj61/cucinadio/count_zpst4muoapy.jpg) (http://s269.photobucket.com/user/cucinadio/media/count_zpst4muoapy.jpg.html)

I've gone there, but thew is no adjustment that can be made
Title: Re: Like Posts
Post by: d3vcho on November 06, 2016, 07:40:57 AM
You should edit the class "postcount" in a CSS file. Should tell you which file it's using "Inspect": i.e

(https://i.gyazo.com/ecc68769f11c5a1d1c7163c2e1f1b417.png) (see in the right corner index.css)

Regards :)
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 07:43:26 AM
Quote from: d3vcho on November 06, 2016, 07:40:57 AM
You should edit the class "postcount" in a CSS file. Should tell you which file it's using "Inspect": i.e

(https://i.gyazo.com/ecc68769f11c5a1d1c7163c2e1f1b417.png) (see in the right corner index.css)

Regards :)

Right, so are we talking core theme or in my current theme you would find this ?
Title: Re: Like Posts
Post by: d3vcho on November 06, 2016, 07:44:28 AM
More likely in your current theme.

Regards :)
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 08:02:17 AM
Im not after "Post count".. I'm after "total likes" to change the font colour...

cheers
Title: Re: Like Posts
Post by: Kindred on November 06, 2016, 08:04:39 AM
Actually, the CSS would seem to be affected by being a link...

So, you need to add a new one...

.postcount a { color: #fff; }

It looks like the likes uses the same class as postcount...
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 08:08:07 AM
Quote from: Kindred on November 06, 2016, 08:04:39 AM
Actually, the CSS would seem to be affected by being a link...

So, you need to add a new one...

.postcount a { color: #fff; }

It looks like the likes uses the same class as postcount...


Lol.. great!... now, if i could only find where to put it it would be even better ...And it's not post count I'm after.. It's the like count that appeared when i loaded the mod?

cheers
Title: Re: Like Posts
Post by: Kindred on November 06, 2016, 08:09:47 AM
Anywhere in the index.css file...  I like to put the CSS handling the same display in the same area, so I would suggest adding it just after the existing .postcount definition, but at the end of the file works as well
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 08:15:14 AM
Quote from: Kindred on November 06, 2016, 08:09:47 AM
Anywhere in the index.css file...  I like to put the CSS handling the same display in the same area, so I would suggest adding it just after the existing .postcount definition, but at the end of the file works as well

Genius !!... Worked perfect!... Thanks guys  ;)

(http://i269.photobucket.com/albums/jj61/cucinadio/perfect.jpg_zpszdgtgvl9.jpeg) (http://s269.photobucket.com/user/cucinadio/media/perfect.jpg_zpszdgtgvl9.jpeg.html)
Title: Re: Like Posts
Post by: thegymforum on November 06, 2016, 11:20:41 PM
To Joker : I know you've not been around for a while, but someday you'll check in and let me say. THANK YOU SIR!

This mod rocks! THANKS!

To anyone else : Have you had the issue of, when people have liked a post, class is "like_posts_member_info_box" when clicked on a mobile device it just goes away (no JS error in Chrome inspector) (my forum users reported it and I was able to reproduce it on my iPhone)  Does this happen on anyone else's forum?

ty for your time
Title: Re: Like Posts
Post by: aodio on November 06, 2016, 11:41:32 PM
Quote from: thegymforum on November 06, 2016, 11:20:41 PM
To Joker : I know you've not been around for a while, but someday you'll check in and let me say. THANK YOU SIR!

This mod rocks! THANKS!

To anyone else : Have you had the issue of, when people have liked a post, class is "like_posts_member_info_box" when clicked on a mobile device it just goes away (no JS error in Chrome inspector) (my forum users reported it and I was able to reproduce it on my iPhone)  Does this happen on anyone else's forum?

ty for your time

No, works perfect for us 👍🏽 But in saying that .. I'm sure Kindred will help you out.. bit of a gun that one 👍🏽
Title: Re: Like Posts
Post by: MaryLouW on December 02, 2016, 02:58:55 PM
Is there a way to change the color of the LIKE button?  The orange sort of clashes with my Christmas theme as well as my regular one.
Title: Re: Like Posts
Post by: br360 on December 02, 2016, 10:12:05 PM
In your LikePosts.css, find this-

.like_link {
background: #C44E19;
padding: 1px 5px;
color: #fff !important;
position: relative;


Change the background color from #C44E19; to whatever color you want instead
Title: Re: Like Posts
Post by: MaryLouW on December 02, 2016, 11:36:39 PM
Thank you so much!!!  Worked like a charm... .the orange is now Christmas Red!!!   :)
Title: Re: Like Posts
Post by: blamemarktjan on December 06, 2016, 10:26:27 AM
Hey guys, sorry if this has been asked somewhere in this thread (I can't seem to find it), but is there a way to turn it off for overall threads? I'd much rather just apply it to posts within a thread. Thanks!
Title: Re: Like Posts
Post by: szinski on December 06, 2016, 12:36:01 PM
I'm having an issue where LikePosts hangs when clicking the "Most Liked Member" menu (it hangs at the spinning circle). This worked fine up until recently. Any ideas what may be causing this?

Title: Re: Like Posts
Post by: shawnb61 on December 13, 2016, 12:36:08 AM
Has there been any discussion about migrating Like Post mod history into the native 2.1 Like Post tables? 
Title: Re: Like Posts
Post by: memokal on January 08, 2017, 09:07:21 AM
Hello, I tried to make the like count work with "Font Awesome" icons but it didnt work and i get this error :
"Uncaught TypeError: Cannot read property 'split' of undefined
    at Object.t [as likeUnlikePosts] (LikePosts.min.js:1)
    at HTMLAnchorElement.onclick (VM72534 :497)"

actually i couldnt even make Like and Unlike buttons as image because its not working  and i get that error... please help :/
Title: Re: Like Posts
Post by: memokal on January 12, 2017, 04:25:09 PM
HELLO,  is there a way to get notifications into the messages area?
Title: Re: Like Posts
Post by: faliro on January 31, 2017, 03:04:18 PM
Can anyone help. After installing another mod - i lost use of the Likes Plus mod. It just disappeared from the forum.

So I went to uninstall the Like Plus mod and got this:

(https://i.snag.gy/wJF1sQ.jpg)

It basically says if I uninstall the mod - I could cause damage?

When I clicked on the failed file, I got this pop up:

(https://i.snag.gy/vuRVg0.jpg)

Can someone tell me what is the best way to proceed? Should I delete/uninstall all the mods i installed today - and then deleted it this Likes Plus? Does it make a difference? What should I do? I am a new user and unsure how to proceed.

Cheers in advance.  :P
Title: Re: Like Posts
Post by: Kindred on January 31, 2017, 05:09:51 PM
http://wiki.simplemachines.org/smf/Error_in_mod_installation
Title: Re: Like Posts
Post by: lesmond on January 31, 2017, 06:54:04 PM
Quote from: szinski on December 06, 2016, 12:36:01 PM
I'm having an issue where LikePosts hangs when clicking the "Most Liked Member" menu (it hangs at the spinning circle). This worked fine up until recently. Any ideas what may be causing this?

Did anyone find a fix for this "spinning circle" ?

Title: Re: Like Posts
Post by: Kindred on January 31, 2017, 07:11:01 PM
I would be that you have a javascript or other code conflict.

What mods did you install or what did you do just before it stopped working
Title: Re: Like Posts
Post by: freddy123 on February 06, 2017, 01:41:42 AM
I installed this on my local machine using Xampp and it worked fine on the site, as I was working on it offline, but now when I installed it on the real server the orange like button shows. but nothing happens when you click it.

Any ideas?

Awesome mod btw. If only it would work on the live site. arggh
Title: Re: Like Posts
Post by: lego-man on May 05, 2017, 04:03:21 AM
Hey,

can someone help me please.

I have uninstalled this mod which went fine but no I cannot scroll down on the page to the bottom and get this error on every post.

Fatal error: Class 'SayThanks' not found in G:\PleskVhosts\entertainment-bay.com\httpdocs\Sources\Load.php(2188) : eval()'d code on line 523
Title: Re: Like Posts
Post by: Kindred on May 05, 2017, 06:47:05 AM
looks like you had some errors curing the uninstallation process and continued despite the warnings...

now you will have the manually remove the code or hooks that got left over
Title: Re: Like Posts
Post by: a10 on May 20, 2017, 08:15:39 AM
Hello, 2.0.3 on my test-forum, 'like' button and 'show like notifications' not functional after https, 2.0.14, php 7.1.1 (and no idea if its due to smf, php or https or the combination :O)
Title: Re: Like Posts
Post by: Kindred on May 20, 2017, 08:23:33 AM
hmmm.....   well, you should be using 2.0.5 for the mod...
but it seems to work OK for me on 2.0.14 and https....   although I am not on php7 yet
Title: Re: Like Posts
Post by: a10 on May 22, 2017, 04:28:11 PM
Quote from: a10 on May 20, 2017, 08:15:39 AM
Hello, 2.0.3 on my test-forum, 'like' button and 'show like notifications' not functional after https, 2.0.14, php 7.1.1 (and no idea if its due to smf, php or https or the combination :O)

Quote from: Kindred on May 20, 2017, 08:23:33 AM
hmmm.....   well, you should be using 2.0.5 for the mod...
but it seems to work OK for me on 2.0.14 and https....   although I am not on php7 yet


Update, aplied 2.0.14 and tested 'like' with php 5.6, 7.0 and 7.1, works fine now. Will later do the https and see what happens.

btw, realized am still on like 1.3.1... Tried to uninstall before applying 2.0.5, but test failed in ./Themes/default/index.template.php so stopped. Will come back to that.
Title: Re: Like Posts
Post by: OUGS Web Master on May 23, 2017, 08:55:38 AM
I found that LikePosts 2.0.5 functionality no longer worked on upgrading the server to PHP 7.0 from 5.6. Seems to be an evaluation order change.

I have submitted a fix: https://github.com/siddhartha-gupta/SMF-Likes/pull/51
Title: Re: Like Posts
Post by: stoneageman on June 04, 2017, 05:59:33 PM
Tried the PHP 7 fixes detailed above and also now working fine. Good skills OUGS Web Master, thanks
Title: Re: Like Posts
Post by: a10 on June 08, 2017, 04:42:21 PM
^^^ Ditto

Uninstalled 1.3.1, installed 2.0.5, applied the github fix, all seems to work fine in php 7.
Thanks to OUGS Web Master.
Title: Re: Like Posts
Post by: SaidJan on June 29, 2017, 06:20:26 PM
First time I wanted to install Like mod, some of the stuff were not successful, the 2nd time it was all successful.
I have SMF 2.0.14
Now there is no like button in posts, and also here in profile I get this error.
How can I fix it?


(https://ctrlv.cz/shots/2017/06/30/hsVb.png)
Title: Re: Like Posts
Post by: Arantor on June 29, 2017, 06:44:38 PM
There should be more detail in the error log as to what's wrong.
Title: Re: Like Posts
Post by: SaidJan on June 29, 2017, 08:26:49 PM
Quote from: Arantor on June 29, 2017, 06:44:38 PM
There should be more detail in the error log as to what's wrong.

Here are the errors

(https://ctrlv.cz/shots/2017/06/30/INKs.png)
and also this
(https://ctrlv.cz/shots/2017/06/30/34hl.png)
Title: Re: Like Posts
Post by: Arantor on June 30, 2017, 02:13:33 AM
These aren't related to your profile issue.

I guess the problem starts with the fact the mod needs more than just a few tweaks to work on current PHP and SMF versions.
Title: Re: Like Posts
Post by: SaidJan on June 30, 2017, 03:40:26 AM
Quote from: Arantor on June 30, 2017, 02:13:33 AM
These aren't related to your profile issue.

I guess the problem starts with the fact the mod needs more than just a few tweaks to work on current PHP and SMF versions.

So what can I do ?  :(
Title: Re: Like Posts
Post by: Arantor on June 30, 2017, 04:07:19 AM
Find a different likes mod or hope the author fixes the issues despite the fact this mod hasn't been touched in literal years.
Title: Re: Like Posts
Post by: SaidJan on June 30, 2017, 04:08:39 AM
Quote from: Arantor on June 30, 2017, 04:07:19 AM
Find a different likes mod or hope the author fixes the issues despite the fact this mod hasn't been touched in literal years.

This is the only like mod for smf. except those facebook likes.
Title: Re: Like Posts
Post by: Arantor on June 30, 2017, 04:53:17 AM
Hmm, there used to be more.
Title: Re: Like Posts
Post by: SaidJan on June 30, 2017, 05:16:53 AM
Quote from: Arantor on June 30, 2017, 04:53:17 AM
Hmm, there used to be more.

I searched like in mod section. except those facebook ones, this was the only one. Could you please give me the link?
Thank you
Title: Re: Like Posts
Post by: Arantor on June 30, 2017, 05:16:54 AM
They've been removed for whatever reason.
Title: Re: Like Posts
Post by: SaidJan on June 30, 2017, 05:28:48 AM
Quote from: Arantor on June 30, 2017, 05:16:54 AM
They've been removed for whatever reason.

I downgraded from 2.1 to 2.0 only because of like mod and added 254 boards again. Now what can I do?
Title: Re: Like Posts
Post by: Arantor on June 30, 2017, 06:16:54 AM
I don't know why you downgraded since from a board management perspective, 2.1 does literally everything 2.0 does with more features.

I still maintain that you don't need all those boards, though, since you don't seem to have even enough posts for one per board...
Title: Re: Like Posts
Post by: shawnb61 on June 30, 2017, 09:57:35 AM
I suspect other issues at play here.

This mod works perfectly on current versions of SMF.  My forum runs it just fine.

What version of php are you running?   That "function name must be a string" is one of the symptoms of a non-supported version of php, IIRC.

The other issue - no likes buttons - is a frequent new user issue with this mod.   You must go thru the mod admin panel and configure it.  A few forms must be checked/updated.

Double-check the permissions settings and board settings.    There is a handy "check all" button at the bottom of board settings...
Title: Re: Like Posts
Post by: Arantor on June 30, 2017, 10:02:43 AM
I assumed the entire forum would have broken if it weren't a supported PHP version...
Title: Re: Like Posts
Post by: shawnb61 on June 30, 2017, 10:09:34 AM
I don't yet run php 7... Maybe an issue there? 

I'm more suspicious about the codebase given the mod required multiple installs...  That never sounds good.  Also curious how the downgrade from 2.1 to 2.0 was executed.   

Title: Re: Like Posts
Post by: shawnb61 on June 30, 2017, 11:16:54 AM
Also, 2.1 has a "likes" feature.   Not as flexible as this mod, but it works just fine.  You just need to enable it. 

Also, for the record, 2.1 is still in beta & should not be used on production forums.  A proper 2.0 => 2.1 upgrade should be executed upon 2.1 production release. 
Title: Re: Like Posts
Post by: shawnb61 on June 30, 2017, 06:47:16 PM
FYI, I just confirmed the error above running 2.0.14 & php 7.0.  ("Function Name must be a string")

Looks like this mod doesn't support php 7.x. 

Note it runs fine on php 5.6 & 2.0.14, so that may be the end of the line. 

Title: Re: Like Posts
Post by: GL700Wing on June 30, 2017, 09:11:59 PM
Quote from: shawnb61 on June 30, 2017, 06:47:16 PM
FYI, I just confirmed the error above running 2.0.14 & php 7.0.  ("Function Name must be a string")

Looks like this mod doesn't support php 7.x.
I have this mod running perfectly and error free on a forum using SMF 2.0.14/PHP 7.1.6 - all I had to do to get it working with PHP 7.x was apply the change referred to here (https://www.simplemachines.org/community/index.php?topic=506743.msg3927451#msg3927451) (direct link to GitHub (https://github.com/siddhartha-gupta/SMF-Likes/pull/51/commits/5ddc158ff148a3eb9c8b2145e3bbced9d602b14d))
Title: Re: Like Posts
Post by: shawnb61 on June 30, 2017, 09:26:47 PM
I missed that post - very helpful...  Thanks!
Title: Re: Like Posts
Post by: SaidJan on July 01, 2017, 12:37:57 AM
Thanks for the fix. I could fix the like stat pages. but still in the posts, there is no like button. And I'm not getting any error in log.

Edit: Nevermind, I turned it on in the setting.

Edit2: Do you think I could transfer its database to "SMF 2.1 built-in like feature" later when its final version releases?
Title: Re: Like Posts
Post by: shawnb61 on July 01, 2017, 01:26:32 AM
Quote from: SaidJan on July 01, 2017, 12:37:57 AM
Edit2: Do you think I could transfer its database to "SMF 2.1 built-in like feature" later when its final version releases?

Yes.  The functionality doesn't match perfectly, but the likes can carry over.    I do this in my 2.1 test environment with a simple sql command.   I'll pretty it up and share over the weekend. 
Title: Re: Like Posts
Post by: shawnb61 on July 01, 2017, 12:39:02 PM
This is the sql I execute after upgrading to SMF2.1 in my test environment.   I just use the "Import" button in phpMyAdmin to invoke it:

--
-- Simple utility to migrate Like Posts mod history
-- to the SMF 2.1 vanilla table.
--
-- Note that in Like Posts, 'topic' likes referenced the first post
-- in the topic.  I.e., all likes were msg likes.   
--
-- Uses IGNORE in case of dupes or reloads. 
-- Also found that Like Posts somehow let folks like something 2x...
--

INSERT IGNORE INTO smf_user_likes
    (id_member, content_type, content_id, like_time)
SELECT id_member_gave, 'msg', id_msg, liked_timestamp
    FROM smf_like_post;


Once I'm confident it's all OK, I drop the smf_like_post table used by this mod. 

If you didn't use smf_ as your prefix, you will need to adjust the above instructions accordingly. 

Remember: SMF2.1 is still in BETA, don't run it in PROD yet...  This is intended to help you TEST SMF 2.1.
Title: Re: Like Posts
Post by: mysimplesite on July 05, 2017, 03:52:25 PM
2.0.14, php7.1, ShelfLife theme

Code suggested by Install doesn't exist in ShelfLife theme. For example, Install error popup states:

In ./Themes/shelflife204/Display.template.php

Add before this code:

// Is karma display enabled?  Total or +/-?

Only that line doesn't exist in Display.template.php in ShelfLife theme.

Several other error messages have similar results; code doesn't exist in ShelfLife.

Anyone using ShelfLife who has managed to get Like Posts to work? Please tell me how.

Thanks.
Title: Re: Like Posts
Post by: efk on August 07, 2017, 12:12:09 PM
Any chance to get dislike button?
Title: Re: Like Posts
Post by: CDLehner on August 11, 2017, 02:43:28 PM
Likes gone  :(

SMF 2.0.14, package Like Posts 2.0.5

Thanks
Title: Re: Like Posts
Post by: CDLehner on August 15, 2017, 10:37:10 AM
Quote from: CDLehner on August 11, 2017, 02:43:28 PM
Likes gone  :(

SMF 2.0.14, package Like Posts 2.0.5

Thanks

BUMP  ???
Title: Re: Like Posts
Post by: efk on August 15, 2017, 01:57:07 PM
Quote from: CDLehner on August 15, 2017, 10:37:10 AM
Quote from: CDLehner on August 11, 2017, 02:43:28 PM
Likes gone  :(

SMF 2.0.14, package Like Posts 2.0.5

Thanks

BUMP  ???
SMF 2.0.14 is current SMF version.
Like Posts 2.0.5 is current /package/mod/plugin version - whatever makes easier for you to understand. So 2.0.5 has nothing in common here with SMF version.
Title: Re: Like Posts
Post by: shawnb61 on August 15, 2017, 03:20:59 PM
FYI, this mod does not appear to be actively supported by the author.

If you look at the last couple of pages of posts, you'll see that this mod does work fine on 2.0.14. 

HOWEVER...  Some fixes must be applied for it to work properly under PHP 7+. 

Title: Re: Like Posts
Post by: CDLehner on August 16, 2017, 03:47:49 PM
QuoteSMF 2.0.14 is current SMF version.
Like Posts 2.0.5 is current /package/mod/plugin version - whatever makes easier for you to understand. So 2.0.5 has nothing in common here with SMF version.

Quote from: shawnb61 on August 15, 2017, 03:20:59 PM
FYI, this mod does not appear to be actively supported by the author.

If you look at the last couple of pages of posts, you'll see that this mod does work fine on 2.0.14. 

HOWEVER...  Some fixes must be applied for it to work properly under PHP 7+.

Sorry; obviously, I am not a very sophisticated user.  :-[

I was just listing, "pertinent" info; because usually the first thing someone helping will ask is..."what version are you on", lol.

So...I don't know, why it stopped working; and I don't know if I'm on "PHP 7+" or not...and/or, what the fixes are??  ???

Sorry  :'(

Thanks for any mercy.
Title: Re: Like Posts
Post by: shawnb61 on August 16, 2017, 03:57:43 PM
The first thing I would check is the error log.  That may provide additional details.

The second thing I would check is the php version.  If you don't know where to look, you should open a ticket with your ISP.  For 2.0.14, you want php 5.4+.   Like Posts does not work with php 7.x without modification.  I'd suggest php 5.6. 

If the two items above don't help, come back here & share what you've learned.  It would also help to share the list of mods you have installed, as sometimes there are conflicts between mods.
Title: Re: Like Posts
Post by: Shambles on August 16, 2017, 04:02:59 PM
Quote from: shawnb61
The second thing I would check is the php version.  If you don't know where to look, you should open a ticket with your ISP.

Admin > Main > Support and Credits

Title: Re: Like Posts
Post by: CDLehner on August 16, 2017, 05:28:11 PM
Guys...great help; thanks.

As you can see; my mods, are as limited...as my board-op skills  ;)

(https://farm5.staticflickr.com/4370/36218457060_60f7354467.jpg) (https://flic.kr/p/Xbv4sd)

Please note; I did un-install S.A.V.E., and when I installed it...that might have been when the Like Posts quit on me. I wasn't paying close enough attention, to say definitively.

PHP is 5.4.45

Thanks again!
Title: Re: Like Posts
Post by: shawnb61 on August 16, 2017, 08:20:34 PM
With Like Posts, you need to look at all of the permissions very carefully... 

Double check all of the permission settings and especially all the board settings.

Title: Re: Like Posts
Post by: CDLehner on August 17, 2017, 12:05:31 AM
Actually...I think maybe the Spoiler mod is giving me issues?

Possible??
Title: Re: Like Posts
Post by: Gluz on August 17, 2017, 12:16:26 AM
After checking permissions and that you are running the correct version of PHP, then the next thing is checking for any Javascript errors, or any CSS overrides, as some Themes have conflict with it.
Title: Re: Like Posts
Post by: CDLehner on August 18, 2017, 09:49:12 AM
Permissions look OK; best I can tell. And let me make something clear; my likes were working, for a l o n g time...and then just stopped, for some reason.

Can I send an error log of some sort?  ???
Title: Re: Like Posts
Post by: Gluz on August 18, 2017, 03:37:33 PM
Is your forum open to guests to view boards where the Likes should appear?
Can you give us a link to any thread that should have Likes button?
Title: Re: Like Posts
Post by: CDLehner on August 19, 2017, 10:36:31 AM
Quote from: Gluz on August 18, 2017, 03:37:33 PM
Is your forum open to guests to view boards where the Likes should appear?
Can you give us a link to any thread that should have Likes button?

Let me check, on Guests having Like permission http://www.esac.club/index.php?topic=116.0

edit- see...I'm not sure, how/where to check; for permission to use Likes?
Title: Re: Like Posts
Post by: d3vcho on August 19, 2017, 11:04:15 AM
Check: Admin > Configuration > Like Posts > Permissions Settings
Title: Re: Like Posts
Post by: CDLehner on August 19, 2017, 12:13:15 PM
Quote from: d3vcho(); on August 19, 2017, 11:04:15 AM
Check: Admin > Configuration > Like Posts > Permissions Settings

TY!

(https://farm5.staticflickr.com/4408/36624901196_1c24e2391b_b.jpg) (https://flic.kr/p/XNqc8J)

Just turned on, for Guest...and INIQUITY; but all others, were previously checked.
Title: Re: Like Posts
Post by: Gluz on August 19, 2017, 11:17:19 PM
Doesn't look like is installed in the theme properly if the permissions are OK, you need to check that, if it's correctly installed in the theme and no other MOD messed up something.
Title: Re: Like Posts
Post by: CDLehner on August 20, 2017, 05:33:45 PM
I'm hoping, this will help you guys.

When I try to uninstall, the Like Posts mod; I get this...

(https://farm5.staticflickr.com/4381/35864085414_3635f7f8bc_b.jpg) (https://flic.kr/p/WDbP7f)
Title: Re: Like Posts
Post by: Gluz on August 20, 2017, 08:57:07 PM
Looks like the files have not been modified at the MOD installation, or you restore the files from a backup that doesn't have the MOD installed.

Check the files to see if it have something about the MOD, not the whole piece of code the package manager search but a bit of it, if it doesn't have any of the code you can uninstall the MOD ignoring that errors, because the files doesn't have been modified, and then should not cause any trouble.

Then reinstall the mod and after, check the files to see if this time they are modified with the bits from the MOD.
Title: Re: Like Posts
Post by: CDLehner on August 20, 2017, 09:19:11 PM
Quote from: Gluz on August 20, 2017, 08:57:07 PM
Looks like the files have not been modified at the MOD installation, or you restore the files from a backup that doesn't have the MOD installed.

Check the files to see if it have something about the MOD, not the whole piece of code the package manager search but a bit of it, if it doesn't have any of the code you can uninstall the MOD ignoring that errors, because the files doesn't have been modified, and then should not cause any trouble.

Then reinstall the mod and after, check the files to see if this time they are modified with the bits from the MOD.

Sorry  ???  ???  ???
Title: Re: Like Posts
Post by: CDLehner on August 22, 2017, 02:08:54 PM
Quote from: CDLehner on August 20, 2017, 09:19:11 PM
Quote from: Gluz on August 20, 2017, 08:57:07 PM
Looks like the files have not been modified at the MOD installation, or you restore the files from a backup that doesn't have the MOD installed.

Check the files to see if it have something about the MOD, not the whole piece of code the package manager search but a bit of it, if it doesn't have any of the code you can uninstall the MOD ignoring that errors, because the files doesn't have been modified, and then should not cause any trouble.

Then reinstall the mod and after, check the files to see if this time they are modified with the bits from the MOD.

Sorry  ???  ???  ???

I'm sorry; I really don't follow  :-[

https://youtu.be/AR6eXWNJzoY
Title: Re: Like Posts
Post by: shawnb61 on August 22, 2017, 03:05:18 PM
Quote from: CDLehner on August 22, 2017, 02:08:54 PM
I'm sorry; I really don't follow  :-[

At some point in time, your code was altered.  The fact that Like Posts will not de-install clean shows you that. 

In an ideal world, before doing any maintenance in your production environment, you do backups.   The BEST solution would be to restore these files back to the way they were before this change.  Note that a backup is useless unless you know how to restore it.  A useful exercise for someone new to this would be to do some backups on cPanel and practice doing restores on your local PC.  Just to learn how.   In a safe place. 

If you do not have backups, Gluz is providing some advice how to recover.   To understand Gluz' input, it first helps to understand how packages work.  In most instances, the package installation process for mods does not copy whole source code files.  It can't, because the source code files may have been modified by other mods.  How can 5 mods update the same file?   Well, the way they do so is to apply targeted changes, primarily using a find/replace method. 

Click on the little page & pencil icon to the left of the 'Replace' on your screenshot.  That will show you the attempted change - usually a find/replace.  The find/replace won't work, because it can't find what it needs to find first...  That's what those errors are telling you. 

So...  How to fix...   

Backup your file system.  It will be handy to have this, in case you make things worse.  (We've all been there...)

For each of the failed substitutions in the list you showed us, look in your source code and see if you can figure out why the find/replace doesn't work.  It sometimes helps to compare the source to the 'vanilla' SMF code, to easily identify changes. 

If the source code in question was restored to a point prior to your Like Posts installation somehow (i.e., if the find/replace isn't needed...), you can safely ignore the error messages and proceed with the de-install & subsequent re-install.  This is what Gluz was saying.  Maybe we're lucky. 

If the source code is otherwise mangled somehow, you have deeper issues.  If that is the case, we need to look at refreshing your code. 

Hope th