PDA

View Full Version : Add-On Releases - NJAquaman - Custom Template Global Variables


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
-----

cory_booth
01-06-2010, 09:19 PM
I think a lot of your recent "plugins" belong in the Forum under VB4 Programming.

IMO... No offense...

Dr.osamA
01-07-2010, 07:01 AM
Any demo plzz

or pic
tagged
thanxx

NJAquaman
01-07-2010, 11:01 AM
I think a lot of your recent "plugins" belong in the Forum under VB4 Programming.

IMO... No offense...

Most Likely , i Just want people to use such simple code and not all the big Products. Its cleaner , simple code ,and people can understand how it works!

thank you for your interest Cory!