The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
How to Add PHP Code within vB Templates System?
Hello.
I would like to add a few lines of PHP code into my templates/styles in vB, within the admin panel. How can I do this? |
#2
|
||||
|
||||
You don't add php to the templates. You add php to a plugin which adds it to the page.
|
#3
|
|||
|
|||
Why can I not add PHP to a page template? For example, I want to add PHP code to in the ad templates..
So I can make a plugin with PHP code in it? Then how would I put the plugin in the template? |
#4
|
||||
|
||||
Templates are for html, plugins are for php. However, if you really want to add php to a template, you may put it in a file and then include the external file in the template. See this - Including External Files
|
#5
|
|||
|
|||
Quote:
I just want to basically put PHP in a template..using different advertising system, please help.. |
#6
|
||||
|
||||
If im right, you can just go to Plugins > Create New Plugin and enetr your php code.. then enter a title like custom_fld (or whatever you want) and then go to your templates and enter $custom_fld or whatever you put in. And it should be there. BUT be careful, it can cause errors if you dont know what your doing!
|
#7
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|