plugin.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * This script is a configuration file for the date plugin. You can use it as a master for other platform plugins (course plugins are slightly different).
  4. * These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
  5. * @package chamilo.plugin
  6. * @author Julio Montoya <gugli100@gmail.com>
  7. */
  8. /**
  9. * Plugin details (must be present)
  10. */
  11. //the plugin title
  12. $plugin_info['title'] = 'Add a button to login using FACEBOOK account';
  13. //the comments that go with the plugin
  14. $plugin_info['comment'] = "If Facebook authntification is activated, this plugin add a button Facebook Connexion on the login page. Configure plugin to add title, comment and logo. Should be place in login_top region";
  15. //the plugin version
  16. $plugin_info['version'] = '1.0';
  17. //the plugin author
  18. $plugin_info['author'] = 'Konrad Banasiak, Hubert Borderiou';
  19. //the plugin configuration
  20. $form = new FormValidator('add_facebook_button_form');
  21. $form->addElement(
  22. 'text',
  23. 'facebook_button_url',
  24. 'Facebook connexion image URL',
  25. ''
  26. );
  27. $form->addButtonSave(get_lang('Save'), 'submit_button');
  28. //get default value for form
  29. $tab_default_add_facebook_login_button_facebook_button_url = api_get_setting(
  30. 'add_facebook_login_button_facebook_button_url'
  31. );
  32. $defaults['facebook_button_url'] = $tab_default_add_facebook_login_button_facebook_button_url['add_facebook_login_button'];
  33. $form->setDefaults($defaults);
  34. //display form
  35. $plugin_info['settings_form'] = $form;
  36. // Set the templates that are going to be used
  37. $plugin_info['templates'] = array('template.tpl');