Go Back   vb.org Archive > vBulletin Article Depository > Read An Article > vBulletin 3 Articles
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Turn "Post Groan Hack" Into Dislikes, Similar to BOP5 Likes System!
GavoTrav's Avatar
GavoTrav
Join Date: Jun 2011
Posts: 113

 

Ireland
Show Printable Version Email this Page Subscription
GavoTrav GavoTrav is offline 10-15-2011, 10:00 PM

Before Anything else is done! This is the thread that made me want to do this!
https://vborg.vbsupport.ru/showthread.php?t=266358

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.p...961#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!
Reply With Quote
  #2  
Old 11-08-2011, 08:01 AM
abdobasha2004's Avatar
abdobasha2004 abdobasha2004 is offline
 
Join Date: Aug 2008
Posts: 541
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

screen shots please....
I wonder if this is what I want
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:53 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03568 seconds
  • Memory Usage 2,201KB
  • Queries Executed 15 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_article
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete