Advertisement:

Author Topic: Like Posts  (Read 327358 times)

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • 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: 33
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: 1,417
    • 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: 33
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.