The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
One script changes the default database
I recently added phpadsnew to my header to display a banner ad on every page. As a result of adding this script, my shoutbox module stopped working.
The problem seems to be that after the banner ad script executes, it leaves the default database as "bannerads" instead of "forum" (my VBB default). I'm fairly new to VBB/PHP, so this may seem like an easy question, but how can I do a "USE FORUM" SQL command just after the banner ads script executes? Any help would be appreciated. |
#2
|
|||
|
|||
You will need to select the vBulletin database after the code for the advert script is done.
http://us4.php.net/manual/en/functio...-select-db.php Thats the php function you will need. If you are working with a page that includes vbulletin's global.php you would use this instead: PHP Code:
PHP Code:
|
#3
|
|||
|
|||
Brad,
Thank you very much for helping, no one else has suggested this. Do I add that code to the header template or into the phpadsnew script that is listed in my php_include_start file? Thanks. |
#4
|
|||
|
|||
It would go in the php script.
You should try adding this to the very bottom of the file right before the ?> PHP Code:
|
#5
|
|||
|
|||
Brad,
Thank you very much for your help. Your suggestion worked like a charm. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|