Advertiser's ad text here
'AdBrite', 'shortname' => 'adbrite', 'www' => 'http://www.adbrite.com/', 'www-create' => 'http://www.adbrite.com/zones/commerce/purchase.php?product_id_array=22', 'www-signup' => 'http://www.adbrite.com/mb/landing_both.php?spid=51549&afb=120x60-1-blue', ); /* INITIALISATION All functions in here called at startup (after other plugins have loaded, in case we need to wait for the widget-plugin). */ class Ad_AdBrite extends Ad_Generic { function Ad_AdBrite(){ $this->Ad_Generic(); } function render_ad(){ /*
*/ $code =''; $code .= '' . "\n"; $code .= ''; $code .= ''; $code .= ''; return $code; } function save_settings_network() { $this->p['slot']=strip_tags(stripslashes($_POST['adsensem-slot'])); $this->p['code']=stripslashes($_POST['adsensem-code']); $this->p['color-border']=strip_tags(stripslashes($_POST['adsensem-color-border'])); $this->p['color-title']=strip_tags(stripslashes($_POST['adsensem-color-title'])); $this->p['color-bg']=strip_tags(stripslashes($_POST['adsensem-color-bg'])); $this->p['color-text']=strip_tags(stripslashes($_POST['adsensem-color-text'])); } function reset_defaults_network() { global $_adsensem; $_adsensem['defaults'][$this->network()]+= array ( 'color-border'=> 'FFFFFF', 'color-title' => '0000FF', 'color-bg' => 'FFFFFF', 'color-text' => '000000', 'slot' => '', 'adformat' => '250x250', ); } function import_detect_network($code){ return ( (strpos($code,'')!==false) || (strpos($code,'src="http://ads.adbrite.com')!==false) || (strpos($code,'')!==false) ); } function import_settings($code){ //Load data up into the $_POST variables, then call save_settings?? /* */ if(preg_match('/var AdBrite_Title_Color = \'(\w*)\'/', $code, $matches)!=0){ $_POST['adsensem-color-title'] = $matches[1]; } if(preg_match("/var AdBrite_Text_Color = '(\w*)'/", $code, $matches)!=0){ $_POST['adsensem-color-text'] = $matches[1]; } if(preg_match("/var AdBrite_Background_Color = '(\w*)'/", $code, $matches)!=0){ $_POST['adsensem-color-bg'] = $matches[1]; } if(preg_match("/var AdBrite_Border_Color = '(\w*)'/", $code, $matches)!=0){ $_POST['adsensem-color-border'] = $matches[1]; } //ACCOUNT ID? NEEDS DEFAULT IMPORT RULES. GAH. //if(preg_match("/sid=(.*)&/", $code, $matches)!=0){ $_POST['adsensem-color-border'] = $matches[1]; } if(preg_match("/zs=(\w*)/", $code, $matches)!=0){$_POST['adsensem-account-id'] = $matches[1]; } if(preg_match("/sid=(\w*)/", $code, $matches)!=0){$_POST['adsensem-slot'] = $matches[1]; } $this->save_settings(); } function _form_settings_colors(){ $this->_form_settings_colors_generate(array('Border'=>'border','Title'=>'title','Background'=>'bg','Text'=>'text')); } function _form_settings_colors_demo(){ ?>