Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: How to turn the "Post Thank You" hack into a "Likes" system similar to vBulletin.org

    1. How to turn the "Post Thank You" hack into a "Likes" system similar to vBulletin.org

      How to turn the "Post Thank You" hack into a "Likes" system similar to vBulletin.org

      By: (Administrator) Tempus is online now 20th Jun 2014 19:24
      Rating: 
      Note: These instructions are for VB 3.8. See post #35 by michal72 for a VB4 adaptation.

      First off, the "Likes" system on vBulletin.org is custom and does not use any other hacks- however it is too custom to be released. Instead you can modify an existing mod to do mostly the same thing.

      Several people have asked me for info on how to do this so I figured I'd write it up and post it here.

      You can see what it looks like on my live forum: http://www.juot.net/forums/showthread.php?t=60059



      You need the latest version Abe1's Post Thank You Hack (7.7): Here.

      What you can see above was done with this mod plus some phrase changes and template edits, and an optional plugin edit.

      So step 1 is make sure you have the “Thank You” mod installed and working.

      Step 2 is to change the following phrases. In Admin CP use Phrase Manager to "translate" these phrases from "Thank You" to "Like(s)":

      You can of course use your own translations but this is what I used-

      Phrase Name | Translation:
      post_thanks_already | You have already liked this post!
      post_thanks_remove_user | Remove Your Like
      post_thanks_search | Find All Liked Posts
      post_thanks_search_user | Find all liked posts by {1}
      post_thanks_search_user_gave | Find all posts liked by {1}
      post_thanks_thanked_post | Liked Post
      post_thanks_thanks | Likes
      post_thanks_time_post | Liked 1 Time in 1 Post
      post_thanks_times_post | Liked {1} Times in 1 Post
      post_thanks_times_posts | Liked {1} Times in {2} Posts
      post_thanks_total_thanks | Total Likes
      post_thanks_user_says | The Following User Likes This Post:
      post_thanks_users_say | The Following {1} Users Like This Post:

      Some of the above we won't actually use in my implementation but best to fix them all to be consistent.

      Step 3:

      At this point we need to have a "like.png" file in your images/buttons/ directory and the button directory for every custom style you have, if any. I will attach a couple of options but consider finding or making one unique to your forum.

      Step 4:

      Now we have to edit a couple of templates.

      Edit the template: post_thanks_button

      Replace it all with this:

      Code:
      Only registered members can view code.
      Note: The above template will work correct if you use the "Post Groan Hack" which I also use. You can convert the "Post Groan Hack" into an "dis-like" system basiclly the same way we are changing "Thank You" to "Likes."


      Edit the template: post_thanks_postbit_legacy OR post_thanks_postbit (whichever postbit you use)

      Replace it all with this:

      Code:
      Only registered members can view code.

      At this point you should have a nice light-green "Like" box appearing below each post someone "Likes." You might want to stop here.

      The last steps are only if you want to integrate the Like box INTO the posts like on my forum.

      If you do the next step is pretty easy-

      In Admin CP -> Plugin Manager, edit the plugin: Post Thank You Hack on hook: postbit_display_start

      Find the line:

      Code:
      Only registered members can view code.
      and change it to:

      Code:
      Only registered members can view code.
      OK This will move the "Like" box into the actual post table instead of below it.

      Again this is a good place to stop if you are happy.

      However there is one more template edit I did to keep the Like Box inside the post but at the very bottom of it regardless how short the post might be. In this case we must edit the postbit_legacy template. (I don't use the regular postbit template so I don't have any further instructions for people who use regular postbit. The following is ONLY for postbit_legacy.)

      IMPORTANT- Copy all of your postbit_legacy template to a text file and save it as a backup in case you make an error or the instructions don't work for you. You can also "Revert" the template but that will undo ALL customizations you may have made.

      Find in postbit_legacy:

      Code:
      Only registered members can view code.
      Change it to:

      Code:
      Only registered members can view code.
      Find:

      Code:
      Only registered members can view code.
      And delete it.

      Find:

      Code:
      Only registered members can view code.

      Add BELOW it:

      Code:
      Only registered members can view code.
      ----

      And that should do it.

      Of course you are encouraged to make some customizations... Most of what you'll want to change is in the top part of the post_thanks_postbit_legacy template. The background color, border style, and the like are all controlled by this code:

      Code:
      Only registered members can view code.
      On my forum I actually use a background image texture but did not include it here as it is an unnecessary complication.

      Feel free to play around and tweak the box to your liking. :up:
      Attached Images
      Attached Files
  1. #12
    Junior Member
    Click to Expand
    Join Date
    Jan 2016
    Posts
    4
    vB Version
    4.2.x
    Likes
    4
    Liked 0 Times in 0 Posts
    Gender
    Male
    How can I export or backup the number of thanks for all users?
    I use vb4 and I want to transfer all thanks statistics to dbtech thanks plugin.

  2. #13
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,183
    vB Version
    4.2.x
    Likes
    1,790
    Liked 1,730 Times in 988 Posts
    Gender
    Male
    I don't think you can via the plugin. You could backup your database and if something happens you can import it again.
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  3. #14
    Junior Member
    Click to Expand
    Join Date
    Jan 2016
    Posts
    4
    vB Version
    4.2.x
    Likes
    4
    Liked 0 Times in 0 Posts
    Gender
    Male
    Only registered members can view quoted posts.
    Do you know the name of file that contains the thanks statistics ? and its locatiion.
    Thanks

  4. #15
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,183
    vB Version
    4.2.x
    Likes
    1,790
    Liked 1,730 Times in 988 Posts
    Gender
    Male
    Its your database table called thanks or post_thanks that stores the data.
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


  5. #16
    Junior Member
    Click to Expand
    Join Date
    Jan 2016
    Posts
    4
    vB Version
    4.2.x
    Likes
    4
    Liked 0 Times in 0 Posts
    Gender
    Male
    Only registered members can view quoted posts.
    Thanks
    Where can I find it?

  6. #17
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,183
    vB Version
    4.2.x
    Likes
    1,790
    Liked 1,730 Times in 988 Posts
    Gender
    Male
    Please open a help thread. This is not the place for this discussion.
    The Small Print
    Our staff assume members have read the rules and will not accept ignorance as an excuse for not following the them.
    The breaking of any rule WILL lead to you being warned or even banned without notice so don't risk it!


Similar Threads

  1. [hide] hack incl post thank you "addon"
    By ven in forum vBulletin 3.x Add-ons
    Replies: 3
    Last Post: 6th Dec 2016, 11:45
  2. SOLVED
    Embedded Link To Show Posts That Were Thanked In For "Thanks Hack"
    By ThePie in forum Solved Requests
    Replies: 5
    Last Post: 6th Feb 2016, 10:07
  3. Replies: 0
    Last Post: 12th Jun 2015, 21:31
  4. Hack incl Post Thank You "Addon" v0.9.8
    By Tempus in forum vBulletin 4.x Add-ons
    Replies: 4
    Last Post: 13th Sep 2012, 22:53
  5. How to remove "Active Members" from "What's Going On?" box
    By Tempus in forum vBulletin Article Depository
    Replies: 0
    Last Post: 27th Oct 2011, 22:01

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •