1 = characters to display
// (default=0)
if (!$desc) $desc = 0;
// flag to show date of posts, values: no/yes (default=no)
if (!$date) $date = 'n';
// flag to open target window in new window; n = same window, y = new window,
// other = targeted window
// (default is n)
// 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 (!$targ or $targ == 'n') {
$target_window = ' target="_self"';
} elseif ($targ == 'y' ) {
$target_window = ' target="_blank"';
} elseif ($targ == 'popup') {
$target_window = ' target="popup" 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
$br = ' ';
if (!$html) $html = 'n';
if ($html == 'a') {
$desc = 1;
} elseif ($html == 'p') {
$br = '
';
}
// 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 = "
Error! Error! No data was found for RSS feed $src or no items available for this feed
/div>\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']) . "