Like Posts

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

Previous topic - Next topic

Joker™

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

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



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

raposo_744

thankyou,now work good :)

makv


Joker™

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

How to enable Post Moderation

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

All support seeking PM's get microwaved

makv

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?

Joker™

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

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?

Joker™

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

Beelzeboss

#228
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.

Joker™

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

Jeffrey King


tjbalon

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.



Is there a way I could go about making the box open up directly below or the other way?

Joker™

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.



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

tjbalon

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.



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.

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

Thanks in advance :P

Joker™

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

#235
Just installed this, core theme, works great.
Thanks

Edit: Now on curve theme, 2.0.7, all well.
2.0.19, php 7.4.26, MariaDB 10.3.32. Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

BGH

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.

Joker™

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

BGH

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™!



Beelzeboss

Quote from: Joker™ on February 01, 2014, 07:11:15 AM
Nice catch, tracked [nofollow]

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

Advertisement: