The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I've seen the link to the functions you can run, using the < if condition> tags, etc.
i saw somethign about a plugin (i was confused on that) I don't see / understand how you do this? I run this little code on all my pages, as i want to track how they got to my pages [[ yes, i use other log analyzers, other track analytic software, but i have a specific reason why i need this too]] so I do get how i could use the if condidtion tags to do this? i can't call the script / include it -- as i loose the refer data. i'm pretty sure i need to run it ASAP as the visitor lands on the page. Code:
session_start(); if (empty($_SESSION['vREFERER'])) { $vREFERER = $_SERVER['HTTP_REFERER']; session_register('vREFERER'); } THANKS |
#2
|
||||
|
||||
![]()
As you've found out, raw PHP cannot be run inside templates. PHP must be run in plugins.
The Plugin Manager |
#3
|
||||
|
||||
![]()
You can use PHP, but the template manager restricts what PHP you can use to these functions:
http://www.vbulletin.com/docs/html/f...n_conditionals If you need something other than that, you'll have to do what Dismounted said and use a plugin. |
#4
|
||||
|
||||
![]()
That PHP is only allowed in conditionals, and no where else.
|
#5
|
|||
|
|||
![]()
so i can't do this:
Code:
<if condition="session_start()"> if (empty($_SESSION['vREFERER'])) { $vREFERER = $_SERVER['HTTP_REFERER']; session_register('vREFERER'); } </if> ![]() |
#6
|
||||
|
||||
![]()
No, you can't do that. You must add a plugin to do what you want - I have already posted a link to the manual. Read it.
|
#7
|
||||
|
||||
![]()
You can do this...
Code:
<if condition="empty($_SESSION['vREFERER'])"> Referrer: $_SERVER['HTTP_REFERER'] </if> |
#8
|
||||
|
||||
![]()
That wouldn't work - the quotes would fail. Also, I don't know if you can access superglobals in templates directly (they may be cleared, or it might be at some other point, I don't remember).
|
#9
|
|||
|
|||
![]()
You should take a look at the plugin section of the vBulletin manual to check out plugins and how they work. The architecture is a little strange at first but once you figure out the order, you can do a lot with it, including what you are trying to do I think.
http://www.vbulletin.com/docs/html/main/plugin_system |
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|