]>
Commit | Line | Data |
---|---|---|
989b399e AD |
1 | <?php |
2 | class Close_Button extends Plugin { | |
3 | private $link; | |
4 | private $host; | |
5 | ||
6 | function init($host) { | |
7 | $this->link = $host->get_link(); | |
8 | $this->host = $host; | |
9 | ||
10 | $host->add_hook($host::HOOK_ARTICLE_BUTTON, $this); | |
11 | } | |
12 | ||
13 | function about() { | |
14 | return array(1.0, | |
15 | "Adds a button to close article panel", | |
16 | "fox"); | |
17 | } | |
18 | ||
19 | function hook_article_button($line) { | |
20 | if (!get_pref($this->link, "COMBINED_DISPLAY_MODE")) { | |
2a3b6de0 | 21 | $rv = "<img src=\"plugins/close_button/button.png\" |
989b399e AD |
22 | class='tagsPic' style=\"cursor : pointer\" |
23 | onclick=\"closeArticlePanel()\" | |
24 | title='".__('Close article')."'>"; | |
25 | } | |
26 | ||
27 | return $rv; | |
28 | } | |
989b399e AD |
29 | } |
30 | ?> |