![]() |
Having trouble adding a plugin
Hi,
I'm following the instructions found at the following link to add a plugin to my forum. http://www.vbulletin.com/forum/showthread.php?t=173937 I'm trying to add the current poll script found at the following link to the side bar. http://www.joedolson.com/poll-v2/ I have used the following code in the plugin php code box: Code:
ob_start(); Code:
$currentpoll Here are the contents of currentpoll.php (the file being included in the plugin code) Code:
<?php Any ideas? Could there be a conflict with using the the settings within mysql_connect.php which use the same settings as vbulletin? I don't think there is because the variable names are different but figured I'd ask. TIA, Scott |
Try forcing the includes to use the correct directory:
Example. Use: PHP Code:
PHP Code:
|
Quote:
directory structure is (just in case there's any confusion): /root/poll /root/vbulletin I used ../poll/poll.php and I don't get any errors but I also don't get the poll to display. I'll keep working on it but any more ideas would be appreciated. Thanks, Scott --------------- Added [DATE]1219161740[/DATE] at [TIME]1219161740[/TIME] --------------- Check that, got it working! I switched the hook during trouble shooting from "global_start" to "forum_complete" and forgot to switch it back. Thanks for the help! |
When the plugin is executed it will have the vBulletin installation directory as current directory. Including a file in another directory (include('../poll/currentpoll.php');) does not chdir() to that directory, so the included script will still be running "from" the vB directory. So if your script includes "poll.php" first the current working directory (ie. your vB installation directory) will be searched first for the a script with this name and it will find the vBulletin poll.php file.
|
All times are GMT. The time now is 08:49 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|