Log in

View Full Version : How to include a php file for ad rotator?


cionfs
10-08-2011, 09:53 AM
Hi!
I've a problem to include a php file in my postbit_legacy.

I follow this -> https://www.vbulletin.com/docs/html/templates_externalfiles

I create a Plug-in for global_start with these contents:


ob_start();
include('/var/www/vhosts/domain.ext/httpdocs/adrotator/adrotator.php');
$adrotator = ob_get_contents();
ob_end_clean();

The file is under adrotator/adrotator.php but when I insert this


$adrotator


It not appear.

Have you any suggestion?

PS: sorry for my bad english.

PSS: I use vBulletin 3.8.7

kh99
10-08-2011, 10:10 AM
In the postbit_legacy template, try using $GLOBALS[adrotator]. (Also make sure you are using the same style that you're editing).

cionfs
10-08-2011, 10:11 AM
I've changed global_start with postbit_display_start and it works.

In the postbit_legacy template, try using $GLOBALS[adrotator]. (Also make sure you are using the same style that you're editing).

Thank you. It works with this solution too. :)