vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Show Thread Enhancements - [AJAX] Post Thank You Hack (https://vborg.vbsupport.ru/showthread.php?t=165673)

Abe1 12-19-2007 10:00 PM

[AJAX] Post Thank You Hack
 
1 Attachment(s)
vB 4.0 version of this hack here: https://vborg.vbsupport.ru/showthread.php?t=231666

Post Thank You Hack 7.7


About this hack:
One of the biggest problems on forums as you may know is 'posts boosting'. There are users who LOVE to say 'thanks' when ever they can. How can it hurt? Their post count goes up, they have nothing to loose.

There are also users who really like to express their thanks to post but don't like posting a post that looks like they're post boosting.

Then comes the moderators who have to delete people's thanks yous so a thread can look readable with out the thanks yous thrown around.

Finally comes the posters of these useful posts. They have no idea how many people really likes their posts if only some people say 'thanks'.

What this hack does is fix ALL these problems - except those users who like post boosting. This places a button called 'thanks.' When a user clicks on it, it places his username in a box right under the post saying that so-and-so says 'thanks' for the post. Every-one who clicks is placed in one box.

By giving your users the extra feature, you forum will look allot nice and organized. It is a guaranteed liking by ALL the members of your forum.

Features:
  • Uses vBulletin easy Product installer/updater/uninstaller
  • Uses AJAX technology so your users don't have to refresh when they thank.
  • Places an easy to use button next to the edit button
  • Separate looks for postbit and postbit_legacy
  • Places all Thanks into one small box
  • Uses only ONE query every time you view a showthread page!
  • Users can't thank twice
  • Option to not allow users to thank their own post
  • Guests don't see 'thanks' button
  • Counts how many thanks a user gives
  • Counts how many thanks a post gets
  • Shows how many thanks a user gave in every post of his
  • Shows how many thanks a user gave in profile
  • Shows how many thanks a user got
  • Shows how many posts or a user are thanked
  • Shows info in profile
  • Search for a users thanked posts
  • Search for all thanked posts
  • Administrator can remove all Thanks from a single post
  • Users can remove their own Thanks
  • Turn on and off hack totally
  • Turn on and off hack for only some forums
  • Option to turn off hack for all but the first post of a thread
  • Option to turn off hack for all but the first post of a thread in specific forums
  • Option to turn off hack view of date for specific or all forums
  • Option to add to post count when someone clicks 'thanks'.
  • Option to give a user who receives thanks reputation points.
  • Ban Usergroups
  • Ban Users
  • Uses Phrases
  • Cache Templates
  • Guaranteed to be liked by ALL users on your forum!
Installation information on hack: (If installed on vb 3.7)
  • Files edited: 0
  • Templates edited: 0
  • Files to upload: 7
  • Time to install: 1 minute max

Updates:

Version 7.0 (12/20/07):
  • Release of this hack for vBulletin version 3.7
  • This version works on all vBulletin versions from 3.6.0 and up

Version 7.1 (12/24/07):
  • Fixed up the vb3.7 profile block code including fixing showing your info and not the member you are looking at.

Version 7.2 (01/24/08):
  • Updated files: post_thanks.php, functions_post_thanks.php
  • Updated templates: post_thanks_memberinfo_block, post_thanks_member_info
  • New option: Remove User's Thanks Count When Deleting Post
  • New phrase: post_thanks_search_user_gave
  • FIX User reputation level now updates. (Thanks to liwo for this one.)
  • NEW Added option to view all posts a user has thanked.
  • FIX Fixed Special Action - Delete All of a Users Thanks
  • FIX Should have fixed some 'foreach()' errors.

Version 7.3 (03/15/08):
  • Updated file: functions_post_thanks.php
  • Updated template: post_thanks_memberinfo_block
  • Deleted template: post_thanks_memberinfo_css
  • New option: Choice to use Markup Usernames or not. (Thanks to Namaless)
  • New option: Ban User from Getting Thanks
  • New option: Max Thanks a User can Give Per Day
  • FIX Fixed repeating bug on vb 3.6.7 forums.
  • CHANGE Changed where the post thanks info shows on the Profile Page. Moved to same box as statistics. (This will require a template edit if you are running vb3.7 beta 2-4)

Version 7.4 (03/21/08):
  • FIX: Fixed Profile Stats for vb3.7.0 RC1 users.

Version 7.5 (05/12/08):
  • Updated files: post_thanks.js, post_thanks.php, functions_post_thanks.php
  • Updated template: post_thanks_button
  • Added securty token check for all thanks added. This will prevent a user from giving out a link or somehow making an image that will get him a lot of thanks.
  • Should have fixed some 'foreach()' errors.
  • Fixed Delete All of a Users Thanks bug
  • vBulletin 3.7.x compatible only

Version 7.6 (06/02/08):
  • FIX: Fixed Security Check for vb 3.7.1
  • Updated files: functions_post_thanks.php

Version 7.7 (07/28/08):
  • FIX: Fixed problem with giving thanks using Blazer (palmOS browser).
  • Updated file: post_thanks.js
  • Updated templates: post_thanks_button, post_thanks_postbit, post_thanks_postbit_legacy
  • New option: Show Stats in Postbit?
  • New option: Show Stats in Profile?

Please post your comments or suggestions for this hack. I read ALL posts.

MAKE SURE YOU CLICK INSTALL!
You will get an email when a new version is released.

Pictures:
  1. Showing the 'thanks' button and stats in Postbit
  2. Showing post after 'thanks' (user view)
  3. Showing post after 'thanks' with legacy posts (admin view)
  4. Stats in members profile and link
  5. Link in Search drop down menu
  6. Hacks settings

mktrilogy 12-20-2007 03:41 AM

thanks i have it on reserved :)

