Yup, the ubbt_registerednav.tmpl file would be called before the variables are generated
You could move that piece of script to the top of the ubbthreads.php file -it wouldn't be in the menu, but at least it would be up at the top of the page...
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.