--- C:\insat\original\rotor.module	2008-04-30 00:54:00.000000000 +0200
+++ C:\insat\modificado\rotor.module	2008-09-02 12:11:48.312500000 +0200
@@ -199,12 +199,24 @@
     '#description' => t('The image that will be shown in the rotor content.'.
         ' If an image is uploaded only the image will be shown, otherwise only the content.'),
   );
+
+  /* Adding url*/
+  $form['url'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Link Text'),
+    '#required' => TRUE,
+    '#default_value' => $node->url,
+    '#weight' => -3,
+    '#description' => t('The link that will be actived for this item. Example: http://www.sld.cu'),
+  );
+
+
   $form['body_filter']['body'] = array(
     '#type' => 'textarea',
     '#title' => t('Content'),
     '#default_value' => $node->body,
     '#rows' => 10,
-    '#weight' => -3,
+    '#weight' => -2,
     '#description' => t('The content that will be shown in case no image is uploaded.'),
   );
   $form['body_filter']['filter'] = filter_form($node->format);
@@ -236,8 +248,8 @@
  */
 function rotor_insert($node) {
   db_query(
-    "INSERT INTO {rotor_item} (nid, file_path) VALUES (%d, '%s')"
-    , $node->nid, $node->rotor_image
+    "INSERT INTO {rotor_item} (nid, file_path, url) VALUES (%d, '%s', '%s')"
+    , $node->nid, $node->rotor_image , $node->url
   );
 }
 
@@ -246,8 +258,8 @@
  */
 function rotor_update($node) {
   db_query(
-    "UPDATE {rotor_item} SET file_path = '%s' WHERE nid = %d"
-    , $node->rotor_image, $node->nid
+    "UPDATE {rotor_item} SET file_path = '%s',url = '%s'  WHERE nid = %d"
+    , $node->rotor_image, $node->url, $node->nid
   );
 }
 
@@ -266,7 +278,7 @@
  */
 function rotor_load($node) {
   $additions = db_fetch_object(db_query(
-    'SELECT file_path AS rotor_image FROM {rotor_item} WHERE nid = %d', 
+    'SELECT file_path AS rotor_image, url FROM {rotor_item} WHERE nid = %d',
     $node->nid));
   return $additions;
 }
@@ -423,11 +435,13 @@
   if($show_tabs && $group_tabs == ROTOR_DONT_GROUP_TABS) {
     $output .= '<div class="rotor_tab">' . $item->title . '</div>';
   }
-  $output .= '<div class="rotor_content_detail" style="display:none">'
+  $output .= ' <div class="rotor_content_detail" style="display:none"> '
+            .' <a href="'.$item->url.'" target="_blank"> '  /* Adding url*/
     . ($item->rotor_image
     ? theme('rotor_image', $item->rotor_image)
-    : $item->body) 
-    . '</div>';
+    : $item->body)
+    . ' </a> ' /* Adding url*/
+    .' </div>';
   $output .= '</div>';
   return $output;
 }
