PDA

View Full Version : postbit_legacy and phpinclude_start variables


MattMelvin
02-01-2005, 04:15 AM
Is it possible to reference a variable initialized in phpinclude_start in the postbit_legacy template? I have a variable set up in phpinclude_start that grabs code from an outside page (advertisement stuff) and will be used to display under the first post of every thread. I can reference teh code just fine in the header, but if I reference the code in postbit_legacy, I get nothing. Any ideas? Work arounds?

Xenon
02-02-2005, 03:41 PM
you have to globalize that variable in the construct_postbit function

another way is a little trick, you can use the superglobals to help you out

speak in php_include you have
$GLOBALS['myvar'] = 'my content';

and then you can use in postbit:
This is $GLOBALS[myvar]

i use that trick sometimes myself :)