ShowSection << | Content | >> ShowAd-2 |
ShowAd
The ShowAd Droplet takes a (hidden) section from your website and displays it in a sliding advertisement box.This way it is very simple to show an advertisement on any page of your website.
Suggested Name:
ShowAd
Droplet Code:
Parameters required:
section=(section_id)
Parameters optional:
-none-
Example Call:
[[showad?section=53]]
The parameter needed is the section id of the content you want to use as the advertisement.
How to show the advertisement only once:
Add the code below at the top of the Droplet code:
$cookie = "Droplet_".$section;
if (isset($_COOKIE[$cookie])) return ' ';
setcookie($cookie, '1', time()+60*60*24*7);
This way it will be shown once per 7 days. (time()+60*60*24*7 = 7 days)
How to get the section number: (thanks to Hans)
Open admin, pages, choose the page with the section you need
Then choose manage section and click the section you want
you will see a link in the browsers address bar like :
http://localhost/wb260/admin/pages/modify.php?page_id=40#65
the last number is the section (65 in this case - 40 is the page_id)
Submitted By: Ruud
ShowSection << | Content | >> ShowAd-2 |