plugin.php 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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->addTextarea('content', get_lang('Content'));
  22. $form->addButtonSave(get_lang('Save'), 'submit_button');
  23. $content = '';
  24. $setting = api_get_setting('text_content');
  25. if (!empty($setting) && is_array($setting)) {
  26. if (isset($setting['text'])) {
  27. $content = $setting['text'];
  28. }
  29. }
  30. $form->setDefaults(array('content' => $content));
  31. $plugin_info['settings_form'] = $form;