init.php 517 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. class article_toolbar extends Plugin {
  3. private $host;
  4. function about() {
  5. return array(1.1,
  6. "Toolbar for easy access to feed functions",
  7. "idoxlr8", false);
  8. }
  9. function init($host) {
  10. $this->host = $host;
  11. $host->add_hook($host::HOOK_TOOLBAR_BUTTON, $this);
  12. }
  13. function get_js() {
  14. return file_get_contents(dirname(__FILE__) . "/toolbar.js");
  15. }
  16. function HOOK_TOOLBAR_BUTTON() {
  17. require_once dirname(__FILE__) . "/toolbar_body.php";
  18. }
  19. function api_version() {
  20. return 2;
  21. }
  22. }
  23. ?>