![]() |
does php work in templates
i need to add a php script into one of my templates does it work? or how can i make it work?
|
You cannot add php to templates. You add the php to plugins and then put the output into the templates via a variable.
|
urrm tht made no sense haha
could you help i need to put this in there Code:
<?php |
Which template?
You'd put something like this into a plugin (hook depends on template) : PHP Code:
global_start works for a lot of the templates if they use global scope and aren't evaluated before this hook. |
i have no clue what you just said, basically i need that code to work in this template
Code:
$stylevar[htmldoctype] If you can help it would be great |
If it's a new page, then you don't need to put code in a plugin. You put the php code into your page that you just created. It's php which goes into the php page.
|
Quote:
i followed that guide you gave me. and ive made the .php and linked it to the template... now what |
The article gives you the skeleton of what you need. You now enter your code under the are that says "START MAIN SCRIPT". And then the output from that should be a $variable and you put that $variable into your template.
If you look at a basic vbulletin page, you will see them do this. |
All times are GMT. The time now is 01:02 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|