vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Automatic 'Thank you' Hack (https://vborg.vbsupport.ru/showthread.php?t=63368)

VBDev 04-03-2004 08:53 AM

@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

Boofo 04-03-2004 09:31 AM

How about the button that says Thank you! ?

VBDev 04-03-2004 09:31 AM

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 ;)

Martyjp 04-03-2004 09:34 AM

I saw this on an ipb the other day and thought how useful it would be to have on this site

VBDev 04-03-2004 09:38 AM

Zip updated

Boofo, the new button is in the zip ;)

Boofo 04-03-2004 09:39 AM

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?

VBDev 04-03-2004 09:42 AM

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

Boofo 04-03-2004 09:45 AM

Thank you very much. Wouldn't it be easier if the thank you button didn't show up for unergistered users, also?

VBDev 04-03-2004 09:47 AM

If you want ;)

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

PHP Code:

<if condition="$bbuserinfo[userid]!=0">...button ...</if> 


Boofo 04-03-2004 09:50 AM

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. ;)


All times are GMT. The time now is 10:18 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.01269 seconds
  • Memory Usage 1,790KB
  • 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
  • (3)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (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