phpAdsNew   Home  

 

 

 

  5.5 Display Limitations  

 

Display limitations are used by phpAdsNew to set additional requirements that must be met, before the banner will be displayed. These requirements differ very much from the requirements, such as keywords, which are specified at banner invocation. Display limitations are configured from the Admin interface. It is possible to specify multiple limitations per banner and it is even possible to use logical operators to create very specific situations in which de banner must be displayed.

The following limitations can be used: Client IP, Domain, User agent, Language, Weekday, Time and Source.

 
   
  5.5.1 Comparison expressions  

 


Each limitation can be set to 'is equal to' the user specified value or 'is different from' the user specified value. If the current value of the limitation and the user specified value meets the comparison it will evaluate to true. The banner will only be shown in all conditions evaluate to true.

 

 
   
  5.5.2 Logical operators  

 


It is possible to use logical operator to create very complex situation in which the banner is displayed.
If you use multiple conditions you can set a logical operator between each limitation. An logical operator can be either an OR operator or a AND operator.

true  AND true  = true             true  OR true  = true
true  AND false = false            true  OR false = true
false AND true  = false            false OR true  = true
false AND false = false            false OR false = false


OR operators have precedence over AND operators. This means all AND operators will be evaluated first. The resulting expression will only consist of OR operators, only one of the parts left need to evaluate to true in order for the total result to be true. The banner will only be shown if the result of all limitations evaluates to true, however this doesn't have to mean every limitation must be true.

false AND false OR true AND true OR false
(false AND false) OR (true AND true) OR false
false OR true OR false
true

false OR false AND true OR true AND false
false OR (false AND true) OR (true AND false)
false OR false OR false
false


For example:
If you want show a banner only during the business week during the evening, and during the weekend:

Weekday is equal to mo, th, we, tu, vr
AND Time is equal to 18:00, 19:00, 20:00, 21:00, 22:00, 23:00
OR Weekday is equal to sa, su

Let's take a closer look:

The first line (Weekday is equal to mo, th, we, tu, vr) only evaluates to true on monday to friday
The second line (Time is equal to 18.00 ...) only evaluates to true on evenings.
The third line only evalutes to true during the weekend.

Lets assume it is Wednesday, 21.00 hours, the banner should be displayed:

true AND true OR false
(true AND true) OR false
true OR false
true


Now lets assume it is Wednesday, 14.00 hours, the banner should not be displayed:

true AND false OR false
(true AND false) OR false
false OR false
false


And finally Saturday, 13.00 hours, the banner should be displayed:

false AND false OR true
(false AND false) OR true
false OR true
true


 
   
  5.5.3 Client IP  

 


If you want to target your banners for a specific IP range, you can use the Client IP condition. Each user connected to the internet has a unique IP address. IP addresses are not geographically distributed, but each ISP has been assigned a number of block. If you want to display a banner for users of a specific ISP, you could specify all blocks assigned to this ISP and allow or deny access to this banner.

There are two ways to specify a block of IP addresses: by providing the base IP and the net mask, or by using wildcard.

For example:
212.187.0.0/255.255.0.0 will match all IPs from 212.187.0.0 to 212.187.255.255
64.12.*.* will match all IPs from 64.12.0.0 to 64.12.255.255

 

 
   
  5.5.4 Domain  

 


This limitation type could be used for providing different types of banner for different nationalities. Most users do not only have an unique IP address assigned to them when they connect to the internet, but also a domain-name. The domain name usually is a human-readable version of the IP address, and usually includes the country suffix. For example: the user domain could look like: ipc3797d8d.dial.wxs.nl or ppp211-104-59-62.dialup.zonnet.nl or e156107.upc-e.chello.nl or……….

The Domain limitation can match a specific portion of the users domain. If you specify .nl as the limitation, you can deny or allow all users who are online in The Netherlands.

How can this be useful? If you own a website which targets different countries and a client want to show his banner in only one specific country, you could allow this banner to be displayed only from that specific country. The client could also provide you with the same banner translated in a whole lot of different languages. All you have to do is to specify the correct country suffix with each banner.

 

 
   
  5.5.5 Language  

 


The Domain limitation can be quite effective of targeting a specific banner in a specific geographical region. The Language limitation is a refinement of the limitation mentioned above. Every browser provides phpAdsNew with information about the default language of the browser. For example a browser in Germany will tell phpAdsNew that the default language of that specific browser is German. Of course you could use the Domain limitation to get the same information, but that doesn't apply in all cases. The Language limitation must be equal to or different from a specific code, identifying the desired language. A list of possible language codes is provided in Chapter 6.2

For example: Belgium, a small country in Western-Europe is bi-lingual. In some parts of Belgium people speak Dutch, in other parts people speak French. If you operate a website in Belgium, or another country which is bi-lingual, it isn't possible to determine which language is spoken by your visitors by using Domain limitation, since both languages are spoken in the same country. However if you use Language limitation you could target a banner for a specific language.

The Dutch version of the banner could only displayed be when the limitation is equal to nl-be, and the French version of the banner could only be displayed when the limitation is equal to fr-be.

Language code usual consist of only 2 characters, in the example above, the language code is appended by a country code as well. This is because the language 'Dutch' isn't only spoken in Belgium, but also in the Netherlands. The same applies to French, which is spoken in Belgium, but also in France.

If you want to target all users, who are using the French language you could just specify the language code fr. If you want to target only French speaking users in Belgium, you will have to specify the language code and the country code, in this case fr-be.

It is possible to specify multiple languages inside your browser, but phpAdsNew will only take the default language into account. If you configure a banner to show only when the language limitation is equal to de (German), it won't show the banner if the default language is different from German, even if you specified German as a secondary language.

 

 
   
  5.5.6 User agent  

 


Each browser will tell phpAdsNew it name and version. The string provided by the browser is called the User Agent. It is quite useful to use the User agent to prevent specific banner to be displayed on specific browsers. For example if you have an HTML banner which uses Internet Explorer specific DHMTL you don't want it to be shown on Netscape browsers.
You could use the User agent limitation to prevent it from being shown in browsers other than Internet Explorer.

You must specify a POSIX 1003.2 compliant regular expression, which must match the browser specified User agent. More information about POSIX regular expressions can be found in the regexp.7 man pages: http://linux.com.hk/man/showman.cgi?manpath=/man/man7/regex.7.inc

For example:
Mozilla/4. Will only match the Netscape 4 browser
MSIE 4 will only match Microsoft Internet Explorer 4
MSIE will match all version of Internet Explorer
MSIE [456] will match Internet Explorer 4, 5 and 6

 

 
   
  5.5.7 Weekday  

 


If you want to display a banner only on specific day you can use the Weekday limitation to set on which day of the week you want to display the banner. You can select multiple days at the same time. For example if you want to display a banner only on Saturday and Sunday, you can simply select these two days.

 

 
   
  5.5.8 Time  

 


You can use the time as a limitation whether the banner should be displayed or not. You can select multiple hours at the same time. If you want the banner to be shown only during office hours, you can simply select all hours which fall within this period. It is only possible to make a distinction per hour. For example if you select 8:00 as the condition on which the banner will be shown it will be displayed from 8:00 till 8:59.

 

 
   
  5.5.9 Source  

 


This limitation is linked to the source parameter of the banner invocation. You can specify any keyword during invocation and check whether the banner should be shown. This feature can be useful to show a banner only on a specific page or section of your website. It is also possible to create this behaviour with regular keywords, but this could be an additional way to display banner only on a specific page. The advantage of using this condition is it is pretty easy to change the display location of a banner by using the admin interface.

For example:
If you specify 'frontpage' as the source parameter during banner invocation and set the limitation of a banner also to 'frontpage' the banner will only be shown on the frontpage.