Index: piclens.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/piclens/piclens.module,v retrieving revision 1.1.2.1 diff -u -p -r1.1.2.1 piclens.module --- piclens.module 13 Apr 2008 13:30:17 -0000 1.1.2.1 +++ piclens.module 14 Apr 2008 09:17:45 -0000 @@ -119,6 +119,14 @@ function piclens_admin_settings() { '#default_value' => variable_get('piclens_image_gallery_link', 0), ); } + + $form['piclens_image_link_to'] = array( + '#type' => 'radios', + '#title' => t('Link PicLens preview back to:'), + '#options' => array('image' => 'Direct image link', 'node' => 'Drupal image node page'), + '#default_value' => variable_get('piclens_image_link_to', 'image'), + ); + return system_settings_form($form); } else { @@ -194,7 +202,7 @@ function piclens_rss($items) { $output = ' - '. $items .' + '. $items .' '; @@ -265,6 +273,9 @@ function piclens_image_gallery_images($t 'thumbnail' => $GLOBALS['base_url'] .'/'. $node->images['thumbnail'], 'content' => $GLOBALS['base_url'] .'/'. $node->images[$content], ); + if(variable_get('piclens_image_link_to', 'image') == 'node') { + $item['link'] = url('node/'. $node->nid, NULL, NULL, TRUE); + } $items .= piclens_format_item($item); } return $items;