The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Show ads based on URL (HTTP vs HTTPS)
I would like to deliver less (or no) ads to people who use the SSL version of the site. How would I program that into my headers, so if a person requests/views the page with https://my.forum.com they don't see ads?
I know there's something with an IF statement, but I can't seem to get it right. Thanks! |
#2
|
||||
|
||||
PHP Code:
|
#3
|
|||
|
|||
Quote:
Quote:
PHP Code:
|
#4
|
||||
|
||||
You cannot directly put that into a template - it is not a template conditional...
Code:
<if condition="empty($_SERVER['HTTPS']) === false"> |
#5
|
|||
|
|||
Quote:
the basic structure I did was: <if statement> : codes for ads : <else /> rest of template (footer in this case) </if> (at end of footer template). |
#6
|
||||
|
||||
Code:
<if condition="empty($_SERVER['HTTPS']) === true OR $_SERVER['HTTPS'] === 'off'"> |
#7
|
|||
|
|||
That worked! Thank you very much!!
|
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|