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)

Boofo 04-09-2004 11:23 PM

You're right. After looking at the query, that makes sense. It works now. Thank you, sir. ;)

calvinnguyen 04-11-2004 06:19 AM

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 



VitroX 04-11-2004 09:04 PM

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.

;)

Boofo 04-11-2004 09:14 PM

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

marcel-ea 04-12-2004 06:14 AM

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

vbIce 04-16-2004 09:48 AM

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?

.

VitroX 04-17-2004 02:23 AM

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

cpt 04-18-2004 10:22 AM

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 https://vborg.vbsupport.ru/ the icon is not displayed at the top of the thank you post :-/ (see attachment)

VBDev 04-18-2004 12:03 PM

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

marcel-ea 04-18-2004 07:02 PM

Quote:

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


2. If the threadicon is https://vborg.vbsupport.ru/ 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

DamasGate 04-19-2004 05:16 PM

Thanks for this nice hack but also i have the same problem what calvinnguyen have it

Try many times and may different ways, but still didn't work for me

same problem ... this no_permission page !!

Please if any help

Thanks

manga 04-21-2004 11:28 AM

Hi,

I get the hack working yesterday and today it wont display any "thank you" ?!

When i press the button twice it says "You have already thank this message !" but there is nothing in the Thread !! i look all the hack again and again, all settings are like in the text...

Why it work yesterday and today not....

Eternal2u 04-25-2004 07:25 AM

OMG

this mod ++++ign RULES..will cut the spam in half if not more on my board

BIG THANX!

bigreefer 05-08-2004 05:47 PM

Great Hack, big ThX for it.

Bit one question left.

If I change the option "Display the 'Thank you' button" to "NO" I still see the botton on threads. Why ?

subu1 05-28-2004 04:57 PM

Quote:

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



2. If the threadicon is http://www.vbulletin.com/forum/images/icons/icon1.gif the icon is not displayed at the top of the thank you post :-/ (see attachment)


Hast Du das Problem gefixt bekommen, ich nicht, selbst beim umbennen des Icons nicht.

I dont see my ICON :ermm:

Reef 05-29-2004 11:34 PM

Quote:

Originally Posted by subu1
Hast Du das Problem gefixt bekommen, ich nicht, selbst beim umbennen des Icons nicht.

I dont see my ICON :ermm:


To display icon

Find in thanks_postbit_legacy

PHP Code:

<img class="inlineimg" src="$post[iconpath]alt="images/icons/icon1.gif" 

Replace with
PHP Code:

<img class="inlineimg" src="images/icons/icon1.gif" 


subu1 05-30-2004 12:53 AM

Strikeeeeeeeeeeeeeeeeeeeee........yeah thxxxxxxxxxxxxxxxxxxxxxxxxxx

subu1 05-30-2004 05:21 AM

Hi Guys,

still something, is possible it to insert exactly the same as with my own vB 2.x.x version a Avatar into the postbit.

Look in my attachment :squareeyed:

greetz subu1

daveone 06-10-2004 05:13 PM

I've got a problem (I think I made something wrong)

In the admin control center I allowed to use the thank you bot in the funforum but in no other forum!

but if you have a look here >> http://www.freaky-forum.de/showthread.php?t=224 the thank you buttons is also shown. can somebody tell me how to fix the problem?

for the people who are too lazy to click on the link. I integrated a screenshot in my post ;)

notorious 06-20-2004 09:01 PM

nice hack took some editing here and there to get it to look right but i have a question how would i edit it so that the poster couldn't say thx for the post?

Holidazed 07-07-2004 09:39 PM

This installed without a hitch. Thank you very much.

I do have one prob tho. Even tho I have setup a forum to not use the "Thank You" system, the "Thank You" button shows up on the page.

Ideas?

Holidazed 07-07-2004 09:49 PM

NM, teach me to post b4 I read the thread.

Boofo 07-07-2004 11:03 PM

Quote:

Originally Posted by bitg
NM, teach me to post b4 I read the thread.

hehe

daveone 07-13-2004 08:12 PM

Is it possible to code this hack without the Button?
I want that there is written "Click here to thank the Author for this hack"

like on the screenshot below

http://www.freaky-forum.de/Upload%20...r/thankyou.GIF

bubba1977 07-23-2004 10:37 PM

Great hack.

We have been using it for a while on our forums with no problems at all.

My only question is this:

we only display the thank you button in forums that have attachements in the posts.

However it seems a lot of people are downloading the attachements and not clicking the button to thank the poster.

Is there anyway to make it so that when someone clicks to download an attachement it also automaticly makes the thank you post at the same time in forums where the button is turned on?

azmi 09-13-2004 07:14 PM

has anyone updated to 3.03?
i have a big problem in "SHOWTHREAD template"

the phrases are not the same and when i change it without 100% the same,
i get an error by saving it.
now i installed it 3x but nothing changed!!!!

