Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Automatic 'Thank you' Hack Details »»
Automatic 'Thank you' Hack
Version: 1.00, by VBDev VBDev is offline
Developer Last Online: Dec 2021 Show Printable Version Email this Page

Version: 3.0.0 Rating:
Released: 04-02-2004 Last Update: Never Installs: 44
 
No support by the author.

Total hack's description : http://www.vbulletindev.net/forums/h...hack&hackid=49

Site : http://www.vbulletindev.net/forums


You can set in wanted forums with this hack, an option which displays in a special post of a thread, the list of members who clicked the 'Thank you' button. So, instead of having a lot of posts saying : 'Great', 'Big thx ' ... you only have one post.

The postbit (legacy or not) automatically adapts itself too.

The phrase to thank the thread creator change if there is one user or more which clicks the button, so the verb is always correct
There is an other option too in Forum manager, to set if you want to see at which date the 'Thank you' button was clicked by the member.

Hack requested by boofo


Eventual bugs :Correct with it

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #82  
Old 04-09-2004, 11:23 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

You're right. After looking at the query, that makes sense. It works now. Thank you, sir.
Reply With Quote
  #83  
Old 04-11-2004, 06:19 AM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks VBDev, but it didn't work at all. I gave up. Have no ideas about this error.
Try many times and may different ways, but still didn't work at all.

Quote:
Originally Posted by VBDev
@ calvin : I've exactly the same problem ... this no_permission page, really strange, the var $foruminfo[showthanks] doesn't seen working

I correct it before doing the counter


If you have this no_permission problem, replace the code to add in newreply.php with :


