'http://www.openx.org/',
'www-signup' => 'http://www.openx.org/'
);
class OX_Adnet_Openx extends OX_Adnet
{
/**
* The short name for any ad of this type, used when generating a unique name for the ad, or creating class files
*/
var $shortName = 'Openx';
/**
* The URL for the home page of the ad network site
*/
var $url = 'http://www.openx.org';
/**
* The name of the network. Used when displaying ads by network.
*/
var $networkName = 'OpenX';
function OX_Adnet_Openx()
{
$this->OX_Adnet();
}
function get_default_properties()
{
$properties = array(
'slot' => '',
);
return $properties + parent::get_default_properties();
}
function import_detect_network($code)
{
return (strpos($code, 'd1.openx.org') !== false);
}
function import_settings($code)
{
// Import parent settings first!
parent::import_settings($code);
if (preg_match("/zoneid=(\w*)/", $code, $matches) !=0) {
$this->set('slot', $matches[1]);
$code = str_replace('zoneid=' . $matches[1], 'zoneid={{slot}}', $code);
}
$code = str_replace('INSERT_RANDOM_NUMBER_HERE', '{{random}}', $code);
$this->set('code', $code);
}
function customiseSection($mode, $section)
{
if ($section == 'adformat') {
return true;
}
return false;
}
function displaySection($mode, $section)
{
return;
}
function displayBeforeSection($mode, $section)
{
if ($section == 'code') {
$this->_displaySectionSlot();
}
}
}
/*
*/
?>