PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Jonathas Rodrigues  >  Random Banner  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: showing how to use the class
Class: Random Banner
Shows random image or Flash banners from a list
Author: By
Last change:
Date: 8 years ago
Size: 1,290 bytes


Class file image Download

require_once "RandomBanner.php";

$bannertop = new RandomBanner();

/* Parameters: $content,$link="nothing",$type="img",$pos="top"
 * To insert a Flash Banner, it's not necessary to set the link here,
 * as it's set in the Flash file itself.
 * You need to tell the method that the file is a Flash file,
 * setting anything other than "img" in the type parameter.
 * It can be anything. I wrote "flash" down here, so it's a better example.
 * If no position is specified for the Flash Banner, it's understood that it's a top Banner,
 * and it'll be generated with top Banner's width and height.
 * When you insert a Flash Banner in the sidebar, after the "type" parameter,
 * you have to write anything other than "top", so it'll be understood that's not a top Flash Banner,
 * but a sidebar Flash Banner, and it'll be generated with sidebar Banner's width and height.
 * Below, there's an example of how to set Flash and some images as Banners: