![]() |
|
Mod Options |
![]() |
|||||||||||
Let PHP Live! (Allow PHP code in templates)
![]() Developer Last Online: Jul 2011 ![]() ![]() ![]() This modification is in the archives.
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
No members have liked this post.
|
![]() |
||||
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
|
||||
|
||||
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.
No members have liked this post.
|
#32
|
|||
|
|||
I would be curious to know how much time this would add to a page's processing time.
No members have liked this post.
|
#33
|
|||
|
|||
thanks for this addon
No members have liked this post.
|
#34
|
|||
|
|||
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 No members have liked this post.
|
#35
|
|||
|
|||
thanks alot, exactly what i was looking for!
No members have liked this post.
|
#37
|
||||
|
||||
Its really awesomeeeeeee.e
Great work. really nice. Hurray!!!!!!!!!!! "Installed" & "Nominated" because it works with 3.7.x also.
__________________
DOWN THE WICKET - A cricket Blog No members have liked this post.
|
#38
|
|||
|
|||
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 yâr olur, Herkesi sen dost mu sandın, belki ol ağyar olur, Sadıkâne, belki ol cihâna serdar olur, Yâr olur, ağyâr olur, serdâr olur, dildâr olur. Read from left to right. Then read the bolds from up to down. No members have liked this post.
|
#39
|
||||
|
||||
This is so cool, and works great, thanks
__________________
New Sims Forums - downloads, help and more! No members have liked this post.
|
#40
|
||||
|
||||
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. No members have liked this post.
|
#41
|
|||
|
|||
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 No members have liked this post.
|
![]() |
«
Previous Mod
|
Next Mod
»
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Mod Options | |
|
|
New To Site? | Need Help? |
All times are GMT. The time now is 14:35.