please help me!

the whole "SHOWTHREAD template" text would be nice ;-)

Lionel 09-24-2004 06:00 PM

I am using for automatic welcome members instead of thank you. I'd like to use also for automatic birthday greetings. How can I use a conditional to make it display a different image depending of the forums?

HarryBO 10-12-2004 09:44 PM

I have the same Problem as azmi!

HTML Code:

<if condition="$show['largereplybutton']">
                <td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
        <else />

This is the Showthread Template of 3.0.3

HarryBO 10-13-2004 08:28 PM

Can nobody help?

AlphaWolf 01-22-2005 03:30 PM

How is it possible to click on the ThankYouBotton in closed Threads?

Marco van Herwaarden 01-22-2005 05:13 PM

I think it is not possible, this hack runs through all the standard permissions checks if i remember right.

Made a modified version of this once, with a bit more settings, that would allow thanks (optional) in closed posts/forums for that usergroup.

AlphaWolf 01-23-2005 04:20 PM

Yes i noticed that while searching the Hack's Code for a possibility. I am still looking for a solution.

Morgalis 01-27-2005 05:00 PM

Quote:

Originally Posted by AlphaWolf
Yes i noticed that while searching the Hack's Code for a possibility. I am still looking for a solution.

any possibility of being able to add an avatar yet? :)

It would make it look nicer IMHO

Gohan 02-22-2005 11:40 AM

Quote:

Originally Posted by VitroX
this is a great hack.

how about adding the total pple who thank the thread starter?

something like:

5 Users already said Thank You!:

username1, username2, username3, username4, username5


it would fit better for my forum.

Thanks for your work!

Just easier modify code :D

Find (Languages & Phrases):

Code:

Type : GLOBAL
Varname : thanks_1_install
Phrase : thanks {1} for this thread

Change to:

Code:

Phrase : User already said Thank You!:
Find:

Code:

Type : GLOBAL
Varname : thanks_x_install
Phrase : thank {1} for this thread

Change to:

Code:

Phrase : Users already said Thank You!:
------------------------------------------------------------------------

Find (functions_showthread.php):

Code:

$liste_user = $liste_user." <a href=\"member.php?u=$thank[userid]\">$thank[username]</a>$virg ";
Add before:

Code:

$users = $nb;
Find:

Code:

$date_thank = vbdate($vboptions['dateformat'], $thank['date'], true);
Add before:

Code:

$users = $nb;
------------------------------------------------------------------------

Find (postbit):

Code:

<div>$liste_user $thank_phrase

<br /><br /></div>

Change to:

Code:

<div>$users $thank_phrase<br /><br />$liste_user</div>
Find (postbit_legacy):

Code:

                <div>$liste_user $thank_phrase


<br /><br /></div>

Change to:

Code:

<div>$users $thank_phrase<br /><br />$liste_user</div>
You're done! :D

Eternal2u 03-04-2005 12:14 PM

I was wondering..

Anyway i could get a mod exactly like this except make it say F You..

Like it would say this in there username block on the side of there post..

"Posts: 1,401
Total F You's: 6
Was Told F You 56 Times in 21 Posts."

Would be like in addition to the thank you mod, since i want it still as well..and erm how would i go about changing the thank you mod bit on the side of the users post tjat says

"Posts/Thanks: 1,401/6
Thanked 56 Times in 21 Posts"

to

"Posts: 1,401
Total Thank You's: 6
Was Thanked 56 Times in 21 Posts."

Thanx ;)

Kei Kurono 05-08-2005 05:23 AM

Quote:

Originally Posted by Morgalis
any possibility of being able to add an avatar yet? :)

It would make it look nicer IMHO

I would also like to see an avatar :]

Scotty2k 05-11-2005 09:06 AM

Quote:

Originally Posted by HarryBO
I have the same Problem as azmi!

HTML Code:

<if condition="$show['largereplybutton']">
                <td class="smallfont"><a href="newreply.php?$session[sessionurl]do=newreply&amp;noquote=1&amp;p=$FIRSTPOSTID"><if condition="$show['closethread']"><img src="$stylevar[imgdir_button]/reply.gif" alt="$vbphrase[reply]" border="0" /><else /><img src="$stylevar[imgdir_button]/threadclosed.gif" alt="$vbphrase[closed_thread]" border="0" /></if></a></td>
        <else />

This is the Showthread Template of 3.0.3

Me too .. please help !

vietfancy 01-05-2006 11:14 PM

Does this hack works for v3.53?

Thanks. I COuldnt find this hack for our new version.

deneme2 07-07-2008 03:35 PM

thanks


All times are GMT. The time now is 01:37 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.01488 seconds
  • Memory Usage 1,884KB
  • 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
  • (12)bbcode_code_printable
  • (6)bbcode_html_printable
  • (4)bbcode_php_printable
  • (11)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (39)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