Advertisement:

Author Topic: Like Posts  (Read 342657 times)

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,501
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Like Posts
« Reply #1020 on: June 25, 2019, 06:16:22 AM »
Awesome! Thanks skb!
Online Manual

Please do not PM me for support.

Offline KTN

  • Semi-Newbie
  • *
  • Posts: 43
Re: Like Posts
« Reply #1021 on: August 29, 2019, 01:12:27 PM »
I upgraded my site SMF 2.0.15 to SMF 2.1 RC2.
I used to have Thanks mod and it doesn't work on SMF 2.1 RC2 anymore because it has own like system. But I don't want to lose my member's thanks data, so I download the thanks data table and like data table from the database.
xx_messages_thanks  table has id_messages  and id_members
xx_user_likes  table has id_members, content_type, content_id and like_time

I used excel copied all my thanks data to user_like table  (content_id=id_message) and imported back to my database.
It worked even Stat showed like counts for the members.

But my problem is, on my forum (under the post) like numbers didn't show until you click the like button on the post. For that matter, I have to click all of our members' old posts to see the numbers of like.

Any solution to short cut for that?

Offline shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,268
    • sbulen on GitHub
Re: Like Posts
« Reply #1022 on: August 29, 2019, 01:17:31 PM »
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline KTN

  • Semi-Newbie
  • *
  • Posts: 43
Re: Like Posts
« Reply #1023 on: August 30, 2019, 11:43:02 PM »
I think the 2nd query from this post will help.
https://www.simplemachines.org/community/index.php?topic=506743.msg4010825#msg4010825

Thank you so much Shawnb61, finally, I got it. I am not a PHP SQL IT guy but I figured it out from your query and a lot of google search. Thanks again.

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 995
Re: Like Posts
« Reply #1024 on: October 22, 2019, 04:51:25 PM »
Hello, assuming and hoping 2.0.15 will get it's needed\awaited php fix ...soon, how will 'like' behave with php 7.2 \ 7.3 ?

Thanks.
2.0.17, ssl, php 7.3.19, 10.3.21-MariaDB
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,949
Re: Like Posts
« Reply #1025 on: October 22, 2019, 04:54:47 PM »
Hello, assuming and hoping 2.0.15 will get it's needed\awaited php fix ...soon, how will 'like' behave with php 7.2 \ 7.3 ?

Thanks.

No guarantees it will. What is the actual problem with 7.2 anyway? Some things can't be fixed in the core but have to be fixed in the mod's code.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,835
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1026 on: October 23, 2019, 01:05:12 PM »
Hello, assuming and hoping 2.0.15 will get it's needed\awaited php fix ...soon, how will 'like' behave with php 7.2 \ 7.3 ?

Thanks.
Should be ok. I don't see anything that would break just taking a glance.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 995
Re: Like Posts
« Reply #1027 on: October 24, 2019, 06:38:14 AM »
Hello, assuming and hoping 2.0.15 will get it's needed\awaited php fix ...soon, how will 'like' behave with php 7.2 \ 7.3 ?

Thanks.
Should be ok. I don't see anything that would break just taking a glance.

Thanks for answer. WIll do some testing later on with different php's (on a copy of my live forum), and report findings.
2.0.17, ssl, php 7.3.19, 10.3.21-MariaDB
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Offline a10

  • Charter Member
  • Sr. Member
  • *
  • Posts: 995
Re: Like Posts
« Reply #1028 on: October 30, 2019, 04:27:19 PM »
Tested quite a lot with Like 2.1.2 on php 7.3.11, all seems to be well so far :O)
Very good.
2.0.17, ssl, php 7.3.19, 10.3.21-MariaDB
Mods: Contact Page, Like Posts, Responsive Curve, Search Focus Dropdown, Add Join Date to Post.

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,835
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1029 on: October 30, 2019, 04:43:58 PM »
Good to know!
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline radenra

  • Newbie
  • *
  • Posts: 2
Re: Like Posts
« Reply #1030 on: November 11, 2019, 04:04:39 AM »
SS please  :-[

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,501
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Like Posts
« Reply #1031 on: December 15, 2019, 07:32:45 AM »
In the admin settings there is this option:

Quote
Enable notification for like posts
Global permission to enable/disable mod notification

I'm not quite sure what it actually does.

I can't find an option anywhere in my profile to turn on or off notifications when my posts are liked.

Or is it not a specific option for each individual to get a notification or not?
Online Manual

Please do not PM me for support.

Offline stoneageman

  • Semi-Newbie
  • *
  • Posts: 24
Re: Like Posts
« Reply #1032 on: December 28, 2019, 05:57:45 AM »
Updated SMF to 2.0.16. Set PHP to 7.2.26 or 7.3.13 and in the admin log, Like Posts has many "The each() function is deprecated" In Likeposts.php
Line ==>299:         while ((list($key, $val) = each($menu_buttons)) && $key != 'logout')

Offline GL700Wing

  • Full Member
  • ***
  • Posts: 524
  • Gender: Female
Re: Like Posts
« Reply #1033 on: December 28, 2019, 11:11:42 PM »
Quote
Updated SMF to 2.0.16. Set PHP to 7.2.26 or 7.3.13 and in the admin log, Like Posts has many "The each() function is deprecated" In Likeposts.php
Line ==>299:         while ((list($key, $val) = each($menu_buttons)) && $key != 'logout')
I encountered the same issue and the following change I made resolved the issue on my forum:

In ./Sources/LikePosts/LikePosts.php
Find:
Code: [Select]
while ((list($key, $val) = each($menu_buttons)) && $key != 'logout')
Replace with:
Code: [Select]
while (($key = key($menu_buttons) && $val = current($menu_buttons)) && $key != 'logout')
« Last Edit: December 28, 2019, 11:23:44 PM by GL700Wing »
Life doesn't have to be perfect to be wonderful ...

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,835
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1034 on: December 28, 2019, 11:17:16 PM »
Awesome thanks will get that patched now!
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,835
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1035 on: December 28, 2019, 11:22:31 PM »
Update

Version 2.1.2
!Fixed bug with most like giving users page in profile throwing a database error in some cases.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline Rob Lightbody

  • Charter Member
  • Jr. Member
  • *
  • Posts: 172
  • Gender: Male
  • Rob Lightbody, QE2 Story Forum administrator
    • The QE2 Story
Re: Like Posts
« Reply #1036 on: January 02, 2020, 08:14:04 AM »
Hi,

Just installed 2.2. onto SMF 2.0.16

Installed OK - but now I have the "Like Posts" button on my menu bar as the first thing - before Home - affects all users - and is very confusing!  (I instinctively click the first button on the menu bar when i want to go home!).

Thanks,

- Rob

Offline fungolfer

  • Semi-Newbie
  • *
  • Posts: 58
Re: Like Posts
« Reply #1037 on: January 02, 2020, 09:54:43 AM »
I have 2.1.2 installed in my forum (2.0.17) Do I need to uninstall the old version before installing the new version? Package Manager says 2.2 is an older version... Downloaded package from Mod site...

Online vbgamer45

  • Customizer
  • SMF Super Hero
  • *
  • Posts: 22,835
    • smfhacks on Facebook
    • VBGAMER45 on GitHub
    • @createaforum on Twitter
    • SMF For Free
Re: Like Posts
« Reply #1038 on: January 02, 2020, 09:09:36 PM »
I would suggest uninstalling old version first.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Offline fungolfer

  • Semi-Newbie
  • *
  • Posts: 58
Re: Like Posts
« Reply #1039 on: January 03, 2020, 04:24:09 AM »
Japp, that worked fine. Thanks :)