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
  #32  
Old 04-03-2004, 05:13 PM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev

@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
I saw the line below at config.php
$tableprefix = ' ';


Do I add this line in like as below: BUT WHEN I RUN IT STILL GIVE ME ERROR. I am really don't know how to run sql

Error

SQL-query :

$tableprefix = ' '

MySQL said:


#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '$tableprefix = ' '' at line 3


ALTER TABLE `forum` ADD `showthanks` INT(1) DEFAULT '0' NOT NULL;

ALTER TABLE `forum` ADD `showthanks_date` INT(1) DEFAULT '0' NOT NULL;
$tableprefix = '';
CREATE TABLE `thanks` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`userid` INT(10) NOT NULL,
`username` VARCHAR(50) NOT NULL,
`date` INT(10) NOT NULL,
`threadid` INT(10) NOT NULL
);
Reply With Quote
  #33  
Old 04-03-2004, 08:05 PM
VitroX VitroX is offline
 
Join Date: Feb 2004
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by VBDev
I'll have a really hard night this evening, and will not be able to work tomorrow, I think I'll stay at bed all the day !

Monday, I look for this
no problem, take your time and enjoy the weekend
Reply With Quote
  #34  
Old 04-03-2004, 08:59 PM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by calvinnguyen
I saw the line below at config.php
$tableprefix = ' ';


Do I add this line in like as below: BUT WHEN I RUN IT STILL GIVE ME ERROR. I am really don't know how to run sql

Error

SQL-query :

$tableprefix = ' '

MySQL said:


#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '$tableprefix = ' '' at line 3


ALTER TABLE `forum` ADD `showthanks` INT(1) DEFAULT '0' NOT NULL;

ALTER TABLE `forum` ADD `showthanks_date` INT(1) DEFAULT '0' NOT NULL;
$tableprefix = '';
CREATE TABLE `thanks` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`userid` INT(10) NOT NULL,
`username` VARCHAR(50) NOT NULL,
`date` INT(10) NOT NULL,
`threadid` INT(10) NOT NULL
);
Anyone can help me with this problem above. Many thanks
Reply With Quote
  #35  
Old 04-03-2004, 09:03 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just run the query as it is and you will be allright.
Reply With Quote
  #36  
Old 04-03-2004, 09:24 PM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
Just run the query as it is and you will be allright.
when I run this: code below I got this error: How can I clear up this error.

Error

SQL-query :

ALTER TABLE `forum` ADD `showthanks` INT( 1 ) DEFAULT '0' NOT NULL

MySQL said:


#1060 - Duplicate column name 'showthanks'



ALTER TABLE `forum` ADD `showthanks` INT(1) DEFAULT '0' NOT NULL;

ALTER TABLE `forum` ADD `showthanks_date` INT(1) DEFAULT '0' NOT NULL;

CREATE TABLE `thanks` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`userid` INT(10) NOT NULL,
`username` VARCHAR(50) NOT NULL,
`date` INT(10) NOT NULL,
`threadid` INT(10) NOT NULL
);
Reply With Quote
  #37  
Old 04-03-2004, 09:42 PM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I run success for SQL queries on my database, but I don't understand for this line:

Don't forget to add a prefix to table's name if you use one in your config.php

Look in config.php
I see this:
$tableprefix = '';

What do I need to do?
because right now when I click on the " thank you" button to test. It give me this message:

Calvin, you do not have permission to access this page. This could be due to one of several reasons:

Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Reply With Quote
  #38  
Old 04-03-2004, 09:52 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just run these 3 queries and don't worry about the table_prefix. You don't have one.

Quote:
ALTER TABLE `forum` ADD `showthanks` INT(1) DEFAULT '0' NOT NULL;

ALTER TABLE `forum` ADD `showthanks_date` INT(1) DEFAULT '0' NOT NULL;

CREATE TABLE `thanks` (
`id` INT(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
`userid` INT(10) NOT NULL,
`username` VARCHAR(50) NOT NULL,
`date` INT(10) NOT NULL,
`threadid` INT(10) NOT NULL
);
Reply With Quote
  #39  
Old 04-03-2004, 10:43 PM
calvinnguyen calvinnguyen is offline
 
Join Date: Nov 2003
Posts: 114
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have already run it. And following all intruction that he gave. But when I test to click on a button "Thank you" , It said I did't have permision like that message previous posts.
Reply With Quote
  #40  
Old 04-04-2004, 01:27 AM
tnguy3n's Avatar
tnguy3n tnguy3n is offline
 
Join Date: May 2003
Location: U of I, Iowa
Posts: 846
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by calvinnguyen
I have already run it. And following all intruction that he gave. But when I test to click on a button "Thank you" , It said I did't have permision like that message previous posts.
Enable "thank you button" when you create new forums or update existing forums in Forum Permision.


Quote:
In postbit and postbit_legacy templates, add at the end :

------------------------------------------------------------------------
$thanks_post
------------------------------------------------------------------------
Wouldn't it better to add $thanks_post in postbit instead?
Reply With Quote
  #41  
Old 04-04-2004, 06:32 PM
VBDev's Avatar
VBDev VBDev is offline
 
Join Date: Jan 2004
Location: France
Posts: 2,570
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by tnguy3n
Wouldn't it better to add $thanks_post in postbit instead?
Isn't it was is written ? I don't understand what you want to say
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 12:59 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.13302 seconds
  • Memory Usage 2,314KB
  • 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
  • (8)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