PHP Code:
// ############################### Than you hack Grog6 ###############################
if ($_REQUEST['do'] == 'thanks')
{
    
globalize($_REQUEST, array('threadid' => INT));
    
$forum=$DB_site->query_first("SELECT showthanks FROM "TABLE_PREFIX ."forum WHERE forumid='$foruminfo[forumid]'");
    if (
$forum[showthanks]==|| $bbuserinfo[userid]==0)
     
print_no_permission();
    else
    {
        
$verif=$DB_site->query_first("SELECT userid FROM "TABLE_PREFIX ."thanks WHERE threadid='$threadid' AND userid='$bbuserinfo[userid]'");
    if (
$verif[userid]==$bbuserinfo[userid])
     eval(
print_standard_error('error_already_thanks'));
    else
        {
        
$DB_site->query("
        INSERT INTO "
TABLE_PREFIX ."thanks
        (userid, username, date, threadid)
        VALUES ('
$bbuserinfo[userid]', '" addslashes($bbuserinfo[username]) . "', " TIMENOW ", '$threadid')");
        
$url "showthread.php?$session[sessionurl]t=$threadid";
    eval(
print_standard_redirect('redirect_thanks'));
        }
    }


And code to add in functions_showthread.php with :

PHP Code:
         // thank you hack grog6
        
$cmpt=1;
        
$grumpf=$DB_site->query_first("SELECT showthanks FROM "TABLE_PREFIX ."forum WHERE forumid='$forum[forumid]'");
    
        if (
$grumpf[showthanks] == && $post[postcount]==1)
        {
        
$thanks=$DB_site->query("SELECT * FROM "TABLE_PREFIX ."thanks WHERE threadid='$thread[threadid]' ORDER BY username");
        
$nb=$DB_site->num_rows($thanks);
        if (
$nb>0)
           {
               while(
$thank=$DB_site->fetch_array($thanks))
               {
                if (
$cmpt<$nb)
                 
$virg=",";
                else 
$virg="";
                if (
$forum[showthanks_date]==0)
                
$liste_user $liste_user." <a href=\"member.php?u=$thank[userid]\">$thank[username]</a>$virg ";
                else
                {
                 
$date_thank vbdate($vboptions['dateformat'], $thank['date'], true);
                 
$liste_user $liste_user." <a href=\"member.php?u=$thank[userid]\">$thank[username]</a> ($date_thank)$virg ";
                }
               
$date=$thank[date];
               
$cmpt++;
              }
               
// format date/time
            
$post['postdate'] = vbdate($vboptions['dateformat'], $datetrue);
            
$post['posttime'] = vbdate($vboptions['timeformat'], $date);
               
// user profil field
               
$username "<b><font size=\"3\">$vbphrase[thanks_bot]</font></b>";
               if (
$nb<=1)
                
$thank_phrase construct_phrase($vbphrase[thanks_1_install], $post[musername]);
               else 
$thank_phrase construct_phrase($vbphrase[thanks_x_install], $post[musername]);
               if (
$vboptions[legacypostbit]=="000")
                eval(
'$thanks_post .= " ' fetch_template('thanks_postbit') . '";');
               else eval(
'$thanks_post = " ' fetch_template('thanks_postbit_legacy') . '";');
             }
        }
        
// thank you hack grog6 
Reply With Quote
  #84  
Old 04-11-2004, 09:04 PM
VitroX VitroX is offline
 
Join Date: Feb 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks a lot!

I installed, the counter works perfectly.

I'm only getting the "no permission" error only on those forums where the "thank you" has not been activated on admincp, but on those where it was is working perfect.

Reply With Quote
  #85  
Old 04-11-2004, 09:14 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VitroX
Thanks a lot!

I installed, the counter works perfectly.

I'm only getting the "no permission" error only on those forums where the "thank you" has not been activated on admincp, but on those where it was is working perfect.

Just add this above the code in the template for the thank you button:

HTML Code:
<if condition="$forum['showthanks']">
and add this below the code in the template for the thank you button:

HTML Code:
</if>
and the button will only show on the forums it is set for.
Reply With Quote
  #86  
Old 04-12-2004, 06:14 AM
marcel-ea marcel-ea is offline
 
Join Date: Oct 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

great hack please can anybody make a extra for me?
I like to see " xxx User say thank you" e.g. "15 User ...."

Also a counter...

thx very much
Reply With Quote
  #87  
Old 04-16-2004, 09:48 AM
vbIce vbIce is offline
 
Join Date: Feb 2004
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about a hack that would SHOW in the Users profile how many Thank You's one has made? Along the SAME lines as when they make a Post? I know others that would LOVE this feature.

Is there soemothing out there that could be ADDED to show this?

.
Reply With Quote
  #88  
Old 04-17-2004, 02:23 AM
VitroX VitroX is offline
 
Join Date: Feb 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Just add this above the code in the template for the thank you button:

HTML Code:
<if condition="$forum['showthanks']">
and add this below the code in the template for the thank you button:

HTML Code:
</if>
and the button will only show on the forums it is set for.
thanks a lot!, problem fixed
Reply With Quote
  #89  
Old 04-18-2004, 10:22 AM
cpt cpt is offline
 
Join Date: Oct 2003
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

nice hack - but I have a two problems:

1. "Thank You" Button is displayed twice at the top of a thread (see attachment) - I think the problem is in the SHOWTHREAD template.

2. If the threadicon is the icon is not displayed at the top of the thank you post :-/ (see attachment)
Reply With Quote
  #90  
Old 04-18-2004, 12:03 PM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

1 - Only add it once in your SHOWTHREAD template, you added it twice
2 - I only modify the functions_showpost.php to add my thank function, I don't think the problem come from the hack
Reply With Quote
  #91  
Old 04-18-2004, 07:02 PM
marcel-ea marcel-ea is offline
 
Join Date: Oct 2002
Posts: 48
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by cpt
nice hack - but I have a two problems:


2. If the threadicon is the icon is not displayed at the top of the thank you post :-/ (see attachment)
i have the same problem EXACTLY the same when use the standard icon its broken use a other its working
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 03:58 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.04820 seconds
  • Memory Usage 2,353KB
  • Queries Executed 25 (?)
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
  • (4)bbcode_html
  • (2)bbcode_php
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete