DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

OpenX tags

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Andreas Brunn
Changed:2008-12-27T21:47:07.870000000
Author:Andreas Brunn
Email:brunn@archaeomedia.de
Info 3:
Info 4:

OpenX tags

Extension Key: am_ openx_tags

Copyright 2008, Andreas Brunn, <brunn@archaeomedia.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

OpenX tags 1

Introduction 1

What does it do? 1

What is OpenX? 1

Users manual 1

Configuration 2

Reference 2

Known problems 3

To-Do list 4

Introduction

This extension is just an adoption of the “openads_tags” extension originally written by John Angel. It was modified to work with the OpenX adserver software (formerly called OpenAds aka phpAdsNew).

What does it do?

It allows you do display OpenX banner code, based on zones and/or selection string.

You can set OpenX Ad Zone field for each page. The extension will automatically use the zone from the parent pages if the zone is not set for the current page.

What is OpenX?

OpenX is an ad server written in PHP that allows you to place banners on your website and lets you manage your banners in a professional way. OpenX is open-source which means you have access to the source code, licensed under the General Public License. For more information please visit http://www.openx.org/

Users manual

Here are the necessary steps to get extension up and running:

Install the extension

Edit the template of your site. In section Include static (from extensions) include “OpenX tags (openads_tags)”extension template.

To display banners you need to add the following TypoScript code in Setup section of your template:

plugin.tx_amopenxtags_pi1.url = http://path_to_installed_openads_server
page.5 < plugin.tx_amopenxtags_pi1

Log in to OpenX and create new Ad Zone for Typo3 page you want.

Each Ad Zone has its unique number - look for zoneid parameter in URL or in invocation code for that zone.

Edit the page in Typo3 and set zone number (as it is in OpenX), using the field “OpenX Ad Zone”.

That's it!

Configuration

Don't forget to include “OpenX tags (am_openx_tags)”template.

Be sure to set plugin.tx_amopenxtags_pi1.url field.

Reference

Reference TypoScript (Constants)

url

Property

url

Data type

string

Description

URL where OpenX server is installed.

Example:

http://www.myadserver.com

Default

javascript

Property

javascript

Data type

boolean

Description

Display JavaScript OpenX code. If not set, it will display IFRAME version, which provides faster page load.

Default

0
width

Property

width

Data type

integer

Description

Banner width, which will be used in HTML code above.

Default

468

height

Property

height

Data type

integer

Description

Banner height, which will be used in HTML code above.

Default

60

target

Property

target

Data type

string

Description

Target link, usually _blank or _self

Default

_blank

selection

Property

selection

Data type

string

Description

OpenX will display banners based on this condition.

More information about selection strings can be found at:

http://www.openx.org/support/direct-selection

Example:

computers/programming/languages/php

Default

zone:###ZONE###

no_zone_display

Property

no_zone_display

Data type

boolean

Description

Display ad code if the zone is not found.

Useful if not using zones, but selection strings only.

Default

0

[tsref.plugin.tx_amopenxtags_pi1]

Reference TypoScript (Setup)

htmlcode.iframe

Property

htmlcode.iframe

Data type

string

Description

IFRAME HTML code for displaying an ad.

Note: the ending slash is always stripped from the ###URL### marker.

Default

<iframe id='af1595a1' name='af1595a1' src='http://###URL###/www/delivery/afr.php?n=af1595a1&amp;what=###SELECTION###&amp;target=###TARGET###&amp;cb=###RANDOM###' framespacing='0' frameborder='no' scrolling='no' width='###WIDTH###' height='###HEIGHT###'><a href='http://###URL###/www/delivery/ck.php?n=a8789d9b&amp;cb=###RANDOM###' target='_blank'><img src='http://###URL###/www/delivery/avw.php?what=###SELECTION###&amp;cb=###RANDOM###&amp;n=a8789d9b' border='0' alt='' /></a></iframe><script type='text/javascript' src='http://###URL###/www/delivery/ag.php'></script>
htmlcode.javascript

Property

htmlcode.javascript

Data type

string

Description

JavaScript HTML code for displaying an ad.

Note: the ending slash is always stripped from the ###URL### marker.

Default

<script type='text/javascript'><!--// <![CDATA[
OA_show(###ZONE###);
// ]]> --></script><noscript><a target='_blank' href='http://###URL###/www/delivery/ck.php?n=AO103f126'><img border='0' alt='' src='http://###URL###/www/delivery/avw.php?zoneid=###ZONE###&amp;n=AO103f126' /></a></noscript>
html

Property

html

Data type

string

Description

HTML code to display an ad.

Default

Fetches htmlcode.iframe or htmlcode.javascript, based on $javascript constant

[tsref.plugin.tx_amopenxtags_pi1]

Reference Markers (used in HTML code)

###URL###

Property

###URL###

Data type

string

Description

Substituted with url field.

Default

###WIDTH###

Property

###WIDTH###

Data type

integer

Description

Substituted with width field.

Default

###HEIGHT###

Property

###HEIGHT###

Data type

integer

Description

Substituted with height field.

Default

###TARGET###

Property

###TARGET###

Data type

string

Description

Substituted with target field.

Default

_blank

###RANDOM###

Property

###RANDOM###

Data type

integer

Description

Substituted with random number, to have unique HTML code.

Default

###SELECTION###

Property

###SELECTION###

Data type

string

Description

Substituted with selection field.

Default

###ZONE###

Property

###ZONE###

Data type

integer

Description

Substituted with the content of the field “OpenX Ad Zone” from the current page.

If this field is not set for the current page, extension looks the parent page for this value - all the way up to the root page, if necessary, until it finds non-zero value.

Default

0

[tsref.plugin.tx_amopenxtags_pi1.html]

((generated))
Example

Example 1: Displaying 160x600 banner from www.myadserver.com

plugin.tx_amopenxtags_pi1.url = http://www.myadserver.com
temp.banner < plugin.tx_amopenxtags_pi1
temp.banner.width = 160
temp.banner.height = 600

Example 2: Displaying 468x60 banners from www.myadserver.com having keyword 'computer'

plugin.tx_amopenxtags_pi1.url = http://www.otheradserver.com
temp.banner < plugin.tx_amopenxtags_pi1
temp.banner.no_zone_display = 1
temp.banner.selection = computer@468x60

Known problems

Not known at this moment.

To-Do list

Nothing planned. This was just written/modified to work for my own site.Feel free to take this and adopt it to your needs.

img-1 OpenX tags - 3