The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Hi there,
I included several hacks on my index_homepage.php3 which is a non-vB page outside the vB directory: Who's online on non-vB page http://vbulletin.com/forum/showthrea...threadid=12010 Last XX Posts on non-vB page http://vbulletin.com/forum/showthrea...threadid=12324 Total Posts on a non-vbb page http://vbulletin.com/forum/showthrea...threadid=24226 Total Threads on a non-vbb page http://vbulletin.com/forum/showthrea...threadid=24227 All work fine, I got all problems like "cannot include global.php3" and "cannot add more header informations" solved with the great help of this community. Now I came to this error: Fatal error: Cannot redeclare class db_sql_vb in ./admin/db_mysql.php3 on line 7 when I try to include the following hacks in that page: Show Events on non-vb page http://vbulletin.com/forum/showthrea...ghlight=events Homepage Login on non-vB page http://vbulletin.com/forum/showthrea...threadid=23524 Ok, I can roughly imagine what happened but cannot solve the problem. The hacks work fine on a single page but I cannot include them in the page where the other hacks are included. What do I have to change/delete in the last hacks to make them run properly? As always - many thanks for your help and best regards, Markus |
#2
|
|||
|
|||
Im guessing, its simply as you include these hacks, they incude certain files, ie functions.php
or something, and as a second one trys to call it, they fail. Have a look thru your files, and make sure global.php(3 in your case) is only called _once_. Thats really the only file it should be calling. |
#3
|
||||
|
||||
Change all the include() statements to include_once() statements.
|
#4
|
|||
|
|||
Quote:
thank you for your quick help but it didn't solve my problem. I exchanged all require() and include() to include_once() but the error still occurs: Fatal error: Cannot redeclare class db_sql_vb in ./admin/db_mysql.php3 on line 7 I guess, it has something to do with those two hacks and with the $DB_site in it. NUMBER OF POSTS AND THREADS on non-vB page PHP Code:
CALENDAR EVENTS on non-vB page PHP Code:
Where is the problem and what would be an easy work around for it? Thank you!!! Markus |
#5
|
||||
|
||||
Change
PHP Code:
PHP Code:
|
#6
|
||||
|
||||
Also, in the script, change .php3 to .php for include_once and the db class name.
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|