]> git.wh0rd.org - tt-rss.git/blame - plugins/mark_button/init.php
remove $link
[tt-rss.git] / plugins / mark_button / init.php
CommitLineData
035d7a5a
AD
1<?php
2class Mark_Button extends Plugin {
035d7a5a
AD
3 private $host;
4
5 function init($host) {
035d7a5a
AD
6 $this->host = $host;
7
8 $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
9 }
10
11 function about() {
12 return array(1.0,
13 "Bottom un/star button for the combined mode",
14 "fox");
15 }
16
17 function hook_article_button($line) {
18 $marked_pic = "";
1666e955 19 $id = $line["id"];
035d7a5a 20
6322ac79 21 if (get_pref( "COMBINED_DISPLAY_MODE")) {
035d7a5a
AD
22 if (sql_bool_to_bool($line["marked"])) {
23 $marked_pic = "<img
24 src=\"images/mark_set.svg\"
25 class=\"markedPic\" alt=\"Unstar article\"
26 onclick='toggleMark($id)'>";
27 } else {
28 $marked_pic = "<img
29 src=\"images/mark_unset.svg\"
30 class=\"markedPic\" alt=\"Star article\"
31 onclick='toggleMark($id)'>";
32 }
33 }
34
35 return $marked_pic;
36 }
37}
38?>