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)

calvinnguyen 04-03-2004 05:13 PM

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

VitroX 04-03-2004 08:05 PM

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 ! :p

Monday, I look for this ;)

no problem, take your time and enjoy the weekend ;)

calvinnguyen 04-03-2004 08:59 PM

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

Boofo 04-03-2004 09:03 PM

Just run the query as it is and you will be allright.

calvinnguyen 04-03-2004 09:24 PM

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

calvinnguyen 04-03-2004 09:42 PM

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.

Boofo 04-03-2004 09:52 PM

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

calvinnguyen 04-03-2004 10:43 PM

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.

tnguy3n 04-04-2004 01:27 AM

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? :rolleyes:

VBDev 04-04-2004 06:32 PM

Quote:

Originally Posted by tnguy3n
Wouldn't it better to add $thanks_post in postbit instead? :rolleyes:

Isn't it was is written ? I don't understand what you want to say


All times are GMT. The time now is 01:44 AM.

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.01297 seconds
  • Memory Usage 1,750KB
  • 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
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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