Minor - Fixing tab/whitespaces, code style

1.9.x
Julio Montoya 12 years ago
parent e84ef79420
commit 17599f1009
  1. 6
      plugin/add_cas_logout_button/plugin.php
  2. 6
      plugin/add_facebook_login_button/plugin.php
  3. 4
      plugin/ext_auth_chamilo_logout_button_behaviour/plugin.php
  4. 4
      plugin/hello_world/index.php
  5. 14
      plugin/hello_world/plugin.php
  6. 14
      plugin/share_buttons/plugin.php
  7. 4
      plugin/show_regions/index.php
  8. 20
      plugin/show_user_info/index.php
  9. 14
      plugin/show_user_info/plugin.php

@ -9,8 +9,6 @@
* Plugin details (must be present)
*/
//the plugin title
$plugin_info['title'] = 'Add a button to logout from CAS';
@ -25,7 +23,7 @@ $form = new FormValidator('add_cas_button_form');
$form->addElement('text', 'cas_logout_label', 'CAS logout title', '');
$form->addElement('text', 'cas_logout_comment', 'CAS logout description', '');
$form->addElement('text', 'cas_logout_image_url', 'Logo URL if any (image, 50px height)');
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
//get default value for form
$tab_default_add_cas_logout_button_cas_logout_label = api_get_setting('add_cas_logout_button_cas_logout_label');
$tab_default_add_cas_logout_button_cas_logout_comment = api_get_setting('add_cas_logout_button_cas_logout_comment');
@ -37,5 +35,5 @@ $form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;
//set the smarty templates that are going to be used
// Set the templates that are going to be used
$plugin_info['templates'] = array('template.tpl');

@ -9,8 +9,6 @@
* Plugin details (must be present)
*/
//the plugin title
$plugin_info['title'] = 'Add a button to login using FACEBOOK account';
@ -23,7 +21,7 @@ $plugin_info['author'] = 'Hubert Borderiou';
//the plugin configuration
$form = new FormValidator('add_facebook_button_form');
$form->addElement('text', 'facebook_button_url', 'Facebook connexion image URL', '');
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
//get default value for form
$tab_default_add_facebook_login_button_facebook_button_url = api_get_setting('add_facebook_login_button_facebook_button_url');
$defaults['facebook_button_url'] = $tab_default_add_facebook_login_button_facebook_button_url['add_facebook_login_button'];
@ -31,5 +29,5 @@ $form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;
//set the smarty templates that are going to be used
// Set the templates that are going to be used
$plugin_info['templates'] = array('template.tpl');

@ -28,7 +28,7 @@ $form->addElement('checkbox', 'eaclbb_form_link_image', "Display the logout butt
$form->addElement('checkbox', 'eaclbb_form_alert_onoff', "Display an alert when clicking on the logout button", "", array('checked' => true));
$form->addElement('text', 'eaclbb_form_alert_text', "Text displayed in the alert box when clickng on the logout button (if checkbox above has been checked).");
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
//get default value for form
$tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url = api_get_setting('ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_url');
$tab_default_ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_infobulle = api_get_setting('ext_auth_chamilo_logout_button_behaviour_eaclbb_form_link_infobulle');
@ -44,5 +44,5 @@ $form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;
//set the smarty templates that are going to be used
// Set the templates that are going to be used
$plugin_info['templates'] = array('template.tpl');

@ -3,13 +3,13 @@
* @package chamilo.plugin.hello_world
*/
// See also the share_user_info plugin
// See also the share_user_info plugin
echo '<div class="well">';
if (!empty($plugin_info['settings']['hello_world_show_type'])) {
echo "<h2>".$plugin_info['settings']['hello_world_show_type']."</h2>";
} else {
echo "<h2>Hello world</h2>";
echo "<h2>Hello world</h2>";
}
//Using get_lang inside a plugin

@ -1,6 +1,7 @@
<?php
/**
* 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).
* 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).
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
* @package chamilo.plugin
* @author Julio Montoya <gugli100@gmail.com>
@ -20,11 +21,10 @@ $plugin_info['version'] = '1.0';
//the plugin author
$plugin_info['author'] = 'Julio Montoya';
/* Plugin optional settings */
/* Plugin optional settings */
/*
* This form will be showed in the plugin settings once the plugin was installed
/*
* This form will be showed in the plugin settings once the plugin was installed
* in the plugin/hello_world/index.php you can have access to the value: $plugin_info['settings']['hello_world_show_type']
*/
@ -33,6 +33,6 @@ $form = new FormValidator('hello_world_form');
//A simple select
$options = array('hello_world' => 'Hello World', 'hello' =>'Hello', 'hi' =>'Hi!');
$form->addElement('select', 'show_type', 'Hello world types', $options);
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$plugin_info['settings_form'] = $form;
$plugin_info['settings_form'] = $form;

@ -1,20 +1,20 @@
<?php
/**
* This script is a configuration file for the add_this plugin.
* These settings will be used in the administration interface for plugins
* These settings will be used in the administration interface for plugins
* (Chamilo configuration settings->Plugins)
* @package chamilo.plugin
* @author Julio Montoya <gugli100@gmail.com>
*/
/* Plugin config */
//the plugin title
// The plugin title.
$plugin_info['title'] = 'Share this page';
//the comments that go with the plugin
// The comments that go with the plugin.
$plugin_info['comment'] = "Show social icons to share a page using addthis.com";
//the plugin version
// The plugin version.
$plugin_info['version'] = '1.0';
//the plugin author
// The plugin author.
$plugin_info['author'] = 'Julio Montoya';
//For bigger icons change this value to addthis_32x32_style
$plugin_info['icon_class'] = '';
// For bigger icons change this value to addthis_32x32_style
$plugin_info['icon_class'] = '';

@ -1,9 +1,9 @@
<?php
//only show the region information if the admin is logged in
// Only show the region information if the admin is logged in.
if (api_is_platform_admin()) {
echo '<div style="color:black;height:50px;width:200px;background-color:#FFE378">';
//We can have access to the current block and the block information with the variable $plugin_info (see your plugin.php)
echo $plugin_info['current_region'];
echo '</div>';
echo '</div>';
}

@ -1,18 +1,18 @@
<?php
//A user must be logged in
// A user must be logged in.
$_template['show_message'] = false;
if (!api_is_anonymous()) {
$_template['show_message'] = true;
//Getting the current user id
$user_id = api_get_user_id();
//Getting the current user info
// Getting the current user id.
$user_id = api_get_user_id();
//Getting the current user info.
$user_info = api_get_user_info($user_id);
//You can also use template setting variables in the special variable called template
$_template['user_info'] = $user_info;
$_template['username'] = $user_info['username'];
// You can also use template setting variables in the special variable called template.
$_template['user_info'] = $user_info;
$_template['username'] = $user_info['username'];
}

@ -9,15 +9,13 @@
* Plugin details (must be present)
*/
//the plugin title
// The plugin title
$plugin_info['title'] = 'Show user information';
//the comments that go with the plugin
// The comments that go with the plugin
$plugin_info['comment'] = "Shows a welcome message, (this is an example to uses the template system: Twig)";
//the plugin version
// The plugin version
$plugin_info['version'] = '1.0';
//the plugin author
// The plugin author
$plugin_info['author'] = 'Julio Montoya';
//set the smarty templates that are going to be used
$plugin_info['templates'] = array('template.tpl');
// Set the templates that are going to be used
$plugin_info['templates'] = array('template.tpl');

Loading…
Cancel
Save