The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I've spent far too long using the search for terms like
"use php code" "php code vbulletin" ect. ect. This is a simple question and I'm sure it's a simple solution. How do I use php code in vB? |
#2
|
||||
|
||||
![]() Quote:
http://www.vbulletin.com/docs/html/m...ng_plugin_code Max |
#3
|
|||
|
|||
![]()
That link is the same stuff that I have been reading on a couple other sites.
here's what I've done so far. I've made a plugin and inserted my php code, I name this plugin "links".... I want to have it appear in FORUMHOME FORUMDISPLAY and SHOWTHREAD note** my php code is just advertisments and there are no variables involved. |
#4
|
||||
|
||||
![]()
Here - check this out.
This is one of my simple pluggins. It's just checking the $_Server environmental variables and assigning a value to $ssl to be evaluated in a template, any template. IMPORTANT - use the global_start hook location if you are going to need this to execute in multiple templates. PHP Code:
So, now in my headinlcude template - I do this... Code:
<if condition="$ssl == on"> <if condition="is_member_of($bbuserinfo, 55)"><!--change this to your subscriber group--> <else /> <meta http-equiv="refresh" content="5;url=http://www.yourdomain.com/subscribe.php"> </if> </if> Here's another maybe more basic example - lets call this pluggin "new_header" - it replaces the standard vB header template with my php template ![]() important: gobal start hook location PHP Code:
Code:
$new_header $spacer_open $_phpinclude_output ![]() |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|