plugin.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. *
  6. * @package chamilo.plugin
  7. *
  8. * @author Julio Montoya <gugli100@gmail.com>
  9. */
  10. /**
  11. * Plugin details (must be present).
  12. */
  13. //the plugin title
  14. $plugin_info['title'] = 'Add a button to login using FACEBOOK account';
  15. //the comments that go with the plugin
  16. $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";
  17. //the plugin version
  18. $plugin_info['version'] = '1.0';
  19. //the plugin author
  20. $plugin_info['author'] = 'Konrad Banasiak, Hubert Borderiou';
  21. //the plugin configuration
  22. $form = new FormValidator('add_facebook_button_form');
  23. $form->addElement(
  24. 'text',
  25. 'facebook_button_url',
  26. 'Facebook connexion image URL',
  27. ''
  28. );
  29. $form->addButtonSave(get_lang('Save'), 'submit_button');
  30. //get default value for form
  31. $tab_default_add_facebook_login_button_facebook_button_url = api_get_setting(
  32. 'add_facebook_login_button_facebook_button_url'
  33. );
  34. $defaults['facebook_button_url'] = $tab_default_add_facebook_login_button_facebook_button_url['add_facebook_login_button'];
  35. $form->setDefaults($defaults);
  36. //display form
  37. $plugin_info['settings_form'] = $form;
  38. // Set the templates that are going to be used
  39. $plugin_info['templates'] = ['template.tpl'];