The feeds on www.dashboardmonkey.com work fine, but when the feed is used on other websites the images break because they are not referenced with the full path.

What can I change / where in the code can i modify things so that the feeds will be created using FULL WEB ADDRESSES for the elements?

Is this even possible as I am tearing my hair out.

Thanks
David

Comments

boris mann’s picture

I note that Planet Drupal suffers the same problem with incoming -- my feed doesn't display an image that uses a root-relative path.

I'm guessing this is an issue that needs fixing...

sethcohn’s picture

the problem is in common.inc:

function format_rss_item($title, $link, $description, $args = array()) {
  $output = "<item>\n";
  $output .= ' <title>'. check_plain($title) ."</title>\n";
  $output .= ' <link>'. check_url($link) ."</link>\n";
  $output .= ' <description>'. check_plain($description) ."</description>\n";

Description needs to be changed, as the URLs are relative and should be absolute ones. An ereg solution should do it, looking for src= and checking for "http://" in the src contents. You might want to look for other relative URLs as well, as other links might also be relative.

sethcohn’s picture

This isn't drupalish code (we can have global $base_url for example so we know the base already), but the core idea is here if someone wants some example code that does this, that they can adapt.

We have an absolute flag in url() and l() which isn't used enough.....

sunnymonkey’s picture

no clue how to do this. i can edit code etc but this is a bit too far past me.

Anyone care to give me something I can use, even if only a bodge temporary job thing. :)

Have people syndicating from the site complaining about the broken stuff, so having full links for everything is a must.

Dave

sunnymonkey’s picture

Can anyone help me? :(