The Arcive of vBulletin Modifications Site. |
|
|
#1
|
|||
|
|||
|
Can some one fix this for vBulletin please. It seems to work on a normal website, but not in vBulletin Style Manager.... It's a code that shows adsense only to people that come to my site through search engines.
Code:
<?
if (preg_match('/^http:\/\/(\w+\.)?(google|msn|yahoo|aol)\./',$_SERVER['HTTP_REFERER']) == 1)
{
?>
<!-- Google AdSense HTML -->
<?
}
?>
|
|
#2
|
||||
|
||||
|
Templates cannot contain raw PHP code, use this instead:
Code:
<if condition="preg_match('/^http:\/\/(\w+\.)?(google|msn|yahoo|aol)\./',$_SERVER['HTTP_REFERER']) == 1"><!-- Google AdSense HTML --></if>
|
|
#3
|
|||
|
|||
|
Quote:
preg_match is not allowed..... 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() |
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|