$reply .= "<span class=\"main\">";
$reply .= "<span id='selected_prompt'></span>";
- $reply .= "
+ $reply .= "<span class=\"sel_links\">
<a href=\"#\" onclick=\"$sel_all_link\">".__('All')."</a>,
<a href=\"#\" onclick=\"$sel_unread_link\">".__('Unread')."</a>,
<a href=\"#\" onclick=\"$sel_inv_link\">".__('Invert')."</a>,
<a href=\"#\" onclick=\"$sel_none_link\">".__('None')."</a></li>";
- $reply .= " ";
+ $reply .= "</span> ";
$reply .= "<select dojoType=\"dijit.form.Select\"
onchange=\"headlineActionsChange(this)\">";
private function format_headlines_list($feed, $method, $view_mode, $limit, $cat_view,
$next_unread_feed, $offset, $vgr_last_feed = false,
- $override_order = false, $include_children = false, $check_first_id = false) {
+ $override_order = false, $include_children = false, $check_first_id = false,
+ $skip_first_id_check = false) {
$disable_cache = false;
"override_order" => $override_order,
"offset" => $offset,
"include_children" => $include_children,
- "check_first_id" => $check_first_id
+ "check_first_id" => $check_first_id,
+ "skip_first_id_check" => $skip_first_id_check
);
$qfh_ret = queryFeedHeadlines($params);
$feed, $cat_view, $search, $view_mode,
$last_error, $last_updated);
- $headlines_count = $this->dbh->num_rows($result);
-
- /* if (get_pref('COMBINED_DISPLAY_MODE')) {
- $button_plugins = array();
- foreach (explode(",", ARTICLE_BUTTON_PLUGINS) as $p) {
- $pclass = "button_" . trim($p);
-
- if (class_exists($pclass)) {
- $plugin = new $pclass();
- array_push($button_plugins, $plugin);
- }
- }
- } */
+ $headlines_count = is_numeric($result) ? 0 : $this->dbh->num_rows($result);
if ($offset == 0) {
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_HEADLINES_BEFORE) as $p) {
$reply['content'] = '';
- if (!is_numeric($result) && $this->dbh->num_rows($result) > 0) {
+ if ($headlines_count > 0) {
$lnum = $offset;
$reply['content'] .= "<div id='FTITLE-$feed_id' class='cdmFeedTitle'>".
"<div style='float : right'>$feed_icon_img</div>".
- "<a class='title' href=\"#\" onclick=\"viewfeed($feed_id)\">".
+ "<a class='title' href=\"#\" onclick=\"viewfeed({feed:$feed_id})\">".
$line["feed_title"]."</a>
$vf_catchup_link</div>";
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_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>";
}
}
if ($line["feed_title"] && !$vfeed_group_enabled) {
- $reply['content'] .= "<span onclick=\"viewfeed($feed_id)\"
+ $reply['content'] .= "<span onclick=\"viewfeed({feed:$feed_id})\"
style=\"cursor : pointer\"
title=\"".htmlspecialchars($line['feed_title'])."\">
$feed_icon_img</span>";
$reply['content'] .= "<div id='FTITLE-$feed_id' class='cdmFeedTitle'>".
"<div style=\"float : right\">$feed_icon_img</div>".
- "<a href=\"#\" class='title' onclick=\"viewfeed($feed_id)\">".
+ "<a href=\"#\" class='title' onclick=\"viewfeed({feed:$feed_id})\">".
$line["feed_title"]."</a> $vf_catchup_link</div>";
}
$reply['content'] .= "<div class=\"hlFeed\">
<a href=\"#\" style=\"background-color: rgba($rgba,0.3)\"
- onclick=\"viewfeed($feed_id)\">".
+ onclick=\"viewfeed({feed:$feed_id})\">".
truncate_string($line["feed_title"],30)."</a>
</div>";
}
if (!get_pref("VFEED_GROUP_BY_FEED") && $line["feed_title"]) {
$reply['content'] .= "<span style=\"cursor : pointer\"
title=\"".htmlspecialchars($line["feed_title"])."\"
- onclick=\"viewfeed($feed_id)\">$feed_icon_img</span>";
+ onclick=\"viewfeed({feed:$feed_id})\">$feed_icon_img</span>";
}
$reply['content'] .= "</div>";
$reply['content'] .= "</span>";
+ $reply['content'] .= "</div>";
+
+ $reply['content'] .= "<div class=\"cdmIntermediate\">";
+
$always_display_enclosures = sql_bool_to_bool($line["always_display_enclosures"]);
+ $reply['content'] .= format_article_enclosures($id, $always_display_enclosures, $line["content"], sql_bool_to_bool($line["hide_images"]));
$reply['content'] .= "</div>";
$reply['content'] .= "<div class=\"cdmFooter\" onclick=\"cdmFooterClick(event)\">";
- $reply['content'] .= format_article_enclosures($id, $always_display_enclosures, $line["content"], sql_bool_to_bool($line["hide_images"]));
- $reply['content'] .= "<br/>";
-
foreach (PluginHost::getInstance()->get_hooks(PluginHost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
$reply['content'] .= $p->hook_article_left_button($line);
}
$tags_str = format_tags_string($tags, $id);
+ $reply['content'] .= "<span class='left'>";
+
$reply['content'] .= "<img src='images/tag.png' alt='Tags' title='Tags'>
<span id=\"ATSTR-$id\">$tags_str</span>
<a title=\"".__('Edit tags for this article')."\"
if ($entry_comments) $reply['content'] .= " ($entry_comments)";
- $reply['content'] .= "<div style=\"float : right\">";
+ $reply['content'] .= "</span>";
+ $reply['content'] .= "<div>";
// $reply['content'] .= "$marked_pic";
// $reply['content'] .= "$published_pic";
$reply['headlines'] = array();
$override_order = false;
+ $skip_first_id_check = false;
switch ($order_by) {
case "title":
break;
case "date_reverse":
$override_order = "score DESC, date_entered, updated";
+ $skip_first_id_check = true;
break;
case "feed_dates":
$override_order = "updated DESC";
$ret = $this->format_headlines_list($feed, $method,
$view_mode, $limit, $cat_view, $next_unread_feed, $offset,
- $vgroup_last_feed, $override_order, true, $check_first_id);
+ $vgroup_last_feed, $override_order, true, $check_first_id, $skip_first_id_check);
//$topmost_article_ids = $ret[0];
$headlines_count = $ret[1];
//$reply['headlines']['content'] =& $ret[5]['content'];
//$reply['headlines']['toolbar'] =& $ret[5]['toolbar'];
- $reply['headlines'] =& $ret[5];
+ $reply['headlines'] = $ret[5];
if (!$next_unread_feed)
$reply['headlines']['id'] = $feed;