$feed_title = $qfh_ret[1];
$feed_site_url = $qfh_ret[2];
$last_error = $qfh_ret[3];
$feed_title = $qfh_ret[1];
$feed_site_url = $qfh_ret[2];
$last_error = $qfh_ret[3];
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info);
$expand_cdm = get_pref('CDM_EXPANDED');
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("PS", $timing_info);
$expand_cdm = get_pref('CDM_EXPANDED');
- foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
- $line = $p->hook_query_headlines($line, 250, false);
- }
+ $line["content_preview"] = "— " . truncate_string(strip_tags($line["content"]), 250);
- if (get_pref('SHOW_CONTENT_PREVIEW')) {
- $content_preview = $line["content_preview"];
- }
+ foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_QUERY_HEADLINES) as $p) {
+ $line = $p->hook_query_headlines($line, 250, false);
+ }
+
+ if (get_pref('SHOW_CONTENT_PREVIEW')) {
+ $content_preview = $line["content_preview"];
+ }
- $labels_str = "<span class=\"HLLCTR-$id\">";
- $labels_str .= Article::format_article_labels($labels);
- $labels_str .= "</span>";
+ $labels_str = "<span class=\"HLLCTR-$id\">";
+ $labels_str .= Article::format_article_labels($labels);
+ $labels_str .= "</span>";
- if (count($topmost_article_ids) < 3) {
- array_push($topmost_article_ids, $id);
- }
+ if (count($topmost_article_ids) < 3) {
+ array_push($topmost_article_ids, $id);
+ }
src=\"images/mark_set.png\"
class=\"markedPic\" alt=\"Unstar article\"
onclick='toggleMark($id)'>";
src=\"images/mark_set.png\"
class=\"markedPic\" alt=\"Unstar article\"
onclick='toggleMark($id)'>";
src=\"images/mark_unset.png\"
class=\"markedPic\" alt=\"Star article\"
onclick='toggleMark($id)'>";
src=\"images/mark_unset.png\"
class=\"markedPic\" alt=\"Star article\"
onclick='toggleMark($id)'>";
- $updated_fmt = make_local_datetime($line["updated"], false, false, false, true);
- $date_entered_fmt = T_sprintf("Imported at %s",
- make_local_datetime($line["date_entered"], false));
+ $updated_fmt = make_local_datetime($line["updated"], false, false, false, true);
+ $date_entered_fmt = T_sprintf("Imported at %s",
+ make_local_datetime($line["date_entered"], false));
- if ($has_feed_icon) {
- $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">";
- } else {
- $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.png\" alt=\"\">";
- }
+ if ($has_feed_icon) {
+ $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"".ICONS_URL."/$feed_id.ico\" alt=\"\">";
+ } else {
+ $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"images/pub_set.png\" alt=\"\">";
+ }
- //setting feed headline background color, needs to change text color based on dark/light
- $fav_color = $line['favicon_avg_color'];
+ //setting feed headline background color, needs to change text color based on dark/light
+ $fav_color = $line['favicon_avg_color'];
- if ($fav_color && $fav_color != 'fail') {
- if (!isset($rgba_cache[$feed_id])) {
- $rgba_cache[$feed_id] = join(",", _color_unpack($fav_color));
- }
- }
+ if ($fav_color && $fav_color != 'fail') {
+ if (!isset($rgba_cache[$feed_id])) {
+ $rgba_cache[$feed_id] = join(",", _color_unpack($fav_color));
+ }
+ }
- $reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
- "<div style='float : right'>$feed_icon_img</div>".
- "<a class='title' href=\"#\" onclick=\"viewfeed({feed:$feed_id})\">".
- $line["feed_title"]."</a>
+ $reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
+ "<div style='float : right'>$feed_icon_img</div>".
+ "<a class='title' href=\"#\" onclick=\"viewfeed({feed:$feed_id})\">".
+ $line["feed_title"]."</a>
- if (get_pref('SHOW_CONTENT_PREVIEW')) {
- $reply['content'] .= "<span class=\"contentPreview\">" . $line["content_preview"] . "</span>";
- }
+ if (get_pref('SHOW_CONTENT_PREVIEW')) {
+ $reply['content'] .= "<span class=\"contentPreview\">" . $line["content_preview"] . "</span>";
+ }
- if (!$vfeed_group_enabled) {
- if (@$line["feed_title"]) {
- $rgba = @$rgba_cache[$feed_id];
+ if (!$vfeed_group_enabled) {
+ if (@$line["feed_title"]) {
+ $rgba = @$rgba_cache[$feed_id];
- $reply['content'] .= "<span class=\"hlFeed\"><a style=\"background : rgba($rgba, 0.3)\" href=\"#\" onclick=\"viewfeed({feed:$feed_id})\">".
- truncate_string($line["feed_title"],30)."</a></span>";
- }
- }
+ $reply['content'] .= "<span class=\"hlFeed\"><a style=\"background : rgba($rgba, 0.3)\" href=\"#\" onclick=\"viewfeed({feed:$feed_id})\">".
+ truncate_string($line["feed_title"],30)."</a></span>";
+ }
+ }
- if ($line["tag_cache"])
- $tags = explode(",", $line["tag_cache"]);
- else
- $tags = false;
+ if ($line["tag_cache"])
+ $tags = explode(",", $line["tag_cache"]);
+ else
+ $tags = false;
- $line["content"] = sanitize($line["content"],
- $line['hide_images'], false, $entry_site_url, $highlight_words, $line["id"]);
+ $line["content"] = sanitize($line["content"],
+ $line['hide_images'], false, $entry_site_url, $highlight_words, $line["id"]);
- foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_CDM) as $p) {
- $line = $p->hook_render_article_cdm($line);
- }
+ foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_RENDER_ARTICLE_CDM) as $p) {
+ $line = $p->hook_render_article_cdm($line);
+ }
- $feed_icon_src = Feeds::getFeedIcon($feed_id);
- $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"$feed_icon_src\">";
+ $feed_icon_src = Feeds::getFeedIcon($feed_id);
+ $feed_icon_img = "<img class=\"tinyFeedIcon\" src=\"$feed_icon_src\">";
- $reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
- "<div style=\"float : right\">$feed_icon_img</div>".
- "<a href=\"#\" class='title' onclick=\"viewfeed({feed:$feed_id})\">".
- $line["feed_title"]."</a> $vf_catchup_link</div>";
+ $reply['content'] .= "<div data-feed-id='$feed_id' id='FTITLE-$feed_id' class='cdmFeedTitle'>".
+ "<div style=\"float : right\">$feed_icon_img</div>".
+ "<a href=\"#\" class='title' onclick=\"viewfeed({feed:$feed_id})\">".
+ $line["feed_title"]."</a> $vf_catchup_link</div>";
- $tmp_content .= "<div class=\"cdmHeader\">";
- $tmp_content .= "<div style=\"vertical-align : middle\">";
+ $tmp_content .= "<div class=\"cdmHeader\">";
+ $tmp_content .= "<div style=\"vertical-align : middle\">";
- if ($highlight_words && count($highlight_words) > 0) {
- foreach ($highlight_words as $word) {
- $line["title"] = preg_replace("/(\Q$word\E)/i",
- "<span class=\"highlight\">$1</span>", $line["title"]);
- }
- }
+ if ($highlight_words && count($highlight_words) > 0) {
+ foreach ($highlight_words as $word) {
+ $line["title"] = preg_replace("/(\Q$word\E)/i",
+ "<span class=\"highlight\">$1</span>", $line["title"]);
+ }
+ }
onclick=\"return cdmClicked(event, $id);\"
data-article-id=\"$id\"
class=\"titleWrap hlMenuAttach $hlc_suffix\">
<a class=\"title $hlc_suffix\"
title=\"".htmlspecialchars($line["title"])."\"
target=\"_blank\" rel=\"noopener noreferrer\" href=\"".
onclick=\"return cdmClicked(event, $id);\"
data-article-id=\"$id\"
class=\"titleWrap hlMenuAttach $hlc_suffix\">
<a class=\"title $hlc_suffix\"
title=\"".htmlspecialchars($line["title"])."\"
target=\"_blank\" rel=\"noopener noreferrer\" href=\"".
<img src=\"images/collapse.png\" onclick=\"cdmCollapseArticle(event, $id)\"
title=\"".__("Collapse article")."\"/></span>";
<img src=\"images/collapse.png\" onclick=\"cdmCollapseArticle(event, $id)\"
title=\"".__("Collapse article")."\"/></span>";
- if (!$vfeed_group_enabled) {
- if (@$line["feed_title"]) {
- $rgba = @$rgba_cache[$feed_id];
+ if (!$vfeed_group_enabled) {
+ if (@$line["feed_title"]) {
+ $rgba = @$rgba_cache[$feed_id];
<a href=\"#\" style=\"background-color: rgba($rgba,0.3)\"
onclick=\"viewfeed({feed:$feed_id})\">".
<a href=\"#\" style=\"background-color: rgba($rgba,0.3)\"
onclick=\"viewfeed({feed:$feed_id})\">".
- $tmp_content .= "<div class='scoreWrap' style=\"vertical-align : middle\">";
- $tmp_content .= "$score_pic";
+ $tmp_content .= "<div class='scoreWrap' style=\"vertical-align : middle\">";
+ $tmp_content .= "$score_pic";
- if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) {
- $tmp_content .= "<span style=\"cursor : pointer\"
+ if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) {
+ $tmp_content .= "<span style=\"cursor : pointer\"
title=\"".htmlspecialchars($line["feed_title"])."\"
onclick=\"viewfeed({feed:$feed_id})\">$feed_icon_img</span>";
title=\"".htmlspecialchars($line["feed_title"])."\"
onclick=\"viewfeed({feed:$feed_id})\">$feed_icon_img</span>";
- $tmp_content .= "<div id=\"POSTNOTE-$id\">";
- if ($line['note']) {
- $tmp_content .= Article::format_article_note($id, $line['note']);
- }
- $tmp_content .= "</div>"; //POSTNOTE
+ $tmp_content .= "<div id=\"POSTNOTE-$id\">";
+ if ($line['note']) {
+ $tmp_content .= Article::format_article_note($id, $line['note']);
+ }
+ $tmp_content .= "</div>"; //POSTNOTE
- $tmp_content .= "<a target='_blank' rel='noopener noreferrer' href='" . htmlspecialchars($tmp_line['feed_url']) . "'>";
- $tmp_content .= "<img title='".__('Feed URL')."'class='tinyFeedIcon' src='images/pub_unset.png'></a>";
+ $tmp_content .= "<a target='_blank' rel='noopener noreferrer' href='" . htmlspecialchars($tmp_line['feed_url']) . "'>";
+ $tmp_content .= "<img title='".__('Feed URL')."'class='tinyFeedIcon' src='images/pub_unset.png'></a>";
- $tmp_content .= "<span id=\"CWRAP-$id\">";
- $tmp_content .= "<span id=\"CENCW-$id\" class=\"cencw\" style=\"display : none\">";
- $tmp_content .= htmlspecialchars($line["content"]);
- $tmp_content .= "</span>";
- $tmp_content .= "</span>";
+ $tmp_content .= "<span id=\"CWRAP-$id\">";
+ $tmp_content .= "<span id=\"CENCW-$id\" class=\"cencw\" style=\"display : none\">";
+ $tmp_content .= htmlspecialchars($line["content"]);
+ $tmp_content .= "</span>";
+ $tmp_content .= "</span>";
- $always_display_enclosures = $line["always_display_enclosures"];
- $tmp_content .= Article::format_article_enclosures($id, $always_display_enclosures,
- $line["content"], $line["hide_images"]);
+ $always_display_enclosures = $line["always_display_enclosures"];
+ $tmp_content .= Article::format_article_enclosures($id, $always_display_enclosures,
+ $line["content"], $line["hide_images"]);
- foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
- $tmp_content .= $p->hook_article_left_button($line);
- }
+ foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
+ $tmp_content .= $p->hook_article_left_button($line);
+ }
<span id=\"ATSTR-$id\">$tags_str</span>
<a title=\"".__('Edit tags for this article')."\"
href=\"#\" onclick=\"editArticleTags($id)\">(+)</a>";
<span id=\"ATSTR-$id\">$tags_str</span>
<a title=\"".__('Edit tags for this article')."\"
href=\"#\" onclick=\"editArticleTags($id)\">(+)</a>";
- if ($num_comments > 0) {
- if ($line["comments"]) {
- $comments_url = htmlspecialchars($line["comments"]);
- } else {
- $comments_url = htmlspecialchars($line["link"]);
- }
- $entry_comments = "<a class=\"postComments\"
+ if ($num_comments > 0) {
+ if ($line["comments"]) {
+ $comments_url = htmlspecialchars($line["comments"]);
+ } else {
+ $comments_url = htmlspecialchars($line["link"]);
+ }
+ $entry_comments = "<a class=\"postComments\"
- } else {
- if ($line["comments"] && $line["link"] != $line["comments"]) {
- $entry_comments = "<a class=\"postComments\" target='_blank' rel='noopener noreferrer' href=\"".htmlspecialchars($line["comments"])."\">".__("comments")."</a>";
- }
- }
+ } else {
+ if ($line["comments"] && $line["link"] != $line["comments"]) {
+ $entry_comments = "<a class=\"postComments\" target='_blank' rel='noopener noreferrer' href=\"".htmlspecialchars($line["comments"])."\">".__("comments")."</a>";
+ }
+ }
- foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_BUTTON) as $p) {
- $tmp_content .= $p->hook_article_button($line);
- }
+ foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_BUTTON) as $p) {
+ $tmp_content .= $p->hook_article_button($line);
+ }
- $tmp_content .= "</div>"; // cdmFooter
- $tmp_content .= "</div>"; // cdmContent
- $tmp_content .= "</div>"; // RROW.cdm
+ $tmp_content .= "</div>"; // cdmFooter
+ $tmp_content .= "</div>"; // cdmContent
+ $tmp_content .= "</div>"; // RROW.cdm
- foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_FORMAT_ARTICLE_CDM) as $p) {
- $tmp_content = $p->hook_format_article_cdm($tmp_content, $line);
- }
+ foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_FORMAT_ARTICLE_CDM) as $p) {
+ $tmp_content = $p->hook_format_article_cdm($tmp_content, $line);
+ }