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)
-   -   [Adv] banners Hack (https://vborg.vbsupport.ru/showthread.php?t=73847)

Pain86 11-05-2005 07:53 PM

i get this when i try and add a banner

Code:

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 'index' , for faq 'faq' , & we can display it in more than one page , you should' at line 1
help!?!?

mayhemmike 11-07-2005 03:46 AM

Quote:

Originally Posted by Pain86
i get this when i try and add a banner

Code:

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 'index' , for faq 'faq' , & we can display it in more than one page , you should' at line 1
help!?!?

oops!

jamiepryer@hotm 12-13-2005 08:50 PM

Quote:

Database error in vBulletin 3.0.6:

Invalid SQL: select * from adv where main ='1' order by 'id' desc
mysql error: Unknown column 'main' in 'where clause'

mysql error number: 1054

Date: Tuesday 13th of December 2005 10:37:57 PM
Script: http://www.sussexcarz.com/forum/upload/
Referer:
Username: Jamie@SMCC
IP Address: 80.3.64.11
get the following error
please help :)

Icehawk002 01-01-2006 09:57 AM

Everything appears OK but when the final changes are made to global.php as in

Quote:

5- in [your forum folder]/global.php
## find
##-------------
/*================================================= =====================*\
|| ################################################## ##################
|| # Downloaded: 01:34, Sun Jan 2nd 2005
|| # CVS: $RCSfile: global.php,v $ - $Revision: 1.256.2.4 $
|| ################################################## ##################
\*================================================ ======================*/
##--------------
## in Above put
##--------------


$R = THIS_SCRIPT;

if($R != 'forumdisplay' AND $R != 'showthread' AND $R != 'login' ){

$queryxs = $DB_site->query("select * from adv where script LIKE '%*$R*%' order by 'id' desc");
$rowx = $DB_site->num_rows($queryxs); etc etc
Then an error is produced Invalid SQL: select * from adv

If anyone prepared to assist please PM me

Icehawk002 01-01-2006 03:00 PM

Actual error is

Quote:

Database error in vBulletin 3.0.7:

Invalid SQL: select * from adv where script LIKE '%*online*%' order by 'id' desc
mysql error: Table 'icecastle.adv' doesn't exist

mysql error number: 1146

Paul M 01-05-2006 08:33 PM

From memory, you use table prefixes on your site, change the relevant line of code to this ;

PHP Code:

$queryxs $DB_site->query("select * from " TABLE_PREFIX "adv where script LIKE '%*$R*%' order by 'id' desc"); 


Icehawk002 01-05-2006 09:04 PM

Thanks Paul I tried that but no luck :o

Paul M 01-05-2006 10:37 PM

Quote:

Originally Posted by Icehawk002
Thanks Paul I tried that but no luck :o

I'm not surprised - looking at the whole block of code, there are about six instances where the table prefix is missing, not good.

Replace the whole section for global.php with this ;

PHP Code:

// Fixed for table prefixes by Paul M.
$R THIS_SCRIPT;    

if (
$R != 'forumdisplay' AND $R != 'showthread' AND $R != 'login' )
{
  
$queryxs  $DB_site->query("select * from " TABLE_PREFIX "adv where  script  LIKE '%*$R*%'  order by  'id' desc");
  
$rowx $DB_site->num_rows($queryxs);
  while(
$row $DB_site->fetch_array($queryxs)){
    eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');
  }
  
$update  $DB_site->query("UPDATE " TABLE_PREFIX "adv SET views = views+1  where  script LIKE '%*$R*%' ");
}

if (
$R == "forumdisplay")
{
  
$foruminfo verify_id('forum'$_REQUEST['forumid'], 11);
  
$queryxs  $DB_site->query("select * from " TABLE_PREFIX "adv where   forumid  LIKE '%*$foruminfo[forumid]*%' order by  'id' desc");
  while(
$row $DB_site->fetch_array($queryxs))
  {
    eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');
  }
  
$update  $DB_site->query("UPDATE " TABLE_PREFIX "adv SET views = views+1  where forumid  LIKE '%*$foruminfo[forumid]*%'  ");
}


if (
$R == "showthread")
{
  
$threadinfo verify_id('thread',$_REQUEST['threadid'], 11);
  
$queryxs  $DB_site->query("select * from " TABLE_PREFIX "adv where threadid LIKE '%*$threadinfo[threadid]*%'  order by  'id' desc");
  while(
$row $DB_site->fetch_array($queryxs))
  {
    eval(
'$shir .= "' fetch_template('adv_creativeSuite') . '";');
  }
  
$update  $DB_site->query("UPDATE " TABLE_PREFIX "adv SET views = views+1  where threadid LIKE '%*$threadinfo[threadid]*%' ");



Icehawk002 01-05-2006 11:08 PM

Thanks Paul, great work it's working well installed should I say now. Just got to work it out now LOL

So in addition to the above fix
Banner only visible to non members - fixed
Admin looping - fixed
Mark Forums Read - fixed
Banner not showing - fixed
Now just need a little help with the CURRENT error

Quote:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /........../....../adv.php on line 34
No banner had been detected
?

Icehawk002 01-11-2006 11:34 AM

bump...


All times are GMT. The time now is 06:48 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.01330 seconds
  • Memory Usage 1,767KB
  • 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
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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