init.php 551 B

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