Bläddra i källkod

Remove unsupported plugins in master
before_login should be rewritten using symfony2 listeners

jmontoya 9 år sedan
förälder
incheckning
15421adc4d

+ 0 - 12
plugin/add_cas_login_button/css.css

@@ -1,12 +0,0 @@
-.cas_plugin_image {
-    float:left; 
-    height:50px;
-    margin: 0px 5px 5px 0px;        
-}
-.cas_plugin_comm {
-    font-style:italic;
-}
-.cas_plugin_clear {
-    clear:both;
-    height:1px;
-}

+ 0 - 28
plugin/add_cas_login_button/index.php

@@ -1,28 +0,0 @@
-<?php
-// Show the CAS button to login using CAS
-require_once api_get_path(SYS_PATH).'main/auth/cas/authcas.php';
-
-$_template['show_message'] = false;
-
-if (api_is_anonymous()) {
-    $_template['cas_activated'] = api_is_cas_activated();
-    $_template['cas_configured'] = cas_configured();
-    $_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']
-        );
-    }
-    // the comm
-    $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;
-}

+ 0 - 41
plugin/add_cas_login_button/plugin.php

@@ -1,41 +0,0 @@
-<?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)
- * @package chamilo.plugin
- * @author Julio Montoya <gugli100@gmail.com>
- */
-/**
- * Plugin details (must be present)
- */
-
-//the plugin title
-$plugin_info['title']      = 'Add a button to login using CAS';
-
-//the comments that go with the plugin
-$plugin_info['comment']     = "If CAS is activated, this plugin add a text and a button on the login page to login with CAS. Configure plugin to add title, comment and logo.";
-//the plugin version
-$plugin_info['version']     = '1.0';
-//the plugin author
-$plugin_info['author']      = 'Hubert Borderiou';
-
-//the plugin configuration
-$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->addButtonSave(get_lang('Save'), 'submit_button');
-//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');
-$tab_default_add_cas_login_button_cas_image_url = api_get_setting('add_cas_login_button_cas_image_url');
-$defaults = array();
-$defaults['cas_button_label'] = $tab_default_add_cas_login_button_cas_button_label['add_cas_login_button'];
-$defaults['cas_button_comment'] = $tab_default_add_cas_login_button_cas_button_comment['add_cas_login_button'];
-$defaults['cas_image_url'] = $tab_default_add_cas_login_button_cas_image_url['add_cas_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');

+ 0 - 7
plugin/add_cas_login_button/readme.txt

@@ -1,7 +0,0 @@
-README
-<br/><br/>
-This plugin add a button to allow user to login to Chamilo with CAS authentification.<br/><br/>
-You have to activate your CAS connection to display this button.<br/>
-You have to configure your CAS connection to have the button works.<br/>
-To activate and configure CAS, for your Chamilo platform, go to Administration > Configuration settings > CAS<br/>
-This plugin has been done to be added in the login_top region, but you can put it where you want.<br/>

+ 0 - 22
plugin/add_cas_login_button/template.tpl

@@ -1,22 +0,0 @@
-{% if add_cas_login_button.show_message %}
-    <link href="{{ _p.web_plugin }}add_cas_login_button/css.css" rel="stylesheet" type="text/css">
-    <div class="well">
-        {% if add_cas_login_button.url_label %}
-            <img src="{{ add_cas_login_button.url_label }}" class='cas_plugin_image'/>
-        {% endif %}
-        <h4>{{ add_cas_login_button.button_label }}</h4>
-        {% if add_cas_login_button.url_label %}
-            <div class='cas_plugin_clear'>&nbsp;</div>
-        {% endif %}
-        <div class='cas_plugin_comm'>{{ add_cas_login_button.comm_label }}</div>
-        {% if add_cas_login_button.cas_activated %}
-            {% if add_cas_login_button.cas_configured %}
-                <button class="btn btn-default" onclick="javascript:self.location.href='main/auth/cas/logincas.php'">{{"LoginEnter"|get_lang}}</button>
-            {% else %}
-                CAS isn't configured. Go to Admin > Configuration > CAS.<br/>
-            {% endif %}
-        {% else %}
-            CAS isn't activated. Go to Admin > Configuration > CAS.<br/>
-        {% endif %}
-    </div>
-{% endif %}

