Page 1 of 2 12 LastLast
Results 1 to 10 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. #2
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,172
    vB Version
    4.2.x
    Likes
    1,786
    Liked 1,679 Times in 968 Posts
    Gender
    Male
    I have modified a little bit Joe's proposal to work with vb4

    Change post_thanks_box template to:

    PHP Code:
    Only registered members can view PHP Code
    In posbit_legacy template find:
    PHP Code:
    Only registered members can view PHP Code
    and add before:

    PHP Code:
    Only registered members can view PHP Code
    In Admin CP -> Plugin Manager, edit the plugin: Post Thank You Hack on hook: postbit_display_complete

    Find:
    PHP Code:
    Only registered members can view PHP Code
    and replace with:
    PHP Code:
    Only registered members can view PHP Code


    You can also modify window's content:

    In post_thanks_postbit template replace:

    PHP Code:
    Only registered members can view PHP Code
    with:
    PHP Code:
    Only registered members can view PHP Code
    BR
    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!


  2. #3
    Influential Member
    Click to Expand
    Join Date
    Feb 2012
    Posts
    671
    vB Version
    4.2.x
    Likes
    306
    Liked 645 Times in 353 Posts
    Gender
    Male
    nice tut bud, i have been playing with it on my test forum but can i heck as get it to hook to the very bottom of any post. i know i'm missing something simple somewhere (vB 4.2.2)

  3. #4
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,172
    vB Version
    4.2.x
    Likes
    1,786
    Liked 1,679 Times in 968 Posts
    Gender
    Male
    Only registered members can view quoted posts.
    Find & Delete:
    Code:
    Only registered members can view code.
    Find:
    Code:
    Only registered members can view code.
    Replace with:
    Code:
    Only registered members can view code.
    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!


  4. #5
    Influential Member
    Click to Expand
    Join Date
    Feb 2012
    Posts
    671
    vB Version
    4.2.x
    Likes
    306
    Liked 645 Times in 353 Posts
    Gender
    Male
    ive been testing this on a default style so as to avoid confusion but:

    there is no

    PHP Code:
    Only registered members can view PHP Code
    but there is a
    PHP Code:
    Only registered members can view PHP Code
    and if i change that to
    PHP Code:
    Only registered members can view PHP Code
    it stops showing the likes it was showing prior to trying to stick it to the bottom

    basically its just the same as removing the original
    PHP Code:
    Only registered members can view PHP Code
    and doing nothing else.

    tbh its no real emergency , just more of a test / devils advocate so we have answers to issues that may arise, the main one being that there is no
    PHP Code:
    Only registered members can view PHP Code
    in my or a completely unedited default vb postbit_legacy :)

  5. #6
    Influential Member
    Click to Expand
    Join Date
    Feb 2012
    Posts
    671
    vB Version
    4.2.x
    Likes
    306
    Liked 645 Times in 353 Posts
    Gender
    Male
    solved :)

    the to replace should be:

    PHP Code:
    Only registered members can view PHP Code
    and it needs to be replaced with

    PHP Code:
    Only registered members can view PHP Code
    thanks great article :)

  6. #7
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,172
    vB Version
    4.2.x
    Likes
    1,786
    Liked 1,679 Times in 968 Posts
    Gender
    Male
    Ah my bad ven! Thats what it should be. I copied the wrong div when I posted the last message lol.
    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!


  7. #8
    Banned
    Click to Expand
    Join Date
    Jan 2013
    Posts
    802
    vB Version
    4.2.x
    Likes
    179
    Liked 791 Times in 539 Posts
    Gender
    Male
    It's much easier to use abes post thank you hack and just change the phrases...

  8. #9
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,172
    vB Version
    4.2.x
    Likes
    1,786
    Liked 1,679 Times in 968 Posts
    Gender
    Male
    Only registered members can view quoted posts.
    Myself and ven were talking about putting the thanks/like box inside posts. Nothing else Zombie.
    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!


  9. #10
    Administrator Tempus's Avatar
    Click to Expand
    Join Date
    Oct 2011
    Posts
    5,172
    vB Version
    4.2.x
    Likes
    1,786
    Liked 1,679 Times in 968 Posts
    Gender
    Male
    Only registered members can view quoted posts.
    Myself and ven were talking about putting the thanks/like box inside posts. Nothing else Zombie.
    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
  •