diff --git a/plugin/customfooter/index.php b/plugin/customfooter/index.php
index 8303f4d695..8b92f3e1b6 100644
--- a/plugin/customfooter/index.php
+++ b/plugin/customfooter/index.php
@@ -3,14 +3,13 @@
* @package chamilo.plugin.customfooter
*/
-echo '
';
-if (!empty($plugin_info['settings']['customfooter_show_type'])) {
- echo "
".$plugin_info['settings']['customfooter_show_type']."
";
-} else {
- echo "Custom Footer
";
+if (isset($plugin_info['current_region'])) {
+ switch($plugin_info['current_region']) {
+ case 'footer_left':
+ echo $plugin_info['settings']['customfooter_footer_left'];
+ break;
+ case 'footer_right':
+ echo $plugin_info['settings']['customfooter_footer_right'];
+ break;
+ }
}
-
-//Using get_lang inside a plugin
-echo get_lang('CustomFooter');
-
-echo '';
\ No newline at end of file
diff --git a/plugin/customfooter/install.php b/plugin/customfooter/install.php
index 4fd0d406a1..da5ecbf4e4 100644
--- a/plugin/customfooter/install.php
+++ b/plugin/customfooter/install.php
@@ -1,17 +1,29 @@
*/
-require_once api_get_path(LIBRARY_PATH) . 'plugin.class.php';
-require_once dirname(__FILE__).'/lib/customfooter_plugin.class.php';
+require_once __DIR__.'/lib/customfooter_plugin.class.php';
/**
* Plugin details (must be present)
@@ -16,19 +15,19 @@ require_once dirname(__FILE__).'/lib/customfooter_plugin.class.php';
/* Plugin config */
//the plugin title
-$plugin_info['title'] = 'Custom Footer';
+$plugin_info['title'] = 'Custom Footer';
//the comments that go with the plugin
-$plugin_info['comment'] = "Drives configuration parameters that plugs custom footer notes";
+$plugin_info['comment'] = "Drives configuration parameters that plugs custom footer notes";
//the plugin version
-$plugin_info['version'] = '1.0';
+$plugin_info['version'] = '1.0';
//the plugin author
-$plugin_info['author'] = 'Valery Fremaux';
+$plugin_info['author'] = 'Valery Fremaux, 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']
*/
@@ -48,7 +47,7 @@ foreach ($config as $fooid => $configrecord) {
$form->addElement('text', 'footer_left', $plugininstance->get_lang('footerleft'));
$form->addElement('text', 'footer_right', $plugininstance->get_lang('footerright'));
-$form->addElement('style_submit_button', 'submit_button', $plugininstance->get_lang('Save'));
+$form->addButtonSave($plugininstance->get_lang('Save'));
$form->setDefaults($form_settings);