I didn't realize that code placed in these textboxes (screencap below) were within the smarty templates.
So, is it still OK to have PHP in the "Default Header" field? If so, that will still be useful.
I guess it is still is ok to have php there -
But you are trying to communicate between the two. That's ultimately where I believe you are being blocked at. Especially after reading:
Wouldn't the static class be globally available during the entire request?
How can I create a globally-available class for inserting some custom code?
If your custom code worked in the old UBB.threads 7.5.x or 7.6.x, but not in UBB.threads 7.7.x, then its 100% related to Smarty 3.1 security.