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)

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 07:54 AM.

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.06445 seconds
  • Memory Usage 1,772KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (3)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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