The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Declaring variables within a template
I can't seem to declare a variable within a template.
If I wanted to say $name="Bob" in a template, how would I go about it? Sorry all, I am a newbie at coding but everybody has to start somewhere |
#2
|
||||
|
||||
You cannot use php within a template. If you want to declare a variable to be used in a template, you need to add a plugin that uses a hook within that php page. The hook you use depends on where you want to use that variable. If you give us a bit more information on what you want to do, we may be able to make suggestions on which hook to use.
|
#3
|
|||
|
|||
I am trying to build the famous "multiple sites with common forum",
and I am soooo close to success... What I am trying to do is change the url of the last post within a certain forum (forum #35) in forumhome_lastpostby Basically, I am trying to say - if $forumid = '35' then $urll = "site2.com" else $urll = "site1.com" ($urll is the variable) And I know nothing about plugin and hook... LOL --------------- Added [DATE]1202597443[/DATE] at [TIME]1202597443[/TIME] --------------- After investigating the plugin and hook system, I have written the proper code to make this work. Thank you Lynne for getting me going in the right direction. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|