'Commission Junction',
'shortname' => 'cj',
'www' => 'http://www.cj.com/',
'www-create' => 'https://members.cj.com/member/publisher/accounts/listmyadvertisers.do?sortKey=active_start_date&sortOrder=DESC',
'www-signup' => 'http://www.qksrv.net/click-2335597-7282777',
);
/*
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_CJ extends Ad_Generic {
function Ad_CJ(){
$this->Ad_Generic();
}
function render_ad(){
/*
*/
$cjservers=array(
'www.kqzyfj.com',
'www.tkqlhce.com',
'www.jdoqocy.com',
'www.dpbolvw.net',
'www.lduhtrp.net');
$code = '';
$code .= '';
$code .= 'pd('new-window')=='yes'){$code.=' target="_blank" ';}
if($this->pd('hide-link')=='yes'){
$code.='onmouseover="window.status=\'';
$code.=$this->pd('hide-link-url');
$code.='\';return true;" onmouseout="window.status=\' \';return true;"';
}
$code .= '>';
$code .= '
pd('width') . '" ';
$code .= ' height="' . $this->pd('height') . '" ';
$code .= ' alt="' . $this->pd('alt-text') . '" ';
$code .= '>';
$code .= '';
return $code;
}
function can_benice(){return false;}
function reset_defaults_network() {
global $_adsensem;
$_adsensem['defaults'][$this->network()]+= array (
'hide-link' => 'no',
'hide-link-url' => '',
'new-window' => 'no',
'alt-text' => '',
'adformat' => '250x250',
);
}
function save_settings_network() {
$this->p['slot']=strip_tags(stripslashes($_POST['adsensem-slot']));
$this->p['adformat']=stripslashes($_POST['adsensem-adformat']);
//$this->p['code']=stripslashes($_POST['adsensem-code']);
$this->p['hide-link']=strip_tags(stripslashes($_POST['adsensem-hide-link']));
$this->p['hide-link-url']=strip_tags(stripslashes($_POST['adsensem-hide-link-url']));
$this->p['new-window']=strip_tags(stripslashes($_POST['adsensem-new-window']));
$this->p['alt-text']=strip_tags(stripslashes($_POST['adsensem-alt-text']));
}
function import_detect_network($code){
# Domains: (add more)
$domains = array(
'www.commission-junction.com',
'www.cj.com',
'www.qksrv.net',
'www.kqzyfj.com',
'www.tkqlhce.com',
'www.jdoqocy.com',
'www.dpbolvw.net',
'www.lduhtrp.net',
'www.anrdoezrs.net');
$match=false;
foreach($domains as $d){$match=$match || (strpos($code,'href="http://' . $d)!==false);}
return $match;
}
function import_settings($code){
/*
*/
if(preg_match('/http:\/\/([.\w]*)\/click-(\d*)-(\d*)/', $code, $matches)!=0){
//ACCOUNT ID? NEEDS DEFAULT IMPORT RULES. GAH.
$_POST['adsensem-account-id'] = $matches[2];
$_POST['adsensem-slot'] = $matches[3];
}
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(){
?>
Further campaigns can be found through CJ's site: