NJAquaman
01-05-2010, 10:00 PM
What: A Simple Plugin To Give you Global Custom Variable of Your Choice, in any template
of Your Choice! This will display a custom variable that you define. Great For Widgets !
WORKS WITH ..!!!
4.0.x
Browser Comparability (All Latest Versions);
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Install:
1) Navigate to ACP> Plugins & Products > Add New Plugin
2) Product : Vbulletin
Hook Location : global_start
Title : Global Weather Var
Execution Order : 5
3) Insert the Code;
$weather = ' Todays Weather Is Party Cloudy ';
$rain = ' Alot ';
$array = array('weather' => $weather,'rain' => $rain);
vB_Template::preRegister('vbcms_widget_weather', $array);
Notes:
- In the $array part is where you put the variable you are going to use in this format;
$array = array('weather' => $weather,'rain' => $rain); or
$array = array('weather' => $weather,'rain' => $rain, 'snow' => $snow); ect ect ...
- Next you need to define the Var and what will show up like this ;
$weather = ' Todays Weather Is Party Cloudy '; or/and
$rain = ' Alot of it'; ect ect ...
- Last you need to Define what template will use the code like this;
vB_Template:: preRegister('vbcms_widget_weather', $array);
("vbcms_widget_weather" is the template name)
-If you are going to put this in a widget create a custom temple before you start this
process and make the widget use the template you created.Then Put the Variables in the
Template.
4) Save
5) Put the {vb:var weather} and {vb:var rain} code in a the template of you choice to view.
DONT FORGET TO CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=232388)
__________________________________________
Change Log
-----
of Your Choice! This will display a custom variable that you define. Great For Widgets !
WORKS WITH ..!!!
4.0.x
Browser Comparability (All Latest Versions);
Internet Explorer
Firefox
Opera
Safari
Google Chrome
Install:
1) Navigate to ACP> Plugins & Products > Add New Plugin
2) Product : Vbulletin
Hook Location : global_start
Title : Global Weather Var
Execution Order : 5
3) Insert the Code;
$weather = ' Todays Weather Is Party Cloudy ';
$rain = ' Alot ';
$array = array('weather' => $weather,'rain' => $rain);
vB_Template::preRegister('vbcms_widget_weather', $array);
Notes:
- In the $array part is where you put the variable you are going to use in this format;
$array = array('weather' => $weather,'rain' => $rain); or
$array = array('weather' => $weather,'rain' => $rain, 'snow' => $snow); ect ect ...
- Next you need to define the Var and what will show up like this ;
$weather = ' Todays Weather Is Party Cloudy '; or/and
$rain = ' Alot of it'; ect ect ...
- Last you need to Define what template will use the code like this;
vB_Template:: preRegister('vbcms_widget_weather', $array);
("vbcms_widget_weather" is the template name)
-If you are going to put this in a widget create a custom temple before you start this
process and make the widget use the template you created.Then Put the Variables in the
Template.
4) Save
5) Put the {vb:var weather} and {vb:var rain} code in a the template of you choice to view.
DONT FORGET TO CLICK INSTALL (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=232388)
__________________________________________
Change Log
-----