Will.Spencer
03-13-2009, 07:59 PM
I have a small PHP program, http://www.netbuilders.org/showlinks.php, which acts as a link rotator.
I want to include it in my vBulletin templates, so I created a plugin called showlinks.
I used global_start as the hook location and used this as my plugin PHP code:
ob_start();
include('/usr/local/www/data/netbuilders.org/showlinks.php');
$nblinks = ob_get_contents();
ob_end_clean();
When I enable the plugin, the forum stops working. It will only display a blank white screen until I disable the plugin again. :(
I have read these two documents and they are not providing me with any usable clues:
http://www.vbulletin.com/docs/html/templates_externalfiles
http://www.vbulletin.com/forum/showthread.php?p=1066718
Has anyone seen vBulletin do this before?
When the whitescreen behavior is occurring, this error message fills my Apache logs: "PHP Fatal error: Call to a member function query_read_slave() on a non-object in /usr/local/www/data/netbuilders.org/includes/functions.php on line 4819."
The code around line 4819 is:
$ismod_all = $vbulletin->db->query_read_slave("
SELECT forumid, moderatorid, permissions, permissions2
FROM " . TABLE_PREFIX . "moderator
WHERE userid = $userid" . (!$issupermod ? ' AND forumid != -1' : '')
);
Any ideas?
I want to include it in my vBulletin templates, so I created a plugin called showlinks.
I used global_start as the hook location and used this as my plugin PHP code:
ob_start();
include('/usr/local/www/data/netbuilders.org/showlinks.php');
$nblinks = ob_get_contents();
ob_end_clean();
When I enable the plugin, the forum stops working. It will only display a blank white screen until I disable the plugin again. :(
I have read these two documents and they are not providing me with any usable clues:
http://www.vbulletin.com/docs/html/templates_externalfiles
http://www.vbulletin.com/forum/showthread.php?p=1066718
Has anyone seen vBulletin do this before?
When the whitescreen behavior is occurring, this error message fills my Apache logs: "PHP Fatal error: Call to a member function query_read_slave() on a non-object in /usr/local/www/data/netbuilders.org/includes/functions.php on line 4819."
The code around line 4819 is:
$ismod_all = $vbulletin->db->query_read_slave("
SELECT forumid, moderatorid, permissions, permissions2
FROM " . TABLE_PREFIX . "moderator
WHERE userid = $userid" . (!$issupermod ? ' AND forumid != -1' : '')
);
Any ideas?