OX_Ad($aAd); // $this->set_network_property('click-url', 'http://www.adbrite.com/mb/landing_publisher.php?spid=118090'); // $this->set_network_property('url', 'http://www.adbrite.com'); } /** * 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( 'account-id' => '', 'adformat' => '250x250', 'color-bg' => 'FFFFFF', 'color-border' => 'CCCCCC', 'color-text' => '000000', 'color-title' => '0000FF', 'color-link' => '008000', 'height' => '250', 'slot' => '', 'width' => '250', ); return $properties + parent::get_network_property_defaults(); } function get_ad_formats() { return array(all => array('728x90', '468x60', '120x600', '160x600', '300x250')); } function import_detect_network($code) { return ( (strpos($code,'')!==false) || (strpos($code,'src="http://ads.adbrite.com')!==false) || (strpos($code,'')!==false) ); } function import_settings($code) { if (preg_match("/var AdBrite_Title_Color = '(\w*)'/", $code, $matches)) { $this->set_property('color-title', $matches[1]); $code = str_replace("var AdBrite_Title_Color = '{$matches[1]}'", "var AdBrite_Title_Color = '{{color-title}}'", $code); } if (preg_match("/var AdBrite_Text_Color = '(\w*)'/", $code, $matches)) { $this->set_property('color-text', $matches[1]); $code = str_replace("var AdBrite_Text_Color = '{$matches[1]}'", "var AdBrite_Text_Color = '{{color-text}}'", $code); } if (preg_match("/var AdBrite_Background_Color = '(\w*)'/", $code, $matches)) { $this->set_property('color-bg', $matches[1]); $code = str_replace("var AdBrite_Background_Color = '{$matches[1]}'", "var AdBrite_Background_Color = '{{color-bg}}'", $code); } if (preg_match("/var AdBrite_Border_Color = '(\w*)'/", $code, $matches)) { $this->set_property('color-border', $matches[1]); $code = str_replace("var AdBrite_Border_Color = '{$matches[1]}'", "var AdBrite_Border_Color = '{{color-border}}'", $code); } if (preg_match("/var AdBrite_URL_Color = '(\w*)'/", $code, $matches)) { $this->set_property('color-link', $matches[1]); $code = str_replace("var AdBrite_URL_Color = '{$matches[1]}'", "var AdBrite_URL_Color = '{{color-link}}'", $code); } if (preg_match("/zs=(\w*)/", $code, $matches) != 0) { $this->set_property('account-id', $matches[1]); $code = str_replace("zs={$matches[1]}", "zs={{account-id}}", $code); } if (preg_match("/sid=(\w*)/", $code, $matches) != 0) { $this->set_property('slot', $matches[1]); $code = str_replace("sid={$matches[1]}", "sid={{slot}}", $code); $code = str_replace("opid={$matches[1]}", "sid={{slot}}", $code); } parent::import_settings($code); } } /*
Your Ad Here
Your Ad Here
REFERRAL TAG */ ?>