| [ Index ] |
PHP Cross Reference of Drupal 6 (gatewave) |
[Summary view] [Print] [Text view]
1 <?php 2 // $Id: station_archive.legacy_pages.inc,v 1.2 2009/11/28 22:06:44 drewish Exp $ 3 4 function station_archive_view_html($dayname = NULL, $hourname = NULL) { 5 if (!is_null($dayname)) { 6 $day = station_valid_day($dayname); 7 $vid = _station_archive_get_vid(); 8 if ($dayterm = _station_archive_get_day_term($vid, $day)) { 9 $tid = $dayterm['tid']; 10 11 if (!is_null($hourname)) { 12 $hour = station_valid_hour($hourname); 13 if ($hourterm = _station_archive_get_hour_term($dayterm, $hour)) { 14 $tid = $hourterm['tid']; 15 } 16 } 17 drupal_goto('taxonomy/term/'. $tid); 18 } 19 } 20 drupal_not_found(); 21 } 22 23 function station_archive_view_rss($dayname = NULL, $hourname = NULL) { 24 if (!is_null($dayname)) { 25 $day = station_valid_day($dayname); 26 $vid = _station_archive_get_vid(); 27 if ($dayterm = _station_archive_get_day_term($vid, $day)) { 28 $tid = $dayterm['tid']; 29 30 if (!is_null($hourname)) { 31 $hour = station_valid_hour($hourname); 32 if ($hourterm = _station_archive_get_hour_term($dayterm, $hour)) { 33 $tid = $hourterm['tid']; 34 } 35 } 36 37 drupal_goto('taxonomy/term/'. $tid .'/0/feed'); 38 } 39 } 40 drupal_not_found(); 41 } 42 43 function station_archive_view_hours_html($hour_string) { 44 $title = t('Shows on...'); 45 $rss_url = url('rss/hours/'. str_replace(' ', '+', $hour_string)); 46 47 $attributes = array( 48 'rel' => 'alternate', 49 'type' => 'application/rss+xml', 50 'title' => t('RSS - %title', array('%title' => $title)), 51 'href' => $rss_url, 52 ); 53 drupal_add_link($attributes); 54 drupal_set_title($title); 55 56 $vid = _station_archive_get_vid(); 57 $tids = _station_archive_get_hour_tids($vid, $hour_string); 58 $result = taxonomy_select_nodes($tids, 'or', 0, FALSE); 59 while ($node = db_fetch_object($result)) { 60 $output .= node_view(node_load($node), 1); 61 } 62 $output .= theme('feed_icon', $rss_url); 63 64 return $output; 65 } 66 67 function station_archive_view_hours_rss($hour_string) { 68 $title = t('Shows on...'); 69 $desc = t('Description of shows...'); 70 71 $vid = _station_archive_get_vid(); 72 $tids = _station_archive_get_hour_tids($vid, $hour_string); 73 $result = taxonomy_select_nodes($tids, 'or', 'all', FALSE); 74 75 $channel['title'] = $title; 76 $channel['description'] = $desc; 77 78 return node_feed($result, $channel); 79 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
| Generated: Thu Mar 24 11:18:33 2011 | Cross-referenced by PHPXref 0.7 |