+ 0 - 12
plugin/add_cas_logout_button/css.css

@@ -1,12 +0,0 @@
-.cas_plugin_image {
-    float:left; 
-    height:50px;
-    margin: 0px 5px 5px 0px;        
-}
-.cas_plugin_comm {
-    font-style:italic;
-}
-.cas_plugin_clear {
-    clear:both;
-    height:1px;
-}

+ 0 - 24
plugin/add_cas_logout_button/index.php

@@ -1,24 +0,0 @@
-<?php
-// Show the CAS button to logout to your CAS session
-global $_user;
-$_template['show_message']   = false;
-
-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";
-    if (!empty($plugin_info['settings']['add_cas_logout_button_cas_logout_label'])) {
-        $logout_label = api_htmlentities($plugin_info['settings']['add_cas_logout_button_cas_logout_label']);
-    }
-    // the comm
-    $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;
-}

+ 0 - 39
plugin/add_cas_logout_button/plugin.php

@@ -1,39 +0,0 @@
-<?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)
- * @package chamilo.plugin
- * @author Julio Montoya <gugli100@gmail.com>
- */
-/**
- * Plugin details (must be present)
- */
-
-//the plugin title
-$plugin_info['title']      = 'Add a button to logout from CAS';
-
-//the comments that go with the plugin
-$plugin_info['comment']     = "If CAS is activated, this plugin add a text and a button on the user page to logout from a CAS session. Configure plugin to add title, comment and logo.";
-//the plugin version
-$plugin_info['version']     = '1.0';
-//the plugin author
-$plugin_info['author']      = 'Hubert Borderiou';
-//the plugin configuration
-$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->addButtonSave(get_lang('Save'), 'submit_button');
-//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');
-$tab_default_add_cas_logout_button_cas_logout_image_url = api_get_setting('add_cas_logout_button_cas_logout_image_url');
-$defaults['cas_logout_label'] = $tab_default_add_cas_logout_button_cas_logout_label['add_cas_logout_button'];
-$defaults['cas_logout_comment'] = $tab_default_add_cas_logout_button_cas_logout_comment['add_cas_logout_button'];
-$defaults['cas_logout_image_url'] = $tab_default_add_cas_logout_button_cas_logout_image_url['add_cas_logout_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');

+ 0 - 7
plugin/add_cas_logout_button/readme.txt

@@ -1,7 +0,0 @@
-README
-<br/><br/>
-This plugin add a button to allow user to logout to his CAS session.<br/><br/>
-You have to activate your CAS connection to display this button.<br/>
-You have to configure your CAS connection to have the button works.<br/>
-To activate and configure CAS, for your Chamilo platform, go to Administration > Configuration settings > CAS<br/>
-This plugin has been design to be added in the menu_top region, but you can put it where you want.<br/>

+ 0 - 15
plugin/add_cas_logout_button/template.tpl

@@ -1,15 +0,0 @@
-{% if add_cas_logout_button.show_message %}
-    <link href="{{ _p.web_plugin }}add_cas_logout_button/css.css" rel="stylesheet" type="text/css"> 
-    <div class="well">
-        {% if add_cas_logout_button.logout_image_url %}
-            <img src="{{add_cas_logout_button.logout_image_url}}" class='cas_plugin_image'/>
-        {% endif %}
-        <h4>{{add_cas_logout_button.logout_label}}</h4>
-        {% if add_cas_logout_button.logout_image_url %}
-            <div class='cas_plugin_clear'>&nbsp;</div>
-        {% endif %}
-        <div class='cas_plugin_comm'>{{add_cas_logout_button.logout_comment}}</div>
-        <button class="btn btn-default" onclick="javascript:self.location.href='main/auth/cas/logout.php'">{{"Logout"|get_lang}}</button>
-        
-    </div>
-{% endif %}

+ 0 - 12
plugin/add_facebook_login_button/css.css

@@ -1,12 +0,0 @@
-    .cas_plugin_image {
-        float:left; 
-        height:50px;
-        margin: 0px 5px 5px 0px;        
-    }
-    .cas_plugin_comm {
-        font-style:italic;
-    }
-    .cas_plugin_clear {
-        clear:both;
-        height:1px;
-    }

BIN
plugin/add_facebook_login_button/img/cnx_fb.png


+ 0 - 0
plugin/add_facebook_login_button/img/index.html


+ 0 - 17
plugin/add_facebook_login_button/index.php

@@ -1,17 +0,0 @@
-<?php
-// Show the FACEBOOK login button
-$_template['show_message']   = false;
-
-//if (api_is_anonymous() && api_get_setting('facebook_login_activate') == 'true') {
-if (api_is_anonymous()) {
-    require_once api_get_path(SYS_CODE_PATH)."auth/external_login/facebook.inc.php";
-    $_template['show_message']   = true;
-    // the default title
-    $button_url = api_get_path(WEB_PLUGIN_PATH)."add_facebook_login_button/img/cnx_fb.png";
-    $href_link = facebookGetLoginUrl();
-    if (!empty($plugin_info['settings']['add_facebook_login_button_facebook_button_url'])) {
-        $button_url = api_htmlentities($plugin_info['settings']['add_facebook_login_button_facebook_button_url']);
-    }    
-    $_template['facebook_button_url'] = $button_url;
-    $_template['facebook_href_link'] = $href_link;    
-}

+ 0 - 40
plugin/add_facebook_login_button/plugin.php

@@ -1,40 +0,0 @@
-<?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)
- * @package chamilo.plugin
- * @author Julio Montoya <gugli100@gmail.com>
- */
-/**
- * Plugin details (must be present)
- */
-
-//the plugin title
-$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";
-//the plugin version
-$plugin_info['version'] = '1.0';
-//the plugin author
-$plugin_info['author'] = 'Konrad Banasiak, Hubert Borderiou';
-//the plugin configuration
-$form = new FormValidator('add_facebook_button_form');
-$form->addElement(
-    'text',
-    'facebook_button_url',
-    'Facebook connexion image URL',
-    ''
-);
-$form->addButtonSave(get_lang('Save'), 'submit_button');
-//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'];
-$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');

+ 0 - 6
plugin/add_facebook_login_button/readme.txt

@@ -1,6 +0,0 @@
-README
-<br/><br/>
-This plugin adds a button to allow users to log into Chamilo with their Facebook account.<br/><br/>
-To display this button on your portal, you have to enable the Facebook authentification and configure it.<br/>
-To enable and configure the Facebook authentification on your Chamilo platform, go to Administration > Configuration settings > Facebook<br/>
-This plugin has been developed to be added to the login_top or login_bottom region in Chamilo, but you can put it in whichever region you want.<br/>

+ 0 - 5
plugin/add_facebook_login_button/template.tpl

@@ -1,5 +0,0 @@
-{% if add_facebook_login_button.show_message %}
-<a href="{{add_facebook_login_button.facebook_href_link}}">
-    <img src="{{add_facebook_login_button.facebook_button_url}}" style="margin-left:15px; border-radius:0"/>
-</a>
-{% endif %}

+ 0 - 12
plugin/add_shibboleth_login_button/css.css

@@ -1,12 +0,0 @@
-.shibboleth_plugin_image {
-    float:left; 
-    height:50px;
-    margin: 0px 5px 5px 0px;        
-}
-.shibboleth_plugin_comm {
-    font-style:italic;
-}
-.shibboleth_plugin_clear {
-    clear:both;
-    height:1px;
-}

+ 0 - 21
plugin/add_shibboleth_login_button/index.php

@@ -1,21 +0,0 @@
-<?php
-// Show the Shibboleth button to login using SHIBBOLETH
-
-$_template['show_message']   = false;
-
-if (api_is_anonymous()) {
-    $_template['show_message']   = true;
-    // the default title
-    $button_label = "Connexion via Shibboleth";
-    if (!empty($plugin_info['settings']['add_shibboleth_login_button_shibboleth_button_label'])) {
-        $button_label = api_htmlentities($plugin_info['settings']['add_shibboleth_login_button_shibboleth_button_label']);
-    }
-    // the comm
-    $comm_label = api_htmlentities($plugin_info['settings']['add_shibboleth_login_button_shibboleth_button_comment']);;
-    // URL of the image
-    $url_label = $plugin_info['settings']['add_shibboleth_login_button_shibboleth_image_url'];
-    
-    $_template['button_label'] = $button_label;
-    $_template['comm_label'] = $comm_label;
-    $_template['url_label'] = $url_label;
-}

+ 0 - 61
plugin/add_shibboleth_login_button/plugin.php

@@ -1,61 +0,0 @@
-<?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)
- * @package chamilo.plugin
- * @author Julio Montoya <gugli100@gmail.com>
- */
-/**
- * Plugin details (must be present)
- */
-
-//the plugin title
-$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.";
-//the plugin version
-$plugin_info['version'] = '1.0';
-//the plugin author
-$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->addButtonSave(get_lang('Save'), 'submit_button');
-//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'
-);
-$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'];
-$defaults['shibboleth_image_url'] = $tab_default_add_shibboleth_login_button_shibboleth_image_url['add_shibboleth_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');

+ 0 - 6
plugin/add_shibboleth_login_button/readme.txt

@@ -1,6 +0,0 @@
-README
-<br/><br/>
-This plugin add a button to allow user to login to Chamilo with Shibboleth authentification.<br/><br/>
-You have to configure your Shibboleth connexion before use this plugin.<br/>
-To activate and configure Shibboleth, for your Chamilo platform, go to Administration > Configuration settings > Shibboleth<br/>
-This plugin has been done to be added in the login_top region, but you can put it where you want.<br/>

+ 0 - 15
plugin/add_shibboleth_login_button/template.tpl

@@ -1,15 +0,0 @@
-
-{% if add_shibboleth_login_button.show_message %}
-    <link href="{{ _p.web_plugin }}add_shibboleth_login_button/css.css" rel="stylesheet" type="text/css"> 
-    <div class="well">
-        {% if add_shibboleth_login_button.url_label %}
-            <img src="{{ add_shibboleth_login_button.url_label }}" class='shibboleth_plugin_image'/>
-        {% endif %}
-        <h4>{{ add_shibboleth_login_button.button_label }}</h4>
-        {% if add_shibboleth_login_button.url_label %}
-            <div class='shibboleth_plugin_clear'>&nbsp;</div>
-        {% endif %}
-        <div class='shibboleth_plugin_comm'>{{ add_shibboleth_login_button.comm_label }}</div>
-        <button class="btn btn-default" onclick="javascript:self.location.href='main/auth/shibboleth/login.php'">{{ "LoginEnter"|get_lang }}</button>
-    </div>
-{% endif %}

+ 0 - 78
plugin/before_login/index.php

@@ -1,78 +0,0 @@
-<?php
-/**
- * @package chamilo.plugin.before_login
- */
-
-if (api_is_anonymous()) {
-
-    // Only available in the index.php page
-    $loginAccepted = isset($_SESSION['before_login_accepted']) ? $_SESSION['before_login_accepted'] : null;
-    $parsedUrl = parse_url($_SERVER['REQUEST_URI']);
-    $currentPage = str_replace('index.php', '', $parsedUrl['path']);
-
-    if (api_get_path(REL_PATH) !== $currentPage) {
-        return null;
-    }
-
-    // Hide only if the before_login_accepted session was set to ON.
-    if ($loginAccepted) {
-        return null;
-    }
-
-    // Only available for the selected language.
-    $languageToActivate = api_get_plugin_setting('before_login', 'language');
-
-    if (api_get_language_isocode() != $languageToActivate) {
-        return null;
-    }
-
-    $option1 = api_get_plugin_setting('before_login', 'option1');
-    $urlOption1 = api_get_plugin_setting('before_login', 'option1_url');
-
-    $option2 = api_get_plugin_setting('before_login', 'option2');
-    $urlOption2 = api_get_plugin_setting('before_login', 'option2_url');
-
-    $form = new FormValidator('form');
-
-    $renderer =& $form->defaultRenderer();
-    $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>');
-    $renderersetCustomElementTemplate->setCustomElementTemplate('<tr><td>{element}</td></tr>');
-
-    $form->addElement('html', $option1);
-    $form->addElement('checkbox', 'left', null, get_lang('Yes'));
-    $form->addElement('button', 'submit', get_lang('Confirm'), array('class' => 'btn btn-primary'));
-    $formHtml = $form->return_form();
-    if ($form->validate()) {
-        $result = $form->getSubmitValues();
-        if (isset($result['left']) && $result['left']) {
-            $_SESSION['before_login_accepted'] = 1;
-            header('Location: '.$urlOption1);
-            exit;
-        }
-    }
-
-    $form2 = new FormValidator('form');
-
-    if (!empty($option2) && !empty($urlOption2)) {
-        $renderer =& $form2->defaultRenderer();
-        $renderer->setHeaderTemplate('');
-        $renderer->setFormTemplate('<form{attributes}><table border="0" cellpadding="5" cellspacing="0" width="100%">{content}</table></form>');
-        $renderer->setCustomElementTemplate('<tr><td>{element}</td></tr>');
-
-        $form2->addElement('html', $option2);
-        $form2->addElement('checkbox', 'right', null, get_lang('Yes'));
-        $form2->addElement('button', 'submit', get_lang('Send'));
-        $formHtml2 = $form2->return_form();
-
-        if ($form2->validate()) {
-            $result = $form2->getSubmitValues();
-            if (isset($result['right']) && $result['right']) {
-                header('Location: '.$urlOption2);
-                exit;
-            }
-        }
-    }
-
-    $_template['form_option1'] = $formHtml;
-    $_template['form_option2'] = $formHtml2;
-}

+ 0 - 51
plugin/before_login/plugin.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * This script is a configuration file for the add_this plugin.
- * 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.
-$plugin_info['title']       = 'Show HTML before login';
-// The comments that go with the plugin.
-$plugin_info['comment']     = "Show a content before loading the login page.";
-// The plugin version.
-$plugin_info['version']     = '1.0';
-// The plugin author.
-$plugin_info['author']      = 'Julio Montoya';
-
-// The plugin configuration.
-$form = new FormValidator('form');
-$form->addElement('select_language', 'language', get_lang('Language'));
-
-$form->addElement('header', 'Option 1');
-$form->addElement('textarea', 'option1', get_lang('Description'), array('rows' => 10, 'class' => 'span6'));
-$form->addElement('text', 'option1_url', get_lang('RedirectTo'));
-
-$form->addElement('header', 'Option 2');
-$form->addElement('textarea', 'option2', get_lang('Description'), array('rows' => 10, 'class' => 'span6'));
-$form->addElement('text', 'option2_url', get_lang('RedirectTo'));
-$form->addElement('button', 'submit_button', get_lang('Save'));
-
-// Get default value for form
-
-$defaults = array();
-$defaults['language'] = api_get_plugin_setting('before_login', 'language');
-$defaults['option1'] = api_get_plugin_setting('before_login', 'option1');
-$defaults['option2'] = api_get_plugin_setting('before_login', 'option2');
-
-$defaults['option1_url'] = api_get_plugin_setting('before_login', 'option1_url');
-$defaults['option2_url'] = api_get_plugin_setting('before_login', 'option2_url');
-
-$plugin_info['templates']   = array('template.tpl');
-if (file_exists(__DIR__.'/custom.template.tpl')) {
-    $plugin_info['templates']   = array( 'custom.template.tpl');
-}
-$form->setDefaults($defaults);
-
-// Display form
-$plugin_info['settings_form'] = $form;

+ 0 - 10
plugin/before_login/readme.txt

@@ -1,10 +0,0 @@
-README
-<br/><br/>
-This plugins shows page before showing the login page.
-This is useful if you want a question before a user has the opportunity to login.
-<br/>
-Example:
-You're old enough to enter this site? If you accept the "option 1" then
-you can enter to the campus (the login will appeared).
-
-If you select "option 2" then you're redirected to another page.

+ 0 - 14
plugin/before_login/template.tpl

@@ -1,14 +0,0 @@
-{% if before_login.form_option1 %}
-    <div class="span12">
-        <div class="row">
-            <div class="span6">
-                {{ before_login.form_option1 }}
-            </div>
-            <div class="span6">
-                {{ before_login.form_option2 }}
-            </div>
-        </div>
-    </div>
-{% else %}
-
-{% endif %}