action.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. <?php
  2. /**
  3. * JCapture plugin
  4. *
  5. * @author Pavel Vlasov
  6. */
  7. if (!defined('DOKU_INC')) die();
  8. if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC.'lib/plugins/');
  9. require_once (DOKU_PLUGIN.'action.php');
  10. class action_plugin_jcapture extends DokuWiki_Action_Plugin {
  11. /**
  12. * return some info
  13. */
  14. function getInfo() {
  15. return array(
  16. 'author' => 'Pavel Vlasov',
  17. 'email' => 'Pavel.Vlasov@nasdanika.com',
  18. 'name' => 'JCapture',
  19. 'desc' => 'Plugin for making screen captures.',
  20. 'url' => 'http://www.nasdanika.com/wiki/doku.php?id=products:jcapture:start',
  21. );
  22. }
  23. /**
  24. * Register the eventhandlers
  25. */
  26. function register(&$controller) {
  27. $controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array());
  28. }
  29. /**
  30. * Inserts the toolbar button
  31. */
  32. function insert_button(& $event, $param) {
  33. $event->data[] = array(
  34. 'type' => 'JCapture',
  35. 'title' => 'Screen capture',
  36. 'icon' => '../../plugins/jcapture/camera.png',
  37. 'open' => '<abutton>',
  38. 'close' => '</abutton>',
  39. );
  40. }
  41. }