dbirosel 12-20-2007 03:43 AM

Great Job on the update Abe1! Anything changed on this new version? Is the code different from the 3.6 version?

Abe1 12-20-2007 03:46 AM

Quote:

Originally Posted by dbirosel (Post 1405158)
Great Job on the update Abe1! Anything changed on this new version? Is the code different from the 3.6 version?

No new features for <3.7

3.7 users will get the updated Profile.

BUT, if you install this version now, when you upgrade to vb3.7, you wont have to update this hack.

Atwal 12-20-2007 04:12 AM

Thanks.. Do you think you can update the Post Groan, Can't Thank and Groan the Same Post, & Admin Log In As User from 3.6 to 3.7?? Or will those already work?

Audentio 12-20-2007 04:15 AM

Thanks a lot, I was waiting for this. I was using the older version on my 3.7 and it worked fine, just so you know.

EDIT: In the member.php, Im not getting the text "Total Thanks" Im just getting a small box for a tab.

http://audentio.com/forums/member.php?u=2

Abe1 12-20-2007 04:19 AM

Quote:

Originally Posted by Atwal (Post 1405165)
Thanks.. Do you think you can update the Post Groan, Can't Thank and Groan the Same Post, & Admin Log In As User from 3.6 to 3.7?? Or will those already work?

You should be able to use both together right now but I hope to out with Post Groan soon.
Quote:

Originally Posted by Audentio (Post 1405167)
Thanks a lot, I was waiting for this. I was using the older version on my 3.7 and it worked fine, just so you know.

http://audentio.com/forums/member.php?u=2

The profile page was not right.

Abe1 12-20-2007 04:24 AM

Quote:

Originally Posted by Audentio (Post 1405167)
Thanks a lot, I was waiting for this. I was using the older version on my 3.7 and it worked fine, just so you know.

EDIT: In the member.php, Im not getting the text "Total Thanks" Im just getting a small box for a tab.

http://audentio.com/forums/member.php?u=2

Dont know. It should be a phrase. I've tested it on another forum and it works fine. Can I check out your ACP?

NeutralizeR 12-20-2007 04:36 AM

Will you add Vbulletin Blog support?

Abe1 12-20-2007 04:39 AM

Quote:

Originally Posted by NeutralizeR (Post 1405175)
Will you add Vbulletin Blog support?

Hopefully. I'm working on it.

Noctavia 12-20-2007 04:47 AM

I was wondering if there's a way to make the thankyou box only appear after say 2 or 3 separate people have thanked the post? I'm wanting to use the hack to highlight the outstanding posts on my forum, and a couple of people seem the be very thankful for all sorts of things. I'd like it so that if the thank you box doesn't show until multiple people have said thanks for it.

vwdforum 12-20-2007 05:31 AM

thanks lol (hope you got it)

kollam003 12-20-2007 05:43 AM

thanks updated its a wonderful hack !!!

vuiveclub 12-20-2007 06:28 AM

Quote:

Version 7.0 (12/20/06)
Today 20 Dec 2007 or 2006? :)
Thanks for this hack Abe

Ba$im 12-20-2007 09:30 AM

