plugin.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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. * @package chamilo.plugin
  7. * @author Julio Montoya <gugli100@gmail.com>
  8. */
  9. /**
  10. * Plugin details (must be present)
  11. */
  12. /* Plugin config */
  13. //the plugin title
  14. $plugin_info['title'] = 'Hello world';
  15. //the comments that go with the plugin
  16. $plugin_info['comment'] = "Shows a hello world message";
  17. //the plugin version
  18. $plugin_info['version'] = '1.0';
  19. //the plugin author
  20. $plugin_info['author'] = 'Julio Montoya';
  21. /* Plugin optional settings */
  22. /*
  23. * This form will be showed in the plugin settings once the plugin was installed
  24. * in the plugin/hello_world/index.php you can have access to the value: $plugin_info['settings']['hello_world_show_type']
  25. */
  26. $form = new FormValidator('hello_world_form');
  27. //A simple select
  28. $options = array('hello_world' => 'Hello World', 'hello' =>'Hello', 'hi' =>'Hi!');
  29. $form->addElement('select', 'show_type', 'Hello world types', $options);
  30. $form->addButtonSave(get_lang('Save'), 'submit_button');
  31. $plugin_info['settings_form'] = $form;