The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
Simple question, but elusive to me. How would I define a new variable to be used in a template.
Say I wanted to use $aaron and have a new bit that would display "Aaron is AwesomE!" wherever I put that in my templates. In a similar vein, what if I wanted to use some PHP if/else to determine if a variable is set and if it is display it and if it is not, do not. An example of this would be in the postbit of my forum http://forums.livetheworship.com where I added $post[field7] (CD currently being played) to my postbit. I was trying to figure out how to test to see if a user set anything and if they did, display that variable and if they did not, then it would not display at all. Since I couldn't figure it out I had to settle on using (nothing) in my table for field7. Any ideas how to do these things. In Summary: 1. how Do I add a new bit and then use it in the template system? 2. How do I set a variable in PHP and then use it in the templates? Thanks. Aaron PS. If I can figure these simple things out, whole new worlds of mids will open up to me. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|