gpluspost: Optimizations to the RSS feed.

This commit is contained in:
Michael Vogel 2013-03-14 23:16:35 +01:00
parent 950154d655
commit b68cb696e6

View file

@ -327,6 +327,16 @@ function gpluspost_feeditem($pid, $uid) {
$link = current($links); $link = current($links);
} }
$multiplelinks = (sizeof($links) > 1); $multiplelinks = (sizeof($links) > 1);
if ($multiplelinks) {
$html2 = bbcode($msg, false, false);
$links2 = collecturls($html2);
if (sizeof($links2) > 0) {
reset($links2);
$link = current($links2);
$multiplelinks = (sizeof($links2) > 1);
}
}
} }
$msglink = ""; $msglink = "";
@ -350,8 +360,8 @@ function gpluspost_feeditem($pid, $uid) {
$title = $lines[0]; $title = $lines[0];
} }
if ($image != $msglink) //if ($image != $msglink)
$html = trim(str_replace($msglink, "", $html)); // $html = trim(str_replace($msglink, "", $html));
$title = trim(str_replace($msglink, "", $title)); $title = trim(str_replace($msglink, "", $title));
@ -360,6 +370,8 @@ function gpluspost_feeditem($pid, $uid) {
if ($uid == 0) if ($uid == 0)
$title = $item["author-name"].": ".$title; $title = $item["author-name"].": ".$title;
$msglink = htmlspecialchars(html_entity_decode($msglink));
$title = str_replace("&", "&", $title); $title = str_replace("&", "&", $title);
//$html = str_replace("&", "&", $html); //$html = str_replace("&", "&", $html);