thanx.

tobias_t 12-20-2007 09:42 AM

Quick question - how can I remove the "number of thanks a user has given" figure from the postbit userbar? I tried various template edits, but couldn't get it to disappear.

sensimilla 12-20-2007 10:54 AM

Nice share, although thankyou button always amazed me by its poor design.

Abe1 12-20-2007 11:12 AM

Quote:

Originally Posted by Noctavia (Post 1405180)
I was wondering if there's a way to make the thankyou box only appear after say 2 or 3 separate people have thanked the post? I'm wanting to use the hack to highlight the outstanding posts on my forum, and a couple of people seem the be very thankful for all sorts of things. I'd like it so that if the thank you box doesn't show until multiple people have said thanks for it.

Maybe put a condition around the box.
Quote:

Originally Posted by vuiveclub (Post 1405204)
Today 20 Dec 2007 or 2006? :)
Thanks for this hack Abe

Thanks. Fixed.
Quote:

Originally Posted by tobias_t (Post 1405299)
Quick question - how can I remove the "number of thanks a user has given" figure from the postbit userbar? I tried various template edits, but couldn't get it to disappear.

You can remove it from the template.

yahoooh 12-20-2007 11:17 AM

thanks

Hornstar 12-20-2007 11:22 AM

Thanks for the update :)

lolo? 12-20-2007 11:54 AM

thanks abe1 :)

zmmmzz 12-20-2007 12:11 PM

Is there a way I can limit the hack so that people can only thank just a few times a day and no more than that?

Please I need this. I'll pay you if you help me.

pedrambayat 12-20-2007 12:50 PM

thanks

Snake 12-20-2007 03:15 PM

Many thanks for the release! :)

RS_Jelle 12-20-2007 05:46 PM

Also a bump for this issue. I also reported this already before :)
It throws up an error in the Firefox error console for each showthread page.

1F42 12-20-2007 08:45 PM

Just thinking why? that last one is working fine on v3.6.8 and if there is a bug in Firefox then I'll stay with the old for now. You made it too good in the first place lol well done!

bxbigt 12-20-2007 10:08 PM

will this mess up my members thanks count ?

Noctavia 12-20-2007 11:44 PM

Quote:

Originally Posted by Abe1 (Post 1405351)
Maybe put a condition around the box.

I thought it might be something like that. Sorry to be a pain though - but where would I be looking for the bit that displays it? Would it be in one of the templates? Or the XML file?

And if anyone (yourself or someone viewing the thread) would be able to give me an idea of what sort of condition I would need, that would be a HUGE help. Still learning a lot of this...

Abe1 12-21-2007 01:49 AM

Quote:

Originally Posted by zmmmzz (Post 1405390)
Is there a way I can limit the hack so that people can only thank just a few times a day and no more than that?

Please I need this. I'll pay you if you help me.

Sorry, no way right now.
Quote:

Originally Posted by Noctavia (Post 1405821)
I thought it might be something like that. Sorry to be a pain though - but where would I be looking for the bit that displays it? Would it be in one of the templates? Or the XML file?

And if anyone (yourself or someone viewing the thread) would be able to give me an idea of what sort of condition I would need, that would be a HUGE help. Still learning a lot of this...

One of the templates.

Alien 12-21-2007 01:57 AM

Hey, nice work!

Question: If I set this to only show for 1 particular forum (like a customer service area), will the 1 query still have to be run on the other forums? If yes, is their a way to prevent that in a future version?

Thanks so much!

Noctavia 12-21-2007 04:05 AM

If there's anyone who has a little knowledge that could help me set up the conditional to only show the thanks box if 2 or more people thank, please PM me. I'm not sure what to write and feel Abe doesn't have the time (or want) to help me. This is the only thing that is stopping this mod from being exactly what I want for my forum...

Elmer 12-21-2007 05:16 AM

Quote:

Originally Posted by Noctavia (Post 1405918)
If there's anyone who has a little knowledge that could help me set up the conditional to only show the thanks box if 2 or more people thank, please PM me. I'm not sure what to write and feel Abe doesn't have the time (or want) to help me. This is the only thing that is stopping this mod from being exactly what I want for my forum...

Tray the following, but I don't know if that could give errors...

Replace your post_thanks_postbit_legacy template with this code:
PHP Code:

<if condition="$post['post_thanks_amount'] >= 2">
<
div style="padding:$stylevar[cellpadding]px 0px 0px 0px">
    <
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
        <
