The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
php include what am i doing wrong
ok so i read http://www.vbulletin.com/docs/html/t..._externalfiles
and i followed it and this is my plugin ob_start(); include('banners/showbanner.php'); $justinbanner = ob_get_contents(); ob_end_clean(); however im getting errors such as Fatal error: Call to a member function query_read_slave() on a non-object in /home/beta/public_html/index.php on line 394 any ideas? thanks |
#2
|
|||
|
|||
One idea would be to look at the showbanner.php file and see if $db->query_read_slave or $vbulletin->db->query_read_slave appears within a function. If so, globalize $db or $vbulletin near the beginning of the function:
Code:
global $db; global $vbulletin; |
#3
|
|||
|
|||
i figured it out... i had no idea that you couldnt do normal php mysql syntax... didnt know i had to use $db->query and what not.. after i converted the page to the vb syntax all worked fine
|
#4
|
||||
|
||||
It's called OOP (Object Orientated Programming). vBulletin's structure utilises the available OOP features in PHP 4. I suggest you have a read of what it's about.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|