plugin.php 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /* See license terms in /license.txt */
  3. /**
  4. * This script is a configuration file for the date plugin.
  5. * You can use it as a master for other platform plugins (course plugins are slightly different).
  6. * These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
  7. * @package chamilo.plugin
  8. * @author Julio Montoya <gugli100@gmail.com>
  9. */
  10. /* Plugin config */
  11. //the plugin title
  12. $plugin_info['title'] = 'Text';
  13. //the comments that go with the plugin
  14. $plugin_info['comment'] = "Displays a text message";
  15. //the plugin version
  16. $plugin_info['version'] = '1.0';
  17. //the plugin author
  18. $plugin_info['author'] = 'Julio Montoya';
  19. /* Plugin optional settings */
  20. $form = new FormValidator('text_form');
  21. $form->add_textarea('content', get_lang('Content'));
  22. $form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
  23. $content = '';
  24. $setting = api_get_full_setting('text_content');
  25. if (!empty($setting) && is_array($setting)) {
  26. $setting = current($setting);
  27. if (isset($setting['selected_value'])) {
  28. $content = $setting['selected_value'];
  29. }
  30. }
  31. $form->setDefaults(array('content' => $content));
  32. $plugin_info['settings_form'] = $form;