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
[Adv] banners Hack Details »»
[Adv] banners Hack
Version: 1.1, by Creative Suite Creative Suite is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.0.5 Rating:
Released: 01-05-2005 Last Update: 01-08-2005 Installs: 82
DB Changes
 
No support by the author.

what it does ?

This hack allows the administrators to add banners in forumhome or forums or threads ! [ can choose any , or all ]

INSTALLATION

This Hack is tested and working on vb 3.0.4 but should work on ALL 3.x.x versions as well.
Please read the installation-English.txt file in the package CAREFULLY for installation instructions

SUPPORT

well I honestly cannot promise you to solve all-hack problems but I will try to do my best answering your questions and solving the problems I could solve , I also welcome all suggestion .

enjoy : )
Creative Suite
www.Montadiat.com

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #202  
Old 11-05-2005, 07:53 PM
Pain86 Pain86 is offline
 
Join Date: Mar 2005
Posts: 87
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!?!?
Reply With Quote
  #203  
Old 11-07-2005, 03:46 AM
mayhemmike mayhemmike is offline
 
Join Date: Feb 2005
Posts: 5
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #204  
Old 12-13-2005, 08:50 PM
jamiepryer@hotm jamiepryer@hotm is offline
 
Join Date: Jan 2005
Location: Hove - UK
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #205  
Old 01-01-2006, 09:57 AM
Icehawk002's Avatar
Icehawk002 Icehawk002 is offline
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #206  
Old 01-01-2006, 03:00 PM
Icehawk002's Avatar
Icehawk002 Icehawk002 is offline
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #207  
Old 01-05-2006, 08:33 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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"); 
Reply With Quote
  #208  
Old 01-05-2006, 09:04 PM
Icehawk002's Avatar
Icehawk002 Icehawk002 is offline
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Paul I tried that but no luck
Reply With Quote
  #209  
Old 01-05-2006, 10:37 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Icehawk002
Thanks Paul I tried that but no luck
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]*%' ");

Reply With Quote
  #210  
Old 01-05-2006, 11:08 PM
Icehawk002's Avatar
Icehawk002 Icehawk002 is offline
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
?
Reply With Quote
  #211  
Old 01-11-2006, 11:34 AM
Icehawk002's Avatar
Icehawk002 Icehawk002 is offline
 
Join Date: Jun 2005
Location: United Kingdom
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump...
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 08:41 PM.


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.04908 seconds
  • Memory Usage 2,337KB
  • 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
  • (2)bbcode_code
  • (2)bbcode_php
  • (6)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
  • (3)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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