summaryrefslogtreecommitdiff
path: root/plugins/close_button/init.php
blob: 6fdd96f557272baea79c4797be5cb54603cd7b99 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
class Close_Button extends Plugin {
	private $host;

	function init($host) {
		$this->host = $host;

		$host->add_hook($host::HOOK_ARTICLE_BUTTON, $this);
	}

	function about() {
		return array(1.0,
			"Adds a button to close article panel",
			"fox");
	}

	function hook_article_button($line) {
		if (!get_pref( "COMBINED_DISPLAY_MODE")) {
			$rv = "<img src=\"plugins/close_button/button.png\"
				class='tagsPic' style=\"cursor : pointer\"
				onclick=\"closeArticlePanel()\"
				title='".__('Close article')."'>";
		}

		return $rv;
	}
}
?>