vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3 Articles (https://vborg.vbsupport.ru/forumdisplay.php?f=187)
-   -   Turn "Post Groan Hack" Into Dislikes, Similar to BOP5 Likes System! (https://vborg.vbsupport.ru/showthread.php?t=272154)

GavoTrav 10-15-2011 10:00 PM

Turn "Post Groan Hack" Into Dislikes, Similar to BOP5 Likes System!
 
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!

abdobasha2004 11-08-2011 08:01 AM

screen shots please....
I wonder if this is what I want


All times are GMT. The time now is 01:19 PM.

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.01148 seconds
  • Memory Usage 1,726KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete