Cleaning code.

1.9.x
Julio Montoya 12 years ago
parent bc00fdf0c9
commit e32717cdb5
  1. 16
      plugin/add_cas_login_button/index.php
  2. 4
      plugin/add_cas_login_button/plugin.php
  3. 9
      plugin/add_cas_logout_button/index.php
  4. 21
      plugin/add_facebook_login_button/plugin.php
  5. 46
      plugin/add_shibboleth_login_button/plugin.php
  6. 4
      plugin/before_login/index.php
  7. 4
      plugin/date/plugin.php
  8. 11
      plugin/ext_auth_chamilo_logout_button_behaviour/index.php
  9. 1
      plugin/ext_auth_chamilo_logout_button_behaviour/plugin.php
  10. 2
      plugin/formLogin_hide_unhide/plugin.php
  11. 11
      plugin/jcapture/.settings/org.eclipse.jdt.core.prefs
  12. 64
      plugin/jcapture/action.php
  13. 5
      plugin/rss/plugin.php
  14. 3
      plugin/show_user_info/index.php
  15. 10
      plugin/show_user_info/plugin.php
  16. 2
      plugin/static/index.php
  17. 5
      plugin/static/lib/static_plugin.class.php
  18. 2
      plugin/ticket/start.php

@ -1,23 +1,27 @@
<?php
// Show the CAS button to login using CAS
require_once(api_get_path(SYS_PATH).'main/auth/cas/authcas.php');
require_once api_get_path(SYS_PATH).'main/auth/cas/authcas.php';
$_template['show_message'] = false;
$_template['show_message'] = false;
if (api_is_anonymous()) {
$_template['cas_activated'] = api_is_cas_activated();
$_template['cas_configured'] = cas_configured();
$_template['show_message'] = true;
$_template['show_message'] = true;
// the default title
$button_label = "Connexion via CAS";
if (!empty($plugin_info['settings']['add_cas_login_button_cas_button_label'])) {
$button_label = api_htmlentities($plugin_info['settings']['add_cas_login_button_cas_button_label']);
$button_label = api_htmlentities(
$plugin_info['settings']['add_cas_login_button_cas_button_label']
);
}
// the comm
$comm_label = api_htmlentities($plugin_info['settings']['add_cas_login_button_cas_button_comment']);;
$comm_label = api_htmlentities(
$plugin_info['settings']['add_cas_login_button_cas_button_comment']
);;
// URL of the image
$url_label = $plugin_info['settings']['add_cas_login_button_cas_image_url'];
$_template['button_label'] = $button_label;
$_template['comm_label'] = $comm_label;
$_template['url_label'] = $url_label;

@ -9,8 +9,6 @@
* Plugin details (must be present)
*/
//the plugin title
$plugin_info['title'] = 'Add a button to login using CAS';
@ -26,7 +24,7 @@ $form = new FormValidator('add_cas_button_form');
$form->addElement('text', 'cas_button_label', 'CAS connexion title', '');
$form->addElement('text', 'cas_button_comment', 'CAS connexion description', '');
$form->addElement('text', 'cas_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_login_button_cas_button_label = api_get_setting('add_cas_login_button_cas_button_label');
$tab_default_add_cas_login_button_cas_button_comment = api_get_setting('add_cas_login_button_cas_button_comment');

@ -3,7 +3,10 @@
global $_user;
$_template['show_message'] = false;
if (!api_is_anonymous() && api_get_setting('cas_activate') == 'true' && $_user['auth_source'] == CAS_AUTH_SOURCE) {
if (!api_is_anonymous() &&
api_get_setting('cas_activate') == 'true' &&
$_user['auth_source'] == CAS_AUTH_SOURCE
) {
$_template['show_message'] = true;
// the default title
$logout_label = "Deconnexion de CAS";
@ -14,8 +17,8 @@ if (!api_is_anonymous() && api_get_setting('cas_activate') == 'true' && $_user['
$logout_comment = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_comment']);;
// URL of the image
$logout_image_url = $plugin_info['settings']['add_cas_logout_button_cas_logout_image_url'];
$_template['logout_label'] = $logout_label;
$_template['logout_comment'] = $logout_comment;
$_template['logout_image_url'] = $logout_image_url;
}
}

@ -10,24 +10,31 @@
*/
//the plugin title
$plugin_info['title'] = 'Add a button to login using FACEBOOK account';
$plugin_info['title'] = 'Add a button to login using FACEBOOK account';
//the comments that go with the plugin
$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";
$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";
//the plugin version
$plugin_info['version'] = '1.0';
$plugin_info['version'] = '1.0';
//the plugin author
$plugin_info['author'] = 'Hubert Borderiou';
$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(
'text',
'facebook_button_url',
'Facebook connexion image URL',
''
);
$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');
$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'];
$form->setDefaults($defaults);
//display form
$plugin_info['settings_form'] = $form;
// Set the templates that are going to be used
$plugin_info['templates'] = array('template.tpl');
$plugin_info['templates'] = array('template.tpl');

@ -9,28 +9,46 @@
* Plugin details (must be present)
*/
//the plugin title
$plugin_info['title'] = 'Add a button to login using Shibboleth';
$plugin_info['title'] = 'Add a button to login using Shibboleth';
//the comments that go with the plugin
$plugin_info['comment'] = "If Shibboleth is configured, this plugin add a text and a button on the login page to login with Shibboleth. Configure plugin to add title, comment and logo.";
$plugin_info['comment'] = "If Shibboleth is configured, this plugin add a text and a button on the login page to login with Shibboleth. Configure plugin to add title, comment and logo.";
//the plugin version
$plugin_info['version'] = '1.0';
$plugin_info['version'] = '1.0';
//the plugin author
$plugin_info['author'] = 'Hubert Borderiou';
$plugin_info['author'] = 'Hubert Borderiou';
//the plugin configuration
$form = new FormValidator('add_shibboleth_button_form');
$form->addElement('text', 'shibboleth_button_label', 'shibboleth connexion title', '');
$form->addElement('text', 'shibboleth_button_comment', 'shibboleth connexion description', '');
$form->addElement('text', 'shibboleth_image_url', 'Logo URL if any (image, 50px height)');
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$form->addElement(
'text',
'shibboleth_button_label',
'shibboleth connexion title',
''
);
$form->addElement(
'text',
'shibboleth_button_comment',
'shibboleth connexion description',
''
);
$form->addElement(
'text',
'shibboleth_image_url',
'Logo URL if any (image, 50px height)'
);
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
//get default value for form
$tab_default_add_shibboleth_login_button_shibboleth_button_label = api_get_setting('add_shibboleth_login_button_shibboleth_button_label');
$tab_default_add_shibboleth_login_button_shibboleth_button_comment = api_get_setting('add_shibboleth_login_button_shibboleth_button_comment');
$tab_default_add_shibboleth_login_button_shibboleth_image_url = api_get_setting('add_shibboleth_login_button_shibboleth_image_url');
$tab_default_add_shibboleth_login_button_shibboleth_button_label = api_get_setting(
'add_shibboleth_login_button_shibboleth_button_label'
);
$tab_default_add_shibboleth_login_button_shibboleth_button_comment = api_get_setting(
'add_shibboleth_login_button_shibboleth_button_comment'
);
$tab_default_add_shibboleth_login_button_shibboleth_image_url = api_get_setting(
'add_shibboleth_login_button_shibboleth_image_url'
);
$defaults = array();
$defaults['shibboleth_button_label'] = $tab_default_add_shibboleth_login_button_shibboleth_button_label['add_shibboleth_login_button'];
$defaults['shibboleth_button_comment'] = $tab_default_add_shibboleth_login_button_shibboleth_button_comment['add_shibboleth_login_button'];
@ -40,4 +58,4 @@ $form->setDefaults($defaults);
$plugin_info['settings_form'] = $form;
//set the templates that are going to be used
$plugin_info['templates'] = array('template.tpl');
$plugin_info['templates'] = array('template.tpl');

@ -73,8 +73,6 @@ if (api_is_anonymous()) {
}
}
//$_template['option1'] = api_get_plugin_setting('before_login', 'option1');
//$_template['option2'] = api_get_plugin_setting('before_login', 'option2');
$_template['form_option1'] = $formHtml;
$_template['form_option2'] = $formHtml2;
}
}

@ -1,4 +1,4 @@
<?php //$id: $
<?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).
* These settings will be used in the administration interface for plugins (Chamilo configuration settings->Plugins)
@ -15,4 +15,4 @@ $plugin_info['comment']="Multinational date display";
//the plugin version
$plugin_info['version']='1.0';
//the plugin author
$plugin_info['author']='Yannick Warnier';
$plugin_info['author']='Yannick Warnier';

@ -1,9 +1,12 @@
<?php
// personalize the logout button behaviour
global $_user;
$_template['show_message'] = false;
$_template['show_message'] = false;
if (!api_is_anonymous() && api_get_setting('cas_activate') == 'true' && $_user['auth_source'] == CAS_AUTH_SOURCE) {
if (!api_is_anonymous() &&
api_get_setting('cas_activate') == 'true' &&
$_user['auth_source'] == CAS_AUTH_SOURCE
) {
$_template['show_message'] = true;
// the link URL
$link_url = "#";
@ -30,10 +33,10 @@ if (!api_is_anonymous() && api_get_setting('cas_activate') == 'true' && $_user['
if (!empty($plugin_info['settings']['ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_text'])) {
$alert_text = $plugin_info['settings']['ext_auth_chamilo_logout_button_behaviour_eaclbb_form_alert_text'];
}
$_template['link_url'] = $link_url;
$_template['link_infobulle'] = $link_infobulle;
$_template['link_image'] = $link_image;
$_template['alert_onoff'] = $alert_onoff;
$_template['alert_text'] = $alert_text;
}
}

@ -9,7 +9,6 @@
* Plugin details (must be present)
*/
//the plugin title
$plugin_info['title'] = 'Enable or disable logout button';

@ -9,8 +9,6 @@
* Plugin details (must be present)
*/
//the plugin title
$plugin_info['title'] = 'Hide/Unhide the Login/Password default form';

@ -1,11 +0,0 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.source=1.6

@ -4,38 +4,52 @@
*
* @author Pavel Vlasov
*/
if (!defined('DOKU_INC')) die();
if (!defined('DOKU_PLUGIN')) define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
require_once (DOKU_PLUGIN . 'action.php');
class action_plugin_jcapture extends DokuWiki_Action_Plugin {
/**
* return some info
*/
function getInfo(){
return array(
'author' => 'Pavel Vlasov',
'email' => 'Pavel.Vlasov@hammurapi.com',
'name' => 'JCapture',
'desc' => 'Plugin for making screen captures.',
'url' => 'http://www.hammurapi.com/dokuwiki/doku.php/products:jcapture:start',
);
}
if (!defined('DOKU_INC')) {
die();
}
if (!defined('DOKU_PLUGIN')) {
define('DOKU_PLUGIN', DOKU_INC . 'lib/plugins/');
}
require_once(DOKU_PLUGIN . 'action.php');
class action_plugin_jcapture extends DokuWiki_Action_Plugin
{
/**
* return some info
*/
function getInfo()
{
return array(
'author' => 'Pavel Vlasov',
'email' => 'Pavel.Vlasov@hammurapi.com',
'name' => 'JCapture',
'desc' => 'Plugin for making screen captures.',
'url' => 'http://www.hammurapi.com/dokuwiki/doku.php/products:jcapture:start',
);
}
/**
* Register the eventhandlers
*/
function register(&$controller) {
$controller->register_hook('TOOLBAR_DEFINE', 'AFTER', $this, 'insert_button', array ());
function register(&$controller)
{
$controller->register_hook(
'TOOLBAR_DEFINE',
'AFTER',
$this,
'insert_button',
array()
);
}
/**
* Inserts the toolbar button
*/
function insert_button(& $event, $param) {
$event->data[] = array (
function insert_button(& $event, $param)
{
$event->data[] = array(
'type' => 'JCapture',
'title' => 'Screen capture',
'icon' => '../../plugins/jcapture/camera.png',
@ -43,6 +57,6 @@ class action_plugin_jcapture extends DokuWiki_Action_Plugin {
'close' => '</abutton>',
);
}
}

@ -1,15 +1,14 @@
<?php
/**
*
*
* @see http://www.google.com/uds/solutions/dynamicfeed/index.html
*
*
* @copyright (c) 2011 University of Geneva
* @license GNU General Public License - http://www.gnu.org/copyleft/gpl.html
* @author Laurent Opprecht
*/
require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
require_once dirname(__FILE__) . '/lib/rss_plugin.class.php';

@ -1,5 +1,4 @@
<?php
// A user must be logged in.
$_template['show_message'] = false;
@ -15,4 +14,4 @@ if (!api_is_anonymous()) {
// You can also use template setting variables in the special variable called template.
$_template['user_info'] = $user_info;
$_template['username'] = $user_info['username'];
}
}

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

@ -1,9 +1,7 @@
<?php
$plugin = StaticPlugin::create();
$content = $plugin->get_content();
$title = $plugin->get_block_title();
$title = $title ? "<h4>$title</h4>" : '';

@ -9,10 +9,9 @@
*/
class StaticPlugin extends Plugin
{
/**
*
* @return StaticPlugin
* @return StaticPlugin
*/
static function create()
{
@ -35,4 +34,4 @@ class StaticPlugin extends Plugin
parent::__construct('1.1', 'Laurent Opprecht', array('block_title' => 'text', 'content' => 'wysiwyg'));
}
}
}

@ -15,9 +15,7 @@ $bbb = new bbb();
if ($bbb->plugin_enabled) {
if ($bbb->is_server_running()) {
if (isset($_GET['launch']) && $_GET['launch'] == 1) {
$meeting_params = array();
$meeting_params['meeting_name'] = api_get_course_id();

Loading…
Cancel
Save