I've been able to generate a working podcast feed with the itunes feed generator. It's a great feature. However, the generated
channel tag which is displayed in the iTunes Store as "Website" with an arrow should link to the front page of a website. (At least this is is the case with most other podcasts.) Instead, the generated tag points to the feed itself. Digging around in the audio_itunes.module code, I found two different definitions of 'link':

Line 414 has:

    'link'        => url($view->feed_url ? $view->feed_url : $view->real_url, NULL, NULL, true),

while line 474 has:

    'link'        => $base_url,

It seems like the second one should point to a site's front page. I could be way off, but maybe these are in conflict?

Comments

anthonym’s picture

Just bumping this up. I'd be willing to do some troubleshooting of this myself if someone could point me in the right direction.

Anthony

anthonym’s picture

Priority: Normal » Critical

Bumping this up again. Can anyone check it out?

anthonym’s picture

Okay, I found the solution to this myself, so I thought I should share in case it might help someone else. The podcast feed links can be changed by a themeable function found in audio/contrib/itunes/audio_itunes.module. It's a long function so I won't include it all here, but the relevant portion is near the beginning:

Original:

/**
 * plugin that actually displays an RSS feed
 */
function theme_audio_itunes_feed($view, $nodes, $type) {
  if ($type == 'block') {
    return;
  }
  global $base_url;


  $channel = array(
    // a check_plain isn't required on these because format_rss_channel
    // already does this.
    'title'       => views_get_title($view, 'page'),
    'link'        => url($view->feed_url ? $view->feed_url : $view->real_url, NULL, NULL, true),
...

The relevant code here is the last line included beginning with 'link'... As is, this points to the feed url itself which I didn't think was too useful. After some fiddling around I found out that at least one reliable way of pointing to my home page was to change it to:

My override:

    'link'        => url(NULL, NULL, NULL, true),

The first NULL means that nothing will be added to the a site's base url. If you want the link tag to point to a different directory then that should go in place of NULL.

willhall-dupe’s picture

I want to thank you for solving this problem. This has troubled me and our podcast for a while now, i really appreciate your work here! -- will

willhall-dupe’s picture

If i want the link tag to point to a completely different url i.e. http://www.mysite.com, do i just put that in place of NULL as you say? thanks for help!

anthonym’s picture

Hi Will,

I wanted to check to make sure I could answer this with some degree of confidence before posting back. I'm far from an expert on either theme overrides or the Drupal API but I think this will do what you want:

url('http://www.mysite.com', NULL, NULL, true)

Don't forget the single quotes around the full url for the external site you want to specify. Otherwise Drupal won't render it correctly. Hope this helps.

Anthony