Index: station.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/station/Attic/station.module,v
retrieving revision 1.27.2.2
diff -u -r1.27.2.2 station.module
--- station.module	25 Apr 2007 15:14:37 -0000	1.27.2.2
+++ station.module	16 May 2007 06:31:05 -0000
@@ -50,19 +50,43 @@
   $form['station_stream'] = array(
     '#type' => 'fieldset',
     '#title' => t('Webstream settings'),
-    '#description' => t('The station module expects that your station has a high and low bandwidth webstreams.'),
+    '#description' => t('The station module allows you to reference up to three websteam URLs. If using the archive module to capture a webstream, stream one must be a an Shoutcast or Icecast stream.'),
   );
-  $form['station_stream']['station_stream_high_url'] = array(
+  $form['station_stream']['station_stream_one_label'] = array(
     '#type' => 'textfield',
-    '#title' => t('High-bandwith URL'),
-    '#default_value' => variable_get('station_stream_high_url', ''),
-    '#description' => t('The URL of the station\'s high-bandwith webstream.'),
+    '#title' => t('First Stream Label'),
+    '#default_value' => variable_get('station_stream_one_label', 'High'),
+    '#description' => t('The first webstream label.'),
   );
-  $form['station_stream']['station_stream_low_url'] = array(
+  $form['station_stream']['station_stream_one'] = array(
     '#type' => 'textfield',
-    '#title' => t('Low-bandwith URL'),
-    '#default_value' => variable_get('station_stream_low_url', ''),
-    '#description' => t('The URL of the station\'s low-bandwith webstream.'),
+    '#title' => t('First URL'),
+    '#default_value' => variable_get('station_stream_one', ''),
+    '#description' => t('The first webstream URL.'),
+  );
+  $form['station_stream']['station_stream_two_label'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Second Stream Label'),
+    '#default_value' => variable_get('station_stream_two_label', 'Low'),
+    '#description' => t('The second webstream label.'),
+  );
+  $form['station_stream']['station_stream_two'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Second URL'),
+    '#default_value' => variable_get('station_stream_two', ''),
+    '#description' => t('The second webstream URL.'),
+  );
+  $form['station_stream']['station_stream_three_label'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Third Stream Label'),
+    '#default_value' => variable_get('station_stream_three_label', ''),
+    '#description' => t('The third webstream label.'),
+  );
+  $form['station_stream']['station_stream_three'] = array(
+    '#type' => 'textfield',
+    '#title' => t('Third URL'),
+    '#default_value' => variable_get('station_stream_three', ''),
+    '#description' => t('The third webstream URL.'),
   );
 
   $form['station_remote'] = array(
@@ -300,10 +324,15 @@
   // current program
   $program = station_get_program_at(time());
   $unschedule_message = check_plain(variable_get('station_block_unschedule',  t("We're on autopilot.")));
-  $high = check_url(variable_get('station_stream_high_url', ''));
-  $low = check_url(variable_get('station_stream_low_url', ''));
-
-  return theme('station_block_current_program', $program, $unschedule_message, $high, $low);
+  $one_url = check_url(variable_get('station_stream_one', ''));
+  $two_url = check_url(variable_get('station_stream_two', ''));
+  $three_url = check_url(variable_get('station_stream_three', ''));
+  
+  $one_label = check_url(variable_get('station_stream_one_label', ''));
+  $two_label = check_url(variable_get('station_stream_two_label', ''));
+  $three_label = check_url(variable_get('station_stream_three_label', ''));
+  
+  return theme('station_block_current_program', $program, $unschedule_message, $one_url, $two_url, $three_url, $one_label, $two_label, $three_label);
 }
 
 /**
@@ -319,7 +348,7 @@
  *   optional, low-bandwith webstream URL
  * @return string
  */
-function theme_station_block_current_program($program = NULL, $unscheduled_message ='', $high_url = NULL, $low_url = NULL) {
+function theme_station_block_current_program($program = NULL, $unscheduled_message ='', $one_url = NULL, $two_url = NULL, $three_url = NULL, $one_label = 'one', $two_label = 'two', $three_label = 'three') {
   // program or unscheduled...
   if ($program) {
     $output = l($program->title, $program->node_url) .'<br />';
@@ -329,13 +358,16 @@
   }
 
   // webstream links
-  if ($high_url || $low_url) {
+  if ($one_url || $two_url || $three_url) {
     $output .= t('Tune in: ');
-    if ($high_url) {
-      $output .= ' '. l(t('High'), $high_url);
+    if ($one_url) {
+      $output .= ' '. l(t($one_label), $one_url);
+    }
+    if ($two_url) {
+      $output .= ' '. l(t($two_label), $two_url);
     }
-    if ($low_url) {
-      $output .= ' '. l(t('Low'), $low_url);
+    if ($three_url) {
+      $output .= ' '. l(t($three_label), $three_url);
     }
   }
 
