plugin.php 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php
  2. /**
  3. * This script is a configuration file for the date plugin.
  4. * You can use it as a master for other platform plugins (course plugins are slightly different).
  5. * These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins).
  6. *
  7. * @package chamilo.plugin
  8. *
  9. * @author Julio Montoya <gugli100@gmail.com>
  10. */
  11. /**
  12. * Plugin details (must be present).
  13. */
  14. /* Plugin config */
  15. //the plugin title
  16. $plugin_info['title'] = 'Hello world';
  17. //the comments that go with the plugin
  18. $plugin_info['comment'] = "Shows a hello world message";
  19. //the plugin version
  20. $plugin_info['version'] = '1.0';
  21. //the plugin author
  22. $plugin_info['author'] = 'Julio Montoya';
  23. /* Plugin optional settings */
  24. /*
  25. * This form will be showed in the plugin settings once the plugin was installed
  26. * in the plugin/hello_world/index.php you can have
  27. * access to the value: $plugin_info['settings']['hello_world_show_type']
  28. */
  29. $form = new FormValidator('hello_world_form');
  30. //A simple select
  31. $options = ['hello_world' => 'Hello World', 'hello' => 'Hello', 'hi' => 'Hi!'];
  32. $form->addElement('select', 'show_type', 'Hello world types', $options);
  33. $form->addButtonSave(get_lang('Save'), 'submit_button');
  34. $plugin_info['settings_form'] = $form;