The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Problem with use of plugins and variables
Hello,
i wanted to include a file inside a custom template (but the problem is for any variable defined in a plugins that i want to use in a custom template) vB version 4.1.9. i created a new plugins called google_analytics with hooklocation global_start that's the code of the plugins: Code:
ob_start(); include("../google_forum.inc.php"); $google_analytics = ob_get_contents(); ob_end_clean(); echo "pippo"; echo date("Y"); then i put in my global.php the following line Code:
vB_Template::preRegister('footer',array('google_analytics ' => $google_analytics)); Code:
{vb:raw google_analytics} now the questions are: should i use the preRegister method to have the variables correctly addressed in my templates???? where to put this code (i mean the vBTemplate........et...etc...) cause anytime i ugrade the version i overwrite almost all files such as global.php for example?? why if i comment out the line in the global.php for variable registration and i delete the declaration of the variable in my template i get always at the beginning of my html source code (and never in the place where i put the variable in the template) "pippo2011"???? Thank you and Regards Franco |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|