PDA

View Full Version : Can I insert PHP into styles and templates?


ApplePro
06 Oct 2007, 18:11
Hello guys,

I'm creating new style for my site. I wonder is it possible to insert PHP code into templates? I've tried to use <? ?>, but it doesn't work.

Zachery
06 Oct 2007, 18:12
No, not directly.

You might want to checkout the plugin system though.

ApplePro
06 Oct 2007, 18:15
No, not directly.

You might want to checkout the plugin system though.
Thanks for quick reply. Do you mean I should use just one plugin to enables <? ?> inserts or do you mean I should use plugins each time I want to insert PHP code (use plugin instead of PHP code)?

Zachery
06 Oct 2007, 18:23
Lets start with the basics here, you _cannot_ write php into the vBulletin templates, period.


I said you might want to checkout the plugin system, as in see how it works, chances are it will work for you.

All you have to do is write your php code



Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------



Into a plugin like global start, then in the header template you could put $test and it will display.

ApplePro
06 Oct 2007, 18:30
Thanks. I will learn plugins system.

Coders Shack
06 Oct 2007, 19:31
its possible to make a plugin that would let you :D

but it would be a waste of time..

ApplePro
06 Oct 2007, 20:33
its possible to make a plugin that would let you :D

but it would be a waste of time..
Why?