PDA

View Full Version : Style variables


srcnix
07-16-2007, 12:35 PM
Is there a specific location where I can define some style variables where any template can have access to them?

For example:

$layout_img = 'http://www.url.com/images/';

Basically There are a lot more features to the site I am developing compared to the Forum. For example I need the menu to be easily editable and therefore it is stored in a separate file. I'd like to be able to include that file within the forum and use the variables defined within that file. For example $img_url and what not.

Is this possible?

If the use of variables isn't possible I can use the replacement variables. But I really need to be able to include files.

Kirk Y
07-17-2007, 02:51 PM
Create a new plugin at hook location "global_start" with the following, edited for your needs of course:
ob_start();
include('/path/to/file/');
$yourvariable = ob_get_contents();
ob_end_clean();