tr valign="top">
            <
td class="alt2" width="175">
                <if 
condition="$post['post_thanks_amount'] == 1">
                    <
strong><phrase 1="$post[username]">$vbphrase[post_thanks_user_says]</phrase></strong>
                <else />
                    <
strong><phrase 1="$post[post_thanks_amount_formatted]2="$post[username]">$vbphrase[post_thanks_users_say]</phrase></strong>
                </if>
                <if 
condition="$bbuserinfo['usergroupid'] == 6">
                    <
br /><a href="post_thanks.php?do=post_thanks_remove_all&amp;p=$post[postid]"<if condition="$vboptions[disable_ajax] != 2"onclick="post_thanks_remove_all($post[postid], <if condition="$vboptions['post_groan_integrate']">true<else />false</if>); return false;"</if> rel="nofollow">$vbphrase[post_thanks_remove]</a>
                </if>
                <if 
condition="$post['show_thanks_remove_option']">
                <
br /><a href="post_thanks.php?do=post_thanks_remove_user&amp;p=$post[postid]"<if condition="$vboptions['disable_ajax'] != 2"onclick="post_thanks_remove_user($post[postid], <if condition="$vboptions['post_groan_integrate']">true<else />false</if>); return false;"</if> rel="nofollow">$vbphrase[post_thanks_remove_user]</a>
                </if>
            </
td>
            <
td class="alt1"><div>$post[post_thanks_bit]</div></td>
        </
tr>
    </
table>
</
div>
</if> 

Note that I'm using Postbit Legacy, you shuld add the conditional to the post_thanks_postbit template, if your are using that.

vBVision 12-21-2007 07:57 AM

Thanks for hack! But I have a problem with it. In the profiles of all users the total amount of thanks is similar with admin's thanks! My vbulletin version is 3.7.0 Beta 3. What's that, what can I do to solve this problem?:)

Noctavia 12-21-2007 08:51 AM

Thankyou Elmer!! Looks like it works perfectly. Thank you so much. /bow

johnr 12-21-2007 10:35 AM

Is there a mod or submod of this that would allow guests to say Thank You and this be shown in a seperate part i.e. 'x Guests said Thank You for this post'?. Also on the groan hack too :)

bxbigt 12-21-2007 01:11 PM

Quote:

Originally Posted by bxbigt (Post 1405779)
will this mess up my members thanks count ?

anyone ?

Justine 12-21-2007 02:05 PM

thanks for the update

not sure if you are aware but a better default "Thanks" button can be found here:
https://vborg.vbsupport.ru/showthread.php?t=163870

Antivirus 12-21-2007 02:09 PM

Quote:

Originally Posted by Noctavia (Post 1405918)
If there's anyone who has a little knowledge that could help me set up the conditional to only show the thanks box if 2 or more people thank, please PM me. I'm not sure what to write and feel Abe doesn't have the time (or want) to help me. This is the only thing that is stopping this mod from being exactly what I want for my forum...

Noctavia, I suggested this in the 3.6 thread, but I don't think you saw it. You're really much better off using the hooks Abe1 placed within the code, instead of using template edits as suggested above, otherwise every time Abe1 updates the mod, you'll have to re-do the template edit above...

Just create a simple plugin for hook location: post_thanks_function_post_thanks_off_end

Try this:
PHP Code:

$sql $vbulletin->db->query_first("SELECT COUNT(post_thanks_votenum) AS qty FROM " TABLE_PREFIX "post AS post WHERE postid = " $postinfo['postid'] . " AND qty < 3");

if (
$sql['qty'])
{
     return 
true;


Within the query, change the 3 to minimum quantity of times a post should be thanked before displaying, and I think it'll give you what you need.

Adam21 12-22-2007 11:50 AM

Note: To those who encounter this error
Code:

Unable to add cookies, header already sent
after the installation of this mod:

Its because you must follow the instructions given in the templates to alter and add the "$template_hook[navbar_search_menu]" in the navbar template if you are using a previous older style.;)

csavern 12-22-2007 12:14 PM

A conflict was detected in the bitfields. You cannot continue with the installation of this product until this has been fixed. The conflicts found were:
Bitfield Collision: credits_cantearn = prefixrequired

Any one know how to fix this
i uninstalled the 6.3 and tried to reinstall and still the same thing


All times are GMT. The time now is 12:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04792 seconds
  • Memory Usage 1,871KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (15)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete