News:

SMF 2.1.2 has been released! Take it for a spin! Read more.

Main Menu

Like Posts

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

Previous topic - Next topic

Joker™

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 :)
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

Joker™

Quote from: 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. make sure LikePosts.css is in 'Themes/default/css'.

Also check the edits required for Load.php are there from here
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

ryan_dwight

//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

Joker™

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
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

Joker™

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
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

ryan_dwight

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

Grej

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)"


Kimmie

#427
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:





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.

margarett

Just add this:
<span><a href="#" class="showLikeNotification" onclick="lpObj.showLikeNotification()">', $txt['like_show_notifications'], '</a></span>
After the "unread replies" span entry ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

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

Kimmie

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 :)

Joker™

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
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

Joker™

Quote from: 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
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

a10

#432
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
2.0.19, php 7.4.29, MariaDB 10.3.34. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Joker™

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


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?
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

a10

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.
2.0.19, php 7.4.29, MariaDB 10.3.34. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Kimmie

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 :)

Joker™

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. Well, let me see the code flow/issues that can arise and will get back with some questions for brainstorming/teasing session ;D
Github Profile
Android apps
Medium

How to enable Post Moderation

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

All support seeking PM's get microwaved

Elizabeth II

How do I remove the Like Stats tab from the menu? I can't seem to find it anywhere?

Kimmie

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. 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. :)

Kimmie

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

Advertisement: