Register Members List Search Today's Posts Mark Forums Read

Reply
 
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: 74
Released: 16 Aug 2006 Last Update: 16 Aug 2006 Downloads: 337
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): ?>
Hello!!!
<? 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 04:41
BB Code Enhancements Live Video Embed BB Code InTeNsE-HuMoR vBulletin 3.6 Add-ons 4 13 Jun 2007 18:23

  #31  
Old 08 Sep 2007, 20: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
  #32  
Old 09 Sep 2007, 00: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
  #33  
Old 22 Dec 2007, 15:43
CrazyCanuck CrazyCanuck is offline
 
Join Date: Dec 2007
thanks for this addon
Reply With Quote
  #34  
Old 22 Dec 2007, 16: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
  #35  
Old 12 Jun 2008, 20:11
DonHouston DonHouston is offline
 
Join Date: Aug 2006
thanks alot, exactly what i was looking for!
Reply With Quote
  #36  
Old 28 Aug 2008, 19:25
Freddy.k's Avatar
Freddy.k Freddy.k is offline
 
Join Date: Mar 2008
Merci cool
Reply With Quote
  #37  
Old 30 Sep 2008, 12:25
Hitterman's Avatar
Hitterman Hitterman is offline
 
Join Date: May 2008
Location: Tutorialistic.net
Real name: Anand
Its really awesomeeeeeee.e
Great work. really nice.
Hurray!!!!!!!!!!!
"Installed" & "Nominated" because it works with 3.7.x also.
Reply With Quote
  #38  
Old 18 Jun 2009, 15: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.
__________________
http://static.flickr.com/40/119807106_84d6008a11.jpg
Sanma şahım, herkesi sen sadıkane yr olur,
Herkesi sen dost mu sandın, belki ol ağyar olur,
Sadık
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
  #39  
Old 14 Sep 2009, 18: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
  #40  
Old 24 Jan 2010, 13: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.
__________________
AVForums.com 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
  #41  
Old 28 Jun 2011, 11: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
Reply


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 14:35.

Layout Options | Width: Wide Color: