Register Members List Search Today's Posts Mark Forums Read

Mod Options
Let PHP Live! (Allow PHP code in templates) Details »
Let PHP Live! (Allow PHP code in templates)
Mod Version: 1.00, by King Internet (Member) King Internet is offline
Developer Last Online: Jul 2011 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.6.0 Rating: (6 votes - 4.67 average) Installs: 75
Released: 16 Aug 2006 Last Update: 16 Aug 2006 Downloads: 358
Not Supported Uses Plugins Template Edits  

I got frustrated that the vBulletin template system limited me in this way so... I wrote a hack around it.

Just use <? <?php <?= as you would normally in the templates.

I'd like to see PHP based templates in the future, vBulletin! <if> is useless if I can just type <? if ?> !

Things to Remember

You cannot break up PHP blocks.

<? if (0): ?>
<? endif ?>

will not work, and you'll get a nice error message about how it didn't. If it's really a concern for anyone, I can try to get it working. In my opinion, that's not a big deal. I think PHP support sans breaking up blocks in 10 lines of hack code is pretty nice, myself.

That's a limitation of eval anyway

Variables aren't always the same in PHP mode!

While you can use $vboptions[bbtitle] in your main code and get it working, vBulletin is doing behind the scenes voodoo on stuff.

To access $vboptions[x]: $GLOBALS['vbulletin']->options['x']

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
BB Code Enhancements MLG Live Event BB Code fattony69 vBulletin 3.7 Template Modifications 0 13 Jul 2008 03:41
BB Code Enhancements Live Video Embed BB Code InTeNsE-HuMoR vBulletin 3.6 Add-ons 4 13 Jun 2007 17:23

Old 08 Sep 2007, 19:45
Millenium IT's Avatar
Millenium IT Millenium IT is offline
Join Date: Nov 2006
I would not advise you to use php in your templates. The vBulletin plugin/hook alocation system is not only much easier on a global scale, but also much more reliable and secure. Mixing php in your templates could cause difficulties or problems in your forum script as you go along.
Reply With Quote
Old 08 Sep 2007, 23:15
Cole2026 Cole2026 is offline
Join Date: Feb 2004
Real name: Cole
I would be curious to know how much time this would add to a page's processing time.
Reply With Quote
Old 22 Dec 2007, 14:43
CrazyCanuck CrazyCanuck is offline
Join Date: Dec 2007
thanks for this addon
Reply With Quote
Old 22 Dec 2007, 15:23
odonel odonel is offline
Join Date: Sep 2006
I understand where VB is coming from in regard to some threats pose to forums with php codes but a lot of us users want to add custom code to our forums and VB is aware of that.
This is one thing VB lacks, integration with an external page. Why not give us easier ways to do these sort of things VB ?? tips/guides templates anything.........

thanx for this addon i will play with it to see if i can use it
Reply With Quote
Old 12 Jun 2008, 19:11
DonHouston DonHouston is offline
Join Date: Aug 2006
thanks alot, exactly what i was looking for!
Reply With Quote
Old 28 Aug 2008, 18:25
Freddy.k's Avatar
Freddy.k Freddy.k is offline
Join Date: Mar 2008
Merci cool
Reply With Quote
Old 30 Sep 2008, 11:25
Hitterman's Avatar
Hitterman Hitterman is offline
Join Date: May 2008
Real name: Anand
Its really awesomeeeeeee.e
Great work. really nice.
"Installed" & "Nominated" because it works with 3.7.x also.
Reply With Quote
Old 18 Jun 2009, 14:42
GNeRaL GNeRaL is offline
Join Date: Nov 2006
Real name: Muhsin Issever
Great work, thanks!

To access $vboptions[x]: $GLOBALS['vbulletin']->options['x']

I've one question, I want to use postid with PHP. How to use?

And can you explain ?

Thanks for your answer.
Sanma şahım, herkesi sen sadıkane yr olur,
Herkesi sen dost mu sandın, belki ol ağyar olur,
ne, belki ol cihna serdar olur,
Yr olur, ağy
r olur, serdr olur, dildr olur.

Read from left to right. Then read the bolds from up to down.
Yavuz Sultan Selim
9th Sultan of the Ottoman

Reply With Quote
Old 14 Sep 2009, 17:31
angeljs's Avatar
angeljs angeljs is offline
Join Date: Aug 2005
Real name: Angela
This is so cool, and works great, thanks
Reply With Quote
Old 24 Jan 2010, 12:07
Spinball's Avatar
Spinball Spinball is offline
Join Date: Feb 2002
Just a note to say that a Russian hacker used this plugin to point Google to a Canadian Pharmacy store when it visited our home page.
__________________ the UK's largest audio visual home consumer electronics forums. Now using Xenforo because vB5 is not suitable for large forums and vB3 and vB4 are no longer being developed.
Reply With Quote
Old 28 Jun 2011, 10:55
sapgaurav sapgaurav is offline
Join Date: Apr 2009
i just install and tried to add php code but now working. do i need to do someting else to run php code?

can you give me example php to to test
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

New To Site? Need Help?

All times are GMT. The time now is 02:16.

Layout Options | Width: Wide Color: