[ Main Menu ] [ Extension Tools Menu ] [ Enterprise Edition Menu ]
<iBANNER> Tag


 
<iBANNER 
 
 
 
 
 
 
 
 
 
 
 

Usage

[DBNAME="Datasource name"] 
ADTABLE="advertisement table name" 
[LOGTABLE="logging table name"] 
[LOGIN="uid/pword"] 
[DATE=<false|true>]      (false) 
[TIME=<false|true>]      (false) 
[PAGE=<false|true>]      (false) 
[LOGPAGE="url"] 
[WIDTH=""] 
[HEIGHT=""] 
[IMGEXTRA="literal info to add to IMG tag"]   ( ) 
> 

iBANNER is used to display the banner. if logging is used (LOGPAGE) the link is a link to the page you specify, not the real link. If you click the link, you go to that page which is to contain iBANNERLOG, this logs the hit, and redirects to the real link from the table.  This forms an sql statement to select a row from an ad table based on the following: 
DATE between start and end date for ad if DATE=true 
TIME between start and end time for ad if TIME=true, TIME is stored as a fraction of a day (noon=.5) 
PAGE = page if PAGE = true 
- the matching entries have a weighted chance of being the randomly selected 
- the tag resolves to the link if LOGPAGE is not specified, and to the url?i_banner_id=id if the url is specified. 
- if LOGTABLE is specified, the fact that the ad was displayed is stored there 
- if WIDTH and HEIGHT are specified, then the IMGis formatted to that size 
IMGEXTRA could contain something like "border=0" or whatever you wish to be added to the IMG tag 

ADTABLE: 
int Banner_id identity NOT NULL, 
int weight NOT NULL default 1, 
varchar(128) link NOT NULL, 
varchar(128) image NOT NULL, 
datetime startdate NULL, 
datetime enddate NULL, 
datetime starttime NULL, 
datetime endtime NULL, 
varchar(128) page NULL 

LOGTABLE: 
int Banner_id NOT NULL, 
tinyint click NULL, null or 0 means ad shown, 1 means this was a clickthough (show and click takes two records) 
datetime timestamp NOT NULL default now, 
char(15) ip


iBANNER Example
Example Source Code
Top