? .svn
? uc_affiliate2_config_menu.patch
Index: uc_affiliate2.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/uc_affiliate2/uc_affiliate2.module,v
retrieving revision 1.18.2.44
diff -u -F^f -p -r1.18.2.44 uc_affiliate2.module
--- uc_affiliate2.module 17 Sep 2009 22:56:03 -0000 1.18.2.44
+++ uc_affiliate2.module 25 Oct 2009 21:38:15 -0000
@@ -69,6 +69,16 @@ function uc_affiliate2_menu() {
'access arguments' => array('access content'),
'type' => MENU_CALLBACK
);
+
+ // The path for affiliate links defaults to /affiliate/[uid]
+ // however, this can be overridden by adding the following line
+ // $conf['uc_affiliate2_path'] = 'my_affiliate_path'
+ // in the site's settings.php file
+ $items[variable_get('uc_affiliate2_path', 'affiliate')] = array(
+ 'page callback' => 'uc_affiliate2_click',
+ 'access arguments' => array('access content'),
+ 'type' => MENU_CALLBACK
+ );
$items['user/%user/affiliate'] = array(
'title' => 'Affiliate Center',
@@ -409,7 +419,7 @@ function _uc_affiliate2_display_banners(
foreach ($banners as $banner) {
$banner = '<'. $banner;
- $banner_link = l($banner, 'affiliate/'. $user->uid, array('query' => NULL, 'fragment' => NULL, 'absolute' => TRUE, 'html' => TRUE));
+ $banner_link = l($banner, variable_get('uc_affiliate2_path', 'affiliate') .'/'. $user->uid, array('query' => NULL, 'fragment' => NULL, 'absolute' => TRUE, 'html' => TRUE));
$line = array();
$line[] = $banner;
@@ -464,7 +474,7 @@ function _uc_affiliate2_get_products($mo
}
$product->path = (!$product->path) ? 'node/'. $product->nid : $product->path;
- $link = $GLOBALS['base_url'] .'/affiliate/'. $user->uid .'/'. $product->path;
+ $link = $GLOBALS['base_url'] .'/'. variable_get('uc_affiliate2_path', 'affiliate') .'/'. $user->uid .'/'. $product->path;
if (empty($product->field_image_cache[0]['filepath'])) {
$image = 'N/A';
@@ -1043,10 +1053,10 @@ function uc_affiliate2_dashboard($user)
$output .= '