I think the problem is that unless the variable is declared global (where it's set and where the template is eval'ed), it will be undefined and so will appear to be 0. That's a problem when doing what you're doing - you pretty much need to go in to the code to see what's going on, and find out where the template is eval'ed and where your hook is executed. In the case of postbit it looks like the template is used in includes/class_postbit.php in the function construct_postbit around line 304. I see that just above that is the "postbit_display_complete" hook, so probably the easiest thing would be to try using that hook.
|