X-Git-Url: https://git.wh0rd.org/?a=blobdiff_plain;f=classes%2Ffeeds.php;h=0a7b7a241b94247632e16f93621bf5e3cf863b9b;hb=5aa9c604943cbb93f4d401914dafeedfddb0007e;hp=0c1db62b6765b5c2f607e50be7c7fb35fda44085;hpb=c8c9a26f3071edc2f0307336b6dd6062e4351773;p=tt-rss.git diff --git a/classes/feeds.php b/classes/feeds.php index 0c1db62b..0a7b7a24 100755 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -277,7 +277,6 @@ class Feeds extends Handler_Protected { $lnum = $offset; $num_unread = 0; if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info); - $expand_cdm = get_pref('CDM_EXPANDED'); if (is_object($result)) { @@ -346,7 +345,7 @@ class Feeds extends Handler_Protected { $score_pic = "images/" . get_score_pic($score); - $score_pic = ""; if ($score > 500) { @@ -363,9 +362,7 @@ class Feeds extends Handler_Protected { $entry_author = " — $entry_author"; } - $has_feed_icon = feeds::feedHasIcon($feed_id); - - if ($has_feed_icon) { + if (feeds::feedHasIcon($feed_id)) { $feed_icon_img = "\"\""; } else { $feed_icon_img = "\"\""; @@ -393,7 +390,7 @@ class Feeds extends Handler_Protected { $vf_catchup_link = "".__('mark feed as read').""; - $reply['content'] .= "
". + $reply['content'] .= "
". "
$feed_icon_img
". "". $line["feed_title"]." @@ -405,7 +402,7 @@ class Feeds extends Handler_Protected { $reply['content'] .= "
"; - $reply['content'] .= "
"; + $reply['content'] .= "
"; $reply['content'] .= ""; - $reply['content'] .= ""; + $reply['content'] .= "" . truncate_string($line["title"], 200); if (get_pref('SHOW_CONTENT_PREVIEW')) { - $reply['content'] .= "" . $line["content_preview"] . ""; + $reply['content'] .= "" . $line["content_preview"] . ""; } $reply['content'] .= ""; @@ -437,18 +434,18 @@ class Feeds extends Handler_Protected { if (@$line["feed_title"]) { $rgba = @$rgba_cache[$feed_id]; - $reply['content'] .= "". + $reply['content'] .= "". truncate_string($line["feed_title"],30).""; } } - $reply['content'] .= ""; + $reply['content'] .= ""; $reply['content'] .= "
$updated_fmt
"; - $reply['content'] .= "
"; + $reply['content'] .= "
"; $reply['content'] .= $score_pic; @@ -489,7 +486,7 @@ class Feeds extends Handler_Protected { $feed_icon_src = Feeds::getFeedIcon($feed_id); $feed_icon_img = ""; - $reply['content'] .= "
". + $reply['content'] .= "
". "
$feed_icon_img
". "". $line["feed_title"]." $vf_catchup_link
"; @@ -497,14 +494,13 @@ class Feeds extends Handler_Protected { } } - $expanded_class = $expand_cdm ? "expanded" : "expandable"; - - $content_encoded = htmlspecialchars(json_encode($line["content"])); + $content_encoded = htmlspecialchars($line["content"]); - $tmp_content = "
"; - $tmp_content .= "
"; + $tmp_content .= "
"; $tmp_content .= "
"; $tmp_content .= " @@ -539,16 +535,9 @@ class Feeds extends Handler_Protected { $tmp_content .= $labels_str; - $tmp_content .= ""; - - if (!$expand_cdm) - $content_hidden = "style=\"display : none\""; - else - $excerpt_hidden = "style=\"display : none\""; - - $tmp_content .= "" . $content_preview . ""; + $tmp_content .= " + "; $tmp_content .= ""; @@ -556,7 +545,7 @@ class Feeds extends Handler_Protected { if (@$line["feed_title"]) { $rgba = @$rgba_cache[$feed_id]; - $tmp_content .= "
+ $tmp_content .= "
". truncate_string($line["feed_title"],30)." @@ -566,7 +555,7 @@ class Feeds extends Handler_Protected { $tmp_content .= "$updated_fmt"; - $tmp_content .= "
"; + $tmp_content .= "
"; $tmp_content .= "$score_pic"; if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) { @@ -574,13 +563,11 @@ class Feeds extends Handler_Protected { title=\"".htmlspecialchars($line["feed_title"])."\" onclick=\"viewfeed({feed:$feed_id})\">$feed_icon_img"; } - $tmp_content .= "
"; //scoreWrap + $tmp_content .= "
"; //score wrapper2 - $tmp_content .= "
"; //cdmHeader + $tmp_content .= "
"; //header - $tmp_content .= "
"; + $tmp_content .= "
"; $tmp_content .= "
"; if ($line['note']) { @@ -590,7 +577,8 @@ class Feeds extends Handler_Protected { if (!$line['lang']) $line['lang'] = 'en'; - $tmp_content .= "
"; + // this is filled from RROW data-content + $tmp_content .= "
"; if ($line["orig_feed_id"]) { @@ -618,8 +606,8 @@ class Feeds extends Handler_Protected { } } - $tmp_content .= "
"; //cdmContentInner - $tmp_content .= "
"; + $tmp_content .= "
"; //content-inner + $tmp_content .= "
"; $always_display_enclosures = $line["always_display_enclosures"]; $tmp_content .= Article::format_article_enclosures($id, $always_display_enclosures, @@ -627,7 +615,7 @@ class Feeds extends Handler_Protected { $tmp_content .= "
"; // cdmIntermediate - $tmp_content .= "
"; + $tmp_content .= "
"; foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) { $tmp_content .= $p->hook_article_left_button($line); @@ -651,13 +639,13 @@ class Feeds extends Handler_Protected { } else { $comments_url = htmlspecialchars($line["link"]); } - $entry_comments = "$num_comments ". _ngettext("comment", "comments", $num_comments).""; } else { if ($line["comments"] && $line["link"] != $line["comments"]) { - $entry_comments = "".__("comments").""; + $entry_comments = "".__("comments").""; } } @@ -672,7 +660,7 @@ class Feeds extends Handler_Protected { $tmp_content .= "
"; // buttons - $tmp_content .= "
"; // cdmFooter + $tmp_content .= "
"; // cdm footer $tmp_content .= "
"; // cdmContent $tmp_content .= "
"; // RROW.cdm