return array_search($method, $csrf_ignored) !== false;
}
- private function make_gradient($end, $class) {
- $start = $class == "even" ? "#f0f0f0" : "#ffffff";
-
- return "style='background: linear-gradient(left , $start 6%, $end 100%);
- background: -o-linear-gradient(left , $start 6%, $end 100%);
- background: -moz-linear-gradient(left , $start 6%, $end 100%);
- background: -webkit-linear-gradient(left , $start 6%, $end 100%);
- background: -ms-linear-gradient(left , $start 6%, $end 100%);
- background: -webkit-gradient(linear, left top, right top,
- color-stop(0.06, $start), color-stop(1, $end));'";
- }
-
private function format_headline_subtoolbar($feed_site_url, $feed_title,
$feed_id, $is_cat, $search,
$search_mode, $view_mode, $error) {
// right part
$reply .= "<span class='r'>";
+ $reply .= "<span id='selected_prompt'></span>";
$reply .= "<span id='feed_title'>";
if ($feed_site_url) {
//$reply .= "</h2";
+ foreach ($pluginhost->get_hooks($pluginhost::HOOK_HEADLINE_TOOLBAR_BUTTON) as $p) {
+ echo $p->hook_headline_toolbar_button($feed_id, $is_cat);
+ }
+
return $reply;
}
$feed_id = $line["feed_id"];
$label_cache = $line["label_cache"];
$labels = false;
- $label_row_style = "";
if ($label_cache) {
$label_cache = json_decode($label_cache, true);
if (!is_array($labels)) $labels = get_article_labels($this->link, $id);
- if (count($labels) > 0) {
- for ($i = 0; $i < min(4, count($labels)); $i++) {
- $bg = rgb2hsl(_color_unpack($labels[$i][3]));
-
- if ($bg && $bg[1] > 0) {
- $bg[1] = 0.1;
- $bg[2] = 1;
-
- $bg = _color_pack(hsl2rgb($bg));
- $label_row_style = $this->make_gradient($bg, $class);;
-
- break;
- }
- }
- }
-
$labels_str = "<span id=\"HLLCTR-$id\">";
$labels_str .= format_article_labels($labels, $id);
$labels_str .= "</span>";
array_push($topmost_article_ids, $id);
}
- if ($line["unread"] == "t" || $line["unread"] == "1") {
+ if (sql_bool_to_bool($line["unread"])) {
$class .= " Unread";
++$num_unread;
- $is_unread = true;
- } else {
- $is_unread = false;
}
- if ($line["marked"] == "t" || $line["marked"] == "1") {
- $marked_pic = "<img id=\"FMPIC-$id\"
+ if (sql_bool_to_bool($line["marked"])) {
+ $marked_pic = "<img
src=\"images/mark_set.svg\"
class=\"markedPic\" alt=\"Unstar article\"
- onclick='javascript:toggleMark($id)'>";
+ onclick='toggleMark($id)'>";
+ $class .= " marked";
} else {
- $marked_pic = "<img id=\"FMPIC-$id\"
+ $marked_pic = "<img
src=\"images/mark_unset.svg\"
class=\"markedPic\" alt=\"Star article\"
- onclick='javascript:toggleMark($id)'>";
+ onclick='toggleMark($id)'>";
}
- if ($line["published"] == "t" || $line["published"] == "1") {
- $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_set.svg\"
- class=\"markedPic\"
- alt=\"Unpublish article\" onclick='javascript:togglePub($id)'>";
+ if (sql_bool_to_bool($line["published"])) {
+ $published_pic = "<img src=\"images/pub_set.svg\"
+ class=\"pubPic\"
+ alt=\"Unpublish article\" onclick='togglePub($id)'>";
+ $class .= " published";
} else {
- $published_pic = "<img id=\"FPPIC-$id\" src=\"images/pub_unset.svg\"
- class=\"markedPic\"
- alt=\"Publish article\" onclick='javascript:togglePub($id)'>";
+ $published_pic = "<img src=\"images/pub_unset.svg\"
+ class=\"pubPic\"
+ alt=\"Publish article\" onclick='togglePub($id)'>";
}
# $content_link = "<a target=\"_blank\" href=\"".$line["link"]."\">" .
$entry_author = $line["author"];
if ($entry_author) {
- $entry_author = " - $entry_author";
+ $entry_author = " — $entry_author";
}
$has_feed_icon = feed_has_icon($feed_id);
$mouseover_attrs = "onmouseover='postMouseIn(event, $id)'
onmouseout='postMouseOut($id)'";
- $reply['content'] .= "<div class='hl $class' id='RROW-$id' $label_row_style $mouseover_attrs>";
+ $reply['content'] .= "<div class='hl $class' id='RROW-$id' $mouseover_attrs>";
$reply['content'] .= "<div class='hlLeft'>";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\" onclick=\"toggleSelectRow2(this)\"
- id=\"RCHK-$id\">";
+ class='rchk'>";
$reply['content'] .= "$marked_pic";
$reply['content'] .= "$published_pic";
$reply['content'] .= "<div class=\"cdm $expanded_class $class\"
id=\"RROW-$id\" $mouseover_attrs'>";
- $reply['content'] .= "<div class=\"cdmHeader\">";
-
+ //setting feed headline background color, needs to change text color based on dark/light
+ $fav_color = $line['favicon_avg_color'];
+ $reply['content'] .= "<div class=\"cdmHeader\" style=\"background-color: $fav_color;\">";
$reply['content'] .= "<div style=\"vertical-align : middle\">";
$reply['content'] .= "<input dojoType=\"dijit.form.CheckBox\"
type=\"checkbox\" onclick=\"toggleSelectRow2(this, false, true)\"
- id=\"RCHK-$id\">";
+ class='rchk'>";
$reply['content'] .= "$marked_pic";
$reply['content'] .= "$published_pic";
$reply['content'] .= "<div class=\"cdmFooter\">";
+ foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_LEFT_BUTTON) as $p) {
+ $reply['content'] .= $p->hook_article_left_button($line);
+ }
+
$tags_str = format_tags_string($line["tags"], $id);
$reply['content'] .= "<img src='images/tag.png' alt='Tags' title='Tags'>
$reply['content'] .= "<div style=\"float : right\">";
+// $reply['content'] .= "$marked_pic";
+// $reply['content'] .= "$published_pic";
+
foreach ($pluginhost->get_hooks($pluginhost::HOOK_ARTICLE_BUTTON) as $p) {
$reply['content'] .= $p->hook_article_button($line);
}
break;
default:
if ($feed < LABEL_BASE_INDEX) {
- $message = __("No articles found to display. You can assign articles to labels manually (see the Actions menu above) or use a filter.");
+ $message = __("No articles found to display. You can assign articles to labels manually from article header context menu (applies to all selected articles) or use a filter.");
} else {
$message = __("No articles found to display.");
}
$feed = db_escape_string($this->link, $_REQUEST["feed"]);
$method = db_escape_string($this->link, $_REQUEST["m"]);
$view_mode = db_escape_string($this->link, $_REQUEST["view_mode"]);
- $limit = (int) get_pref($this->link, "DEFAULT_ARTICLE_LIMIT");
+ $limit = 30;
@$cat_view = $_REQUEST["cat"] == "true";
@$next_unread_feed = db_escape_string($this->link, $_REQUEST["nuf"]);
@$offset = db_escape_string($this->link, $_REQUEST["skip"]);
$override_order = false;
switch ($order_by) {
- case "date_reverse":
- $override_order = "date_entered, updated";
- break;
- case "feed_dates":
- $override_order = "updated DESC";
- break;
+ case "title":
+ $override_order = "ttrss_entries.title";
+ break;
+ case "date_reverse":
+ $override_order = "date_entered, updated";
+ break;
+ case "feed_dates":
+ $override_order = "updated DESC";
+ break;
}
if ($_REQUEST["debug"]) $timing_info = print_checkpoint("04", $timing_info);