diff options
author | Andrew Dolgov <[email protected]> | 2013-04-09 16:13:32 +0400 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2013-04-09 16:13:32 +0400 |
commit | 035d7a5a8fae5620e9b6121a5b5fa270184096ba (patch) | |
tree | e0f53083d161256e5862765e61753a307b370cf6 /classes/feeds.php | |
parent | af4204def22268eab0bc42e92955d78dc15f822b (diff) |
implement support for multiple pub/mark buttons, add plugin which adds a separate mark button to article botton in combined mode (closes #382)
Diffstat (limited to 'classes/feeds.php')
-rw-r--r-- | classes/feeds.php | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/classes/feeds.php b/classes/feeds.php index ed0785c09..521aec708 100644 --- a/classes/feeds.php +++ b/classes/feeds.php @@ -343,34 +343,33 @@ class Feeds extends Handler_Protected { 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"]."\">" . @@ -706,6 +705,9 @@ class Feeds extends Handler_Protected { $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); } |