Add text plugin (show a text in a region).

1.9.x
Julio Montoya 10 years ago
parent 0f715af9dd
commit 3c7892b190
  1. 10
      plugin/text/index.php
  2. 2
      plugin/text/install.php
  3. 39
      plugin/text/plugin.php
  4. 3
      plugin/text/readme.txt
  5. 2
      plugin/text/uninstall.php

@ -0,0 +1,10 @@
<?php
/* See license terms in /license.txt */
/**
* @package chamilo.plugin.text
*/
if (!empty($plugin_info['settings']['text_content'])) {
echo $plugin_info['settings']['text_content'];
}

@ -0,0 +1,2 @@
<?php
/* See license terms in /license.txt */

@ -0,0 +1,39 @@
<?php
/* See license terms in /license.txt */
/**
* 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 config */
//the plugin title
$plugin_info['title'] = 'Text';
//the comments that go with the plugin
$plugin_info['comment'] = "Displays a text message";
//the plugin version
$plugin_info['version'] = '1.0';
//the plugin author
$plugin_info['author'] = 'Julio Montoya';
/* Plugin optional settings */
$form = new FormValidator('text_form');
// A simple select$plugin_info['settings']
$form->add_textarea('content', get_lang('Content'));
$form->addElement('style_submit_button', 'submit_button', get_lang('Save'));
$content = '';
$setting = api_get_setting('text_content');
if (isset($setting) && is_array($setting) && isset($setting['text'])) {
$content = $setting['text'];
}
$form->setDefaults(array('content' => $content));
$plugin_info['settings_form'] = $form;

@ -0,0 +1,3 @@
README
Display a text in a region.

@ -0,0 +1,2 @@
<?php
/* See license terms in /license.txt */
Loading…
Cancel
Save