Turns out that 'myheader' worked in the function. The problem was that 'myheader' contains references to vB's default header template (as '$header'), and that wasn't working within the function. To get around this, I have to manually call eval('$header = "' . fetch_template('header') . '";'); within the function.
This brings me to my new question: I have some plugin code in the global_start hook that works fine, unless I call it from within a function. How would I go about doing this?
|