The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to use custom php in templates?
Okay,
I'm going to throw up this new thread because of this and I still have some other php scripts I want to use. Could someone inform me how to use custom php in vBulletin templates? Honestly, I've been searching a lot and I can't find a proper guide or explanation to it . |
#2
|
||||
|
||||
Er, your post does not really help us out much. Need to know what you are trying to do because there maybe a mod already created for what you are doing and you cannot just randomly stick PHP into the HTML templates without great difficulties.
|
#3
|
||||
|
||||
You can't use php in templates. Roughly said, templates contain HTML plus variables that vB fills in. PHP goes into plugins, which in turn can save their output into variables, which need to be properly registered and then can be accessed in templates.
|
#4
|
|||
|
|||
Hi,
thanks for the replies. I kind of got the idea how vBulletin works because of Scandal's work for me. I generally wanted to know how it would work to pull something out of the database and for example how to call it as {vb:raw example} on a page. |
#5
|
||||
|
||||
I'm not 100% sure but you would probably need a plugin at least for that. You have to have code to tell the database what it is pulling out and what to do with it, you can do that with PHP code and a plugin would probably be your best bet.
|
#6
|
||||
|
||||
You would also need to register the variable.
|
#7
|
||||
|
||||
Yeah pretty much what I thought. Its more complicated than just calling one thing.
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|