View Full Version : Can I insert PHP into styles and templates?
ApplePro
10-06-2007, 04:11 PM
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
10-06-2007, 04:12 PM
No, not directly.
You might want to checkout the plugin system though.
ApplePro
10-06-2007, 04:15 PM
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
10-06-2007, 04:23 PM
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
$test = "Hello $vbulletin->userinfo[username]"
Into a plugin like global start, then in the header template you could put $test and it will display.
ApplePro
10-06-2007, 04:30 PM
Thanks. I will learn plugins system.
Coders Shack
10-06-2007, 05:31 PM
its possible to make a plugin that would let you :D
but it would be a waste of time..
ApplePro
10-06-2007, 06:33 PM
its possible to make a plugin that would let you :D
but it would be a waste of time..
Why?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.