phpAdsNew  Home 

 

 

 

  4.3 Other Parameters  

 

Besides the what parameter which you can use to determine which banner are displayed, there are more parameters which can influence which banners are displayed and how they are displayed. Below you will find a list of all other possible parameters.

 
  
  4.3.1 The clientid parameter  

 


The optional argument clientid allows you to retrieve only banners by a specific client. Specify "" to view banners from all clients (in case you need the third or fourth argument, else don't specify it at all).

view("468x60", 1);

 

 
  
  4.3.2 The target parameter 

 


The optional argument "target" allow you to specify a frame target to be used when the user clicks on the ad. For example, use '_blank' to force a new browser window to open, '_top' to replace the current window (and break frames), etc. For more information about this parameter you can take a look at the target attribute in the HTML specification.

view("maingroup", 0, "_blank");

 

 
  
  4.3.3 The source parameter 

 


The optional argument "source" allows you to specify the name of the current page (for example: "main page" or "subpage1"). You can later add a display limitation use the admin interface to make sure the banner is only shown when the source parameter is equal to or is different from a specific value.
If you want to know more about Display limitations, please read Chapter 5.5 Display Limitations.

 

 
  
  4.3.4 The withtext parameter  

 


The optional argument withtext allows you to show a banner with its associated line of text below it (for example, "Support our sponsor" is a common line of text). The "withtext" parameter is turned off by default. If want to turn it on you should set this parameter to 1.

The withtext parameter will not work with normal remote invocation, but can be use with local mode, remote invocation with JavaScript and remote invocation for iframes. If you want to use this feature with iframes, you need to make sure the iframe is big enough to show the text below the banner.

view("maingroup", 0, "", 1);

 

 
  
  4.3.5 The context parameter 

 


The optional argument "context" is an array specifying banners to limit the search to or/and banners to be excluded from the search. It is an array containing as many associative arrays as you want. The key of the entries must either be "==" to denote a banner to which the search is limited to or "!=" to denote a banner to be excluded from the search. The value of an entry is a banner ID.

The context parameter will only work in local mode.

For example, to show the same randomly selected banner on the top and bottom of a page, you could use the following:

// Top of the page:
$id = view("main");

// Bottom of the page
$arr = array(
             array("==" => $id)
            );

view("main", 0, "", "", 1, $arr);

To make sure that the page does not show the same banner two times, you could use this:

// Top of the page:
$id = view("main");

// Bottom of the page
$arr = array(
             array("!=" => $id)
            );

view("main", 0, "", "", 1, $arr);

 

 
  
  4.3.6 The refresh parameter 

 


If you want to automatically refresh the selected banner you can specify the amount of seconds between each reload. This parameter will only work for Remote Invocation for iframes.

<iframe src='adframe.php?what=468x60&refresh=20'
framespacing='0' frameborder='no'></iframe>

 

 
  
  4.3.7 Some examples 

 
view(1);
  Displays the banner with the bannerID of 1.

view("html");
  Displays a randomly selected HTML banner

view("468x60", 0, "_blank");
  Displays a randomly selected banner with a width of 468 pixels
  and a height of 60 pixels. If user clicks on it, the target
  destination will be opened in a new window.

view("mybanners");
  Displays a randomly selected banner from the group
  "mybanners" (in other words: with that keyword).

view("", 0, "_blank", "Main");
  Displays a randomly selected banner which does not have
  a Deny for Source ACL on "Main"