'CrispAds', 'shortname' => 'crisp', 'www' => 'http://www.crispads.com/', 'www-create' => 'http://www.crispads.com/spinner/www/admin/zone-edit.php', 'www-signup' => 'http://www.crispads.com/' ); /* 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_CrispAds extends Ad_Generic { function Ad_CrispAds(){ $this->Ad_Generic(); } function render_ad(){ if ($this->pd('codemethod')=='javascript'){ $code=''; } else { //Iframe $code=''; $code.=''; } return $code; } function save_settings_network() { $this->p['slot']=strip_tags(stripslashes($_POST['adsensem-slot'])); $this->p['identifier']=strip_tags(stripslashes($_POST['adsensem-identifier'])); $this->p['codemethod']=strip_tags(stripslashes($_POST['adsensem-codemethod'])); //Javascript or IFRAME } function import_detect_network($code){ return ( preg_match('/http:\/\/www.crispads.com\/spinner\//', $code, $matches) !==0); } function import_settings($code){ if(preg_match("/zoneid=(\w*)/", $code, $matches)!=0){$_POST['adsensem-slot'] = $matches[1]; } if(preg_match("/n=(\w*)/", $code, $matches)!=0){$_POST['adsensem-identifier'] = $matches[1]; } if(preg_match("/iframe/", $code, $matches)!=0){$_POST['adsensem-codemethod'] = 'iframe'; } else {$_POST['adsensem-codemethod'] = 'javascript';} //Only available on IFRAME ads if(preg_match('/width="(\w*)"/', $code, $matches)!=0){ $width=$matches[1]; if(preg_match('/height="(\w*)"/', $code, $matches)!=0){ $height=$matches[1]; $_POST['adsensem-adformat'] = $width . "x" . $height; //Only set if both width and height present } } $this->save_settings(); } function _form_settings_help(){ ?>Configuration is available through the CrispAds site.
Ad unit specific links below: name,15,'Name for this Ad Unit'); adsensem_admin::_field_input('Slot ID','slot',$this->p['slot'],15,'Enter the network\'s ID for this slot.'); adsensem_admin::_field_input('Identifier','slot',$this->p['identifier'],15,'Random identifier for this unit.'); ?> "Javascript",'iframe' => "IFRAME"); adsensem_admin::_field_select('Output Code', 'codemethod',$codemethods,$this->p['codemethod']); } //Middle function admin_manage_column2(){ adsensem_admin::manage_dbxoutput(array('ad_format','code_method')); } } ?>