plugin.php 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. // PLUGIN INFORMATION
  3. $GLOBALS['plugins']['Test'] = array( // Plugin Name
  4. 'name' => 'Test', // Plugin Name
  5. 'author' => 'CauseFX', // Who wrote the plugin
  6. 'category' => 'Testing', // One to Two Word Description
  7. 'link' => '', // Link to plugin info
  8. 'license' => 'personal', // License Type use , for multiple
  9. 'idPrefix' => 'TEST', // html element id prefix (All Uppercase)
  10. 'configPrefix' => 'TEST', // config file prefix for array items without the hypen (All Uppercase)
  11. 'version' => '1.0.1', // SemVer of plugin
  12. 'image' => 'api/plugins/test/logo.png', // 1:1 non transparent image for plugin
  13. 'settings' => true, // does plugin need a settings modal?
  14. 'bind' => true, // use default bind to make settings page - true or false
  15. 'api' => 'api/v2/plugins/test/settings', // api route for settings page (All Lowercase)
  16. 'homepage' => false // Is plugin for use on homepage? true or false
  17. );
  18. class TestPlugin extends Organizr
  19. {
  20. public function _pluginGetSettings()
  21. {
  22. return array(
  23. 'Sample Settings' => array(
  24. array(
  25. 'type' => 'password-alt',
  26. 'name' => 'TEST-pass-alt',
  27. 'label' => 'Test Plugin Pass Alt',
  28. 'value' => $this->config['TEST-pass-alt'],
  29. ),
  30. array(
  31. 'type' => 'password',
  32. 'name' => 'TEST-pass',
  33. 'label' => 'Test Plugin Password',
  34. 'value' => $this->config['TEST-pass'],
  35. ),
  36. array(
  37. 'type' => 'text',
  38. 'name' => 'TEST-text',
  39. 'label' => 'Test Plugin Text',
  40. 'value' => $this->config['TEST-text'],
  41. 'placeholder' => 'All'
  42. ),
  43. ),
  44. 'FYI' => array(
  45. array(
  46. 'type' => 'html',
  47. 'label' => 'Note',
  48. 'html' => 'just a note...'
  49. )
  50. )
  51. );
  52. }
  53. }