Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.0 > vBulletin 3.0 Full Releases

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
  #12  
Old 04-03-2004, 08:53 AM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@dirtymerc vbmenu_register("postmenu_494851", true); : For the phrase repeated twice, it's the problem I had with conditional in templates, but when I fix it in PHP files, it seems to work, I look at it

Yes, ajoutes en dessous, mean add under

An edit button, no and I don't will do it, you don't choose if a user thanks or not

I look for other problems too
Reply With Quote
  #13  
Old 04-03-2004, 09:31 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How about the button that says Thank you! ?
Reply With Quote
  #14  
Old 04-03-2004, 09:31 AM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To remove the sentence repeated twice, replace the thanks_postbit with :

PHP Code:
 $spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<
table class="tborder" id="post$post[postid]cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
<
td class="thead" $scrolltothis>
<
div class="normal" style="float:$stylevar[right]">
&
nbsp;
</
div>
 
<
div class="normal">
<!-- 
status icon and date -->
<
a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_old.gif" alt="$post[statustitle]border="0" /></a>
 
    
$post[postdate], $post[posttime]</if>
     
$post[firstnewinsert]
<!-- / 
status icon and date -->
</
div>
</
td>
</
tr>
<
tr>
<
td class="alt2" style="padding:0px">
<!-- 
user info -->
<
table cellpadding="0" cellspacing="$stylevar[cellpadding]border="0" width="100%">
<
tr>
<
td nowrap="nowrap">
 
    <
div id="postmenu_$post[postid]">
     
$username     </div>     
</
td>
<
td width="100%">&nbsp;</td>
<
td valign="top" nowrap="nowrap"
<
font class="smallfont"><div>$vbphrase[location_perm]: $vboptions[bbtitle]</font></div>
</
td>
</
tr>
</
table>
<!-- / 
user info -->
</
td>
</
tr>
<
tr>
<
td class="alt1">
<!-- 
messageattachmentssig --> 
<!-- 
icon and title -->
<
div class="smallfont">
    <
img class="inlineimg" src="images/icons/icon1.gif" alt="Post" border="0" />
<
strong>$vbphrase[thanks_title]</strong>
</
div>
<
hr size="1" style="color:$stylevar[tborder_bgcolor]/>
<!-- / 
icon and title -->
 
<!-- 
message -->
<
div>$liste_user $thank_phrase
<br /><br /></div>
<!-- / 
message --> 
</
td>
</
tr>
</
table>
</
div>
$spacer_close
<!-- / post #$post[postid] --> 

And the thanks_postbit_legacy with :

PHP Code:
 $spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">
<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
<
tr>
<
td class="thead" style="font-weight:normal" $scrolltothis
<!-- 
status icon and date -->
<
a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_old.gif" alt="$post[statustitle]border="0" /></a>
    
$post[postdate], $post[posttime]</if>
$post[firstnewinsert]
<!-- / 
status icon and date -->    
</
td>
<
td class="thead" style="font-weight:normal" align="$stylevar[right]">
&
nbsp;
</
td>
</
tr>
<
tr valign="top">
<
td class="alt2" width="175">
 
$username 
<div class="smallfont">
    &
nbsp;<br />
    <
div>$vbphrase[location_perm]: $vboptions[bbtitle]</div>                                </div>     
 
</
td>
<
td class="alt1">
<!-- 
icon and title -->
<
div class="smallfont">
    <
img class="inlineimg" src="$post[iconpath]alt="images/icons/icon1.gif" border="0" />
    <
strong>$vbphrase[thanks_title]</strong>
</
div>
<
hr size="1" style="color:$stylevar[tborder_bgcolor]/>
<!-- / 
icon and title --> 
<!-- 
message -->
<
div>$liste_user $thank_phrase
 
<br /><br /></div>
 
</
td>
</
tr>
<
tr>
<
td class="alt2">
&
nbsp;
</
td>
<
td class="alt1" align="$stylevar[right]">
&
nbsp;
</
td>
</
tr>
</
table>
$spacer_close
<!-- / post #$post[postid] --> 
I had corrected it in the legacy but forgot the other one

@calvin : where do you get this no_permission screen ? If you have it when you click the button Thanks, it's coz you are not logged in
Prefix : look in your config.php, $prefix=... you have to add in my SQL queries, the prefix before tables name

I update the zip

Edit boofo : I do your button now
Reply With Quote
  #15  
Old 04-03-2004, 09:34 AM
Martyjp Martyjp is offline
 
Join Date: Nov 2001
Location: Norwich, UK
Posts: 62
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I saw this on an ipb the other day and thought how useful it would be to have on this site
Reply With Quote
  #16  
Old 04-03-2004, 09:38 AM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Zip updated

Boofo, the new button is in the zip
Reply With Quote
  #17  
Old 04-03-2004, 09:39 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I forgot to ask, sorry. If a user clicks the button more than once on other visitis to the site, it won't add their name again will it? It should only show the first time they click it. Does it already do this?
Reply With Quote
  #18  
Old 04-03-2004, 09:42 AM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes boofo it already does this

If a user clicked twice (or more) the button, after the first time, he will get an error message saying he has already thanked for this thread.

Unregistered members can not thank too
Reply With Quote
  #19  
Old 04-03-2004, 09:45 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much. Wouldn't it be easier if the thank you button didn't show up for unergistered users, also?
Reply With Quote
  #20  
Old 04-03-2004, 09:47 AM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

If you want

Just add a conditional in the showthread template on this button so

PHP Code:
<if condition="$bbuserinfo[userid]!=0">...button ...</if> 
Reply With Quote
  #21  
Old 04-03-2004, 09:50 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL I was going to do that but I didn't know if you wanted to updated the install file with it, too. Excellent job, my friend. Clciking install and installing.
Reply With Quote
Reply

Thread Tools

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:46 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.07522 seconds
  • Memory Usage 2,350KB
  • 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
  • (3)bbcode_php
  • (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
  • (3)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