I'm using this and it works, only I want to pass a variable (GLOBALS.foruminfo.title_clean) from my template to my PHP script.
I am attempting to pass the current Forum title and with my own PHP generate CSS to have a specific image for that forum in the background.
My Plugin code:
Code:
ob_start();
$stringPath = "/var/www/vhosts/***/httpdocs/includes/getForumImage.php";
$PageTitle = $GLOBALS.foruminfo.title_clean;
require_once($stringPath);
$php_include = ob_get_contents();
ob_end_clean();
vB_Template::preRegister('headinclude',array('php_include' => $php_include));
My problem is that $PageTitle = $GLOBALS.foruminfo.title_clean; doesn't populate in this place, I need to populate it in the template 'headinclude' any ideas?
--------------- Added [DATE]1299018239[/DATE] at [TIME]1299018239[/TIME] ---------------
figured it out, didnt have to use the global variable - just used foruminfo[title_clean] which worked instead.