theme_audio_feeds_views_xspf

Versions
6
theme_audio_feeds_views_xspf($view, $nodes, $type)

Theme function to handle the XSPF view

Code

contributions/audio/contrib/feeds/audio_feeds.views.inc, line 21

<?php
function theme_audio_feeds_views_xspf($view, $nodes, $type) {
  if (isset($_GET['xspf'])) {
    return audio_feeds_views_prepare_xspf(views_get_title($view, $type), url($view->real_url, array('absolute' => true)), $nodes);
  }
  elseif (isset($_GET['m3u'])) {
    return theme('audio_feeds_views_m3u', $view, $nodes, $type);
  }
  elseif (isset($_GET['pls'])) {
    return theme('audio_feeds_views_pls', $view, $nodes, $type);
  }
  else {
    $player = audio_get_players('name', variable_get('audio_feeds_default_player', 'xspf_extended'));
    $query_string = array();
    if ($_GET) {
      foreach ($_GET as $key => $value) {
        // filter out the standard drupal q string, leaving everything else
        if ($key != 'q') {
          $query_string[$key] = $value;
        }
      }
    }
    $filters = $query_string ? audio_feeds_query_string_encode($query_string) .'%26xspf' : 'xspf';
    $playlist_url = url($view->real_url, array('query' => $filters, 'absolute' => TRUE));
    $output = theme($player['theme_xspf'], $playlist_url);
    $output .= theme('audio_feeds_views_links', $view, $query_string);
    return $output;
  }
}
?>

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters (without spaces) shown in the image.