diff -up openx6/openx.admin.inc openx5/openx.admin.inc --- openx6/openx.admin.inc 2008-12-12 11:17:53.000000000 +1300 +++ openx5/openx.admin.inc 2009-07-31 11:42:06.000000000 +1200 @@ -6,6 +6,7 @@ * @author Jeff Warrington (jaydub) is new maintainer March 2008 * @author Chris Nutting * @author Bruno Massa + * @author David Thomas * * @file * Module settings. @@ -71,6 +72,19 @@ function _openx_settings() { '#description' => t('For example "ads.example.org/delivery". "https://" is automatically prefixed.'), '#required' => TRUE, ); + $form['adserver']['openx_affiliate_id'] = array( + '#type' => 'textfield', + '#default_value' => variable_get('openx_affiliate_id', ''), + '#title' => t('OpenX website/affiliate id for this site'), + '#description' => t('This is the website/affiliate id e.g: 1') + ); + $form['adserver']['openx_click_target'] = array( + '#type' => 'select', + '#default_value' => variable_get('openx_click_target', '_blank'), + '#title' => t('OpenX ad click window'), + '#description' => t('Open ads in the same or new window.'), + '#options' => array('_blank' => 'New Window', '_self' => 'Same Window'), + ); return system_settings_form($form); } diff -up openx6/openx.inc openx5/openx.inc --- openx6/openx.inc 2009-02-11 21:00:16.000000000 +1300 +++ openx5/openx.inc 2009-07-31 11:42:06.000000000 +1200 @@ -1,11 +1,12 @@ * @author Bruno Massa + * @author David Thomas * * @file * Module settings. @@ -31,6 +32,8 @@ function _openx_javascript() { $server = variable_get('openx_delivery_url', 'd.openx.org'); } $url = $protocol .'://'. trim($server, '/') .'/spcjs.php'; + $url .= '?id='.variable_get('openx_affiliate_id', ''); // add affiliate / website id + $url .= '&target='.variable_get('openx_click_target', '_blank'); // open same/new window? $zones = variable_get('openx_zones', array()); $spc_code = "