The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Hi,
I created a plug-in to rotate a couple of ads as so, and named the file http://myforum.com/ads.php. Code:
<?
$r_i=rand(0,1);
if ($r_i == 0)
{
echo "ad 1";
}
else
{
echo "ad 2";
}
?>
Code:
ob_start();
include('http://myforum/ads.php');
$myads = ob_get_contents();
ob_end_clean();
But when I access the code in the navbar template using $myads, no html shows up. Any idea why? We're on 3.8.4 |
|
#2
|
||||
|
||||
|
What hook location are you using for your plugin?
|
|
#3
|
|||
|
|||
|
I'm using global_start
The plug-in is active and the execution order is 5 Also, I tried both $myads and $GLOBAL[myads] and nothing happens. The forum loads fine, but the php file is not getting included. --------------- Added [DATE]1311973683[/DATE] at [TIME]1311973683[/TIME] --------------- OK, the file include wasn't working so I put the code into variables in the plug-in editor box and it works that way. |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|