]>
Commit | Line | Data |
---|---|---|
989b399e AD |
1 | <?php |
2 | class Close_Button extends Plugin { | |
989b399e AD |
3 | private $host; |
4 | ||
5 | function init($host) { | |
989b399e 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 | "Adds a button to close article panel", | |
14 | "fox"); | |
15 | } | |
16 | ||
17 | function hook_article_button($line) { | |
a42c55f0 | 18 | if (!get_pref("COMBINED_DISPLAY_MODE")) { |
2a3b6de0 | 19 | $rv = "<img src=\"plugins/close_button/button.png\" |
989b399e AD |
20 | class='tagsPic' style=\"cursor : pointer\" |
21 | onclick=\"closeArticlePanel()\" | |
22 | title='".__('Close article')."'>"; | |
23 | } | |
24 | ||
25 | return $rv; | |
26 | } | |
106a3de9 AD |
27 | |
28 | function api_version() { | |
29 | return 2; | |
30 | } | |
31 | ||
989b399e AD |
32 | } |
33 | ?> |