Back to vBulletin 3 Articles

Turn "Post Groan Hack" Into Dislikes, Similar to BOP5 Likes System!
by GavoTrav 17 Oct 2011

Before Anything else is done! This is the thread that made me want to do this!
How to turn the "Post Thank You" hack into a "Likes" system similar to vBulletin.org

Thanks BOP5!

[post layed out the same as BOP5 to make it easier!]

Before starting off, You must make your own dislike.png picture, We have a custom theme so the button I have will not suit you!

View our forum!

http://pvhax.com/forums/showthread.php?p=454961#post454961
________________________________________________________

You need the latest version Abe1's Post Groan Hack (4.1) Here

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

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

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

Phrase Name | Translation:
post_groan_already | You have already disliked this post!
post_groan_groan | Dislike
post_groan_groaned_post | Disliked post
post_groan_hack | Dislikes
post_groan_remove_all | Remove all
post_groan_remove_user | Remove your dislike
post_groan_search | Find all disliked posts
post_groan_search_user | Find all disliked post by {1}
post_groan_search_user_gave | Find all posts disliked by {1}
post_groan_time_post | Disliked at 1 Time in 1 Post
post_groan_times_post | Disliked {1} Times in 1 Post
post_groan_times_posts | Disliked {1} Times in {2} Posts
post_groan_total_groans | Total Dislikes
post_groan_user_says | The Following User Dislikes the post by {1}
post_groan_user_say | The Following {1} Users Dislike the post by: {2}

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

Step 4:

Now we have to edit a couple of templates.

Edit the template: post_groan_button

Replace it all with this:

Code:
<a href="post_groan.php?$session[sessionurl]do=post_groan_add&amp;p=$post[postid]&amp;securitytoken=$bbuserinfo[securitytoken]" id="post_groan_button_$post[postid]"<if condition="$vboptions[disable_ajax] != 2"> onclick="return post_groan_give($post[postid], <if condition="$vboptions[post_groan_integrate]">true<else />false</if>);"</if> <if condition="$display_groan_image == 'none'">style="display:none"</if> rel="nofollow"><img src="$stylevar[imgdir_button]/dislike.png" alt="Dislike this post" border="0" /></a>
Edit the template: post_groan_postbit_legacy OR post_groan_postbit (whichever postbit you use)

Replace it all with this:
Code:
<br />
<div style="background-color: #e0dfdf; border: 2px ridge #000000; border-width: 2px 2px 2px 2px; padding: 2px; width:99%; margin: 0px auto 0px auto; -webkit-border-radius: 10px; -moz-border-radius: 10px; border-radius: 10px; margin-top:auto; margin-bottom:0px;">
<table border="0" width="100%">
<tr>
<td width="100">
<strong>Dislikes: ($post[post_groan_amount_formatted])</strong><br />
</td><td>
<div style="float:left;">$post[post_groan_bit]</div> <div style="float:right;"><if condition="$bbuserinfo['usergroupid'] == 6"><a href="post_groan.php?do=post_groan_remove_all&amp;p=$post[postid]"<if condition="$vboptions[disable_ajax] != 2"> onclick="return post_groan_remove_all($post[postid], <if condition="$vboptions['post_groan_integrate']">true<else />false</if>);"</if> rel="nofollow">Delete All</a></if><if condition="$bbuserinfo['usergroupid'] == 6 AND $post['show_groan_remove_option']"> | </if><if condition="$post['show_groan_remove_option']"><a href="post_groan.php?do=post_groan_remove_user&amp;p=$post[postid]"<if condition="$vboptions['disable_ajax'] != 2"> onclick="return post_groan_remove_user($post[postid], <if condition="$vboptions['post_groan_integrate']">true<else />false</if>);"</if> rel="nofollow">Remove-Dislike</a></if></div>
</td></tr></table>
</div>
<br />
At this point you should have a nice grey "Dislike" box appearing below each post someone "Dislikes." You might want to stop here.

You can convert the rest yourself from BOP5's post if you like but that's as far as I have to go!

vblts.ru supports vBulletin®, 2022-2024