OX_Ad($aAd); } /** * This function is called statically from the ad engine. Use this function to put any hooks in the ad engine that you want to use. */ function register_plugin(&$engine) { $engine->addAction('ad_network', get_class($this)); } function get_network_property_defaults() { $properties = array( 'slot' => '', ); return $properties + parent::get_network_property_defaults(); } function get_ad_colors() { return array('border', 'title', 'bg', 'text'); } function import_detect_network($code) { return ( (strpos($code, 'd1.openx.org') !== false) || (strpos($code, 'MAX_used') !== false) ); } function import_settings($code) { if (preg_match("/zoneid=(\w*)/", $code, $matches) !=0) { $this->set_property('slot', $matches[1]); $code = str_replace('zoneid=' . $matches[1], 'zoneid={{slot}}', $code); } $code = str_replace('INSERT_RANDOM_NUMBER_HERE', '{{random}}', $code); parent::import_settings($code); } } /* */ ?>