1 = characters to display // values of -1 indicate to display item without the title as a link // (default=0) if (!isset($desc)) $desc = 0; // flag to show date of posts, values: no/yes (default=no) $date = (isset($date)) ? $date : 'n'; // time zone offset for making local time, // e.g. +7, =-10.5; 'feed' = print the time string in the RSS w/o conversion $tz = (isset($tz)) ? $tz : 'feed'; // flag to open target window in new window; n = same window, y = new window, // other = targeted window, 'popup' = call JavaScript function popupfeed to display // in new window // (default is n) if (!isset($targ)) $targ = 'n'; if ($targ == 'n') { $target_window = ' target="_self"'; } elseif ($targ == 'y' ) { $target_window = ' target="_blank"'; } elseif ($targ == 'popup') { $target_window = ' onClick="popupfeed(this.href);return false"'; } else { $target_window = ' target="' . $targ . '"'; } // flag to show feed as full html output rather than JavaScript, used for alternative // views for JavaScript-less users. // y = display html only for non js browsers // n = default (JavaScript view) // a = display javascript output but allow HTML // p = display text only items but convert linefeeds to BR tags // default setting for no conversion of linebreaks if (!isset($html)) $html = 'n'; $br = ' '; if ($html == 'a') { $desc = 1; } elseif ($html == 'p') { $br = '
'; } // optional parameter to use different class for the CSS container if (isset($css)) { $rss_box_id = '-' . $css; } else { $rss_box_id = ''; } if (isset($pc)) { $play_podcast = $pc; } else { $play_podcast = 'n'; } // PARSE FEED and GENERATE OUTPUT ------------------------------- // This is where it all happens! // Fetch the data, thanks Magpie $rss = @fetch_rss( $src ); // begin javascript output string for channel info $str = "
\n"; // no feed found by magpie, return error statement if (!$rss) { // error, nothing grabbed $str.= "

Error: Feed failed! Causes may be (1) No data found for RSS feed $src; (2) There are no items are available for this feed; (3) The RSS feed does not validate.

Please verify that the URL $src works first in your browser and that the feed passes a validator test.

\n"; } else { if ($chan == 'y') { // output channel title and description $str.= "

channel['link']) . "\" target=\"" . $target_window . "\">" . strip_returns($rss->channel['title']) . "
" . strip_returns($rss->channel['description']) . "

\n"; } elseif ($chan == 'title') { // output title only $str.= "

channel['link']) . "\" target=\"" . $target_window . "\">" . strip_returns($rss->channel['title']) . "

\n"; } // begin item listing $str.= "
\n"; echo $str; ?>