? amazontools.patch Index: amazon.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/amazontools/amazon.module,v retrieving revision 1.63 diff -u -p -r1.63 amazon.module --- amazon.module 25 Jan 2007 00:13:16 -0000 1.63 +++ amazon.module 13 Jun 2007 22:48:37 -0000 @@ -710,6 +710,12 @@ function amazon_settings() { '#width' => 60, '#height' => 5, ); + $form['amazon_link_back'] = array( + '#title' => t('Provide Links back to Amazon'), + '#type' => 'radios', + '#options' => array(t('No'),t('Yes')), + '#default_value' => variable_get('amazon_link_back', 1), + ); return system_settings_form($form); } @@ -1406,14 +1412,20 @@ function theme_amazon_node($node) { $output = ''; $output .= '
| detailpageurl\" target=\"_blank\">"; + $output .= " | ";
if ($node->mediumimageurl) {
- $output .= " ";
+ $image .= " ";
+ }
+ $output .= " | "; + if(variable_get('amazon_link_back',1)) { + $output .= l($image,$node->detailpageurl,array('target'=>'_blank'),null,null,false,true); + } else { + $output .= $image; } - $output .= " | "; + $output .= " | "; if ($node->type == 'amazon') { if ($node->detailpageurl) { $output .= "detailpageurl\" target=\"_blank\">"; |