The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
4 Referer sites
I need to put somthing like
if ( strpos($_SERVER['HTTP_REFERER'], 'www.x.') in my template What sould this do? well it would show somthing new for the users that camed from that referer can u help me translate that in vb template code? |
#2
|
||||
|
||||
Quote:
Put the code in...well the code, basically. Use in if conditional to display differential data in the html |
#3
|
||||
|
||||
You can put PHP code in if conditions, like this.
HTML Code:
<if condition="strpos($_SERVER['HTTP_REFERER'], 'www.x.') !== false"> <!-- show your content here //--> </if> |
#4
|
|||
|
|||
The following template conditional expression contains function calls:
<if condition="strpos($_SERVER['HTTP_REFERER'], 'www.x.') !== false"> Function Name Usage in Expression strpos strpos($_SERVER[\'HTTP_REFERER\'], \'x.\') With a few exceptions, function calls are not permitted in template conditional expressions. Please go back and re-write this expression. The following functions are allowed in template conditional expressions: in_array() is_array() is_numeric() isset() empty() defined() array() can_moderate() can_moderate_calendar() exec_switch_bg() is_browser() is_member_of() any other ideeas plzzz |
#5
|
||||
|
||||
In where you want to use this code? Forumhome?
|
#6
|
|||
|
|||
navbar
|
#7
|
||||
|
||||
Add a plugin to global_start template including these codes:
PHP Code:
HTML Code:
<if condition="$show['truereferrer']">your codes</if> |
#8
|
|||
|
|||
works flawless
10x a lot. Note 2 myself : When i get in turkey , gotta take u out for a beer . |
#9
|
||||
|
||||
You cannot use php functions that are not in the template safe functions list. I'm pretty sure strpos is not in the list.
|
#10
|
||||
|
||||
Quote:
Cheers! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|