// strip html if ($html != 'a') { $my_blurb = strip_tags($my_blurb); } // trim descriptions if ($desc > 1) { // display specified substring numbers of chars; // html is stripped to prevent cut off tags // make sure we dont chop UTF-8 characters if ($utf == 'y') { $my_blurb = mb_substr($my_blurb, 0, $desc, 'UTF-8') . '...'; } else { $my_blurb = substr($my_blurb, 0, $desc) . '...'; } } $str .= "document.write('" . addslashes(strip_returns($my_blurb, $br)) . "');\n"; } $str .= "document.write('{$more_link}</li>');\n"; } $str .= "document.write('</ul></div>');\n"; } // end restrict_url } // Render as JavaScript // START OUTPUT // headers to tell browser this is a JS file if ($rss) { header("Content-type: application/x-javascript"); } // Spit out the results as the series of JS statements echo $feedcheck_str . $str;
$my_title = htmlentities($my_title); $my_title = str_replace('?', '-', $my_title); if ($my_title[strlen($my_title) - 1] == '-') { $my_title = substr($my_title, 0, -1) . '?'; } $my_title = str_replace('-t', "'t", $my_title); $my_title = str_replace('-s', "'s", $my_title); $my_title = str_replace('- - ', " - ", $my_title); $i_btag_marquee = ""; $i_etag_marquee = ""; if ($i_s_marquee == "y") { $i_btag_marquee = "<marquee>"; $i_etag_marquee = "</marquee>"; } // create a title attribute. thanks Seb! $title_str = substr(addslashes(strip_returns(strip_tags($item['summary']))), 0, 255) . '...'; // write the title strng $str .= "document.write('<p class=\"rss-item-title\" style=\"" . $content_style . "\" >" . $i_btag_marquee . "<a" . $blank_target . " class=\"rss-item\" style=\"" . $item_style . "\" href=\"" . trim($my_url) . "\">" . $my_title . "</a>" . $i_etag_marquee . "</p>');\n"; } else { // if no title, build a link to tag on the description $str .= "document.write('<p class=\"rss-item-excerpt\" style=\"" . $content_style . "\">');\n"; $more_link = " \r\n<a" . $blank_target . " class=\"rss-item\" style=\"" . $item_style . "\" href=\"" . trim($my_url) . "\">«details»</a></p>"; } // print out date if option indicated if ($date == 'y') { if ($tz == 'feed') { // echo the date/time stamp reported in the feed if ($item['pubdate'] != '') { // RSS 2.0 is alreayd formatted, so just use it $pretty_date = 'published on ' . $item['pubdate']; } elseif ($item['published'] != "") {