$setting->set_updatedcallback('theme_reset_all_caches'); $temp->add($setting); // Show MyCourses dropdown in custommenu. $name = 'theme_lambda/mycourses_dropdown'; $title = get_string('mycourses_dropdown', 'theme_lambda'); $description = get_string('mycourses_dropdown_desc', 'theme_lambda'); $default = false; $setting = new admin_setting_configcheckbox($name, $title, $description, $default, true, false); $setting->set_updatedcallback('theme_reset_all_caches'); $temp->add($setting); // Footnote setting. $name = 'theme_lambda/footnote'; $title = get_string('footnote', 'theme_lambda'); $description = get_string('footnotedesc', 'theme_lambda'); $default = ''; $setting = new admin_setting_confightmleditor($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $temp->add($setting); // Custom CSS file. $name = 'theme_lambda/customcss'; $title = get_string('customcss', 'theme_lambda'); $description = get_string('customcssdesc', 'theme_lambda'); $default = ''; $setting = new admin_setting_configtextarea($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $temp->add($setting); $ADMIN->add('theme_lambda', $temp); // "settings background" settingpage $temp = new admin_settingpage('theme_lambda_background', get_string('settings_background', 'theme_lambda')); // list with provides backgrounds $name = 'theme_lambda/list_bg';
public function add_htmleditor($setting, $default = '') { $htmleditor = new admin_setting_confightmleditor($this->name_for($setting), $this->title_for($setting), $this->description_for($setting), $default); $htmleditor->set_updatedcallback('theme_reset_all_caches'); $this->settingspage->add($htmleditor); }
/** * Calls parent::__construct with specific arguments */ public function __construct() { parent::__construct('summary', get_string('frontpagedescription'), get_string('frontpagedescriptionhelp'), null, PARAM_RAW, 60, 15); }
public function add_htmleditors($setting, $default = '', $instance) { $htmleditor = new admin_setting_confightmleditor($this->name_for($setting . $instance), $this->title_for($setting, $instance), $this->description_for($setting), $default); $htmleditor->set_updatedcallback('theme_reset_all_caches'); return $htmleditor; }
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. This plugin is part of Archaius theme. @copyright 2015 onwards Daniel Munera Sanchez */ defined('MOODLE_INTERNAL') || die; if (is_siteadmin()) { $footer_options = new admin_settingpage('theme_archaius_footer', get_string('footersectiontitle', 'theme_archaius')); $footer_options->add(new admin_setting_heading('theme_archaius_footer', get_string('footersectionsub', 'theme_archaius'), format_text(get_string('footersectiondesc', 'theme_archaius'), FORMAT_MARKDOWN))); // Foot note setting $name = 'theme_archaius/footnote'; $title = get_string('footnote', 'theme_archaius'); $description = get_string('footnotedesc', 'theme_archaius'); $default = ''; $setting = new admin_setting_confightmleditor($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $footer_options->add($setting); // footer text color $name = 'theme_archaius/footertextcolor'; $title = get_string('footertextcolor', 'theme_archaius'); $description = get_string('footertextcolordesc', 'theme_archaius'); $default = '#F5F5F5'; $previewconfig = array('selector' => '#page-footer, #page-footer a', 'style' => 'color'); $setting = new admin_setting_configcolourpicker($name, $title, $description, $default, $previewconfig); $setting->set_updatedcallback('theme_reset_all_caches'); $footer_options->add($setting); //Add options to admin tree $ADMIN->add('theme_archaius', $footer_options); }
$setting = new admin_setting_configtext($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $generalsettings->add($setting); // Image. $name = 'theme_essentials/slide' . $i . 'image'; $title = get_string('slideimage', 'theme_essential'); $description = get_string('slideimagedesc', 'theme_essential'); $setting = new admin_setting_configstoredfile($name, $title, $description, 'slide' . $i . 'image'); $setting->set_updatedcallback('theme_reset_all_caches'); $generalsettings->add($setting); // Caption text. $name = 'theme_essentials/slide' . $i . 'caption'; $title = get_string('slidecaption', 'theme_essential'); $description = get_string('slidecaptiondesc', 'theme_essential'); $default = ''; $setting = new admin_setting_confightmleditor($name, $title, $description, $default); $setting->set_updatedcallback('theme_reset_all_caches'); $generalsettings->add($setting); // URL. $name = 'theme_essentials/slide' . $i . 'url'; $title = get_string('slideurl', 'theme_essential'); $description = get_string('slideurldesc', 'theme_essential'); $default = ''; $setting = new admin_setting_configtext($name, $title, $description, $default, PARAM_URL); $setting->set_updatedcallback('theme_reset_all_caches'); $generalsettings->add($setting); // URL target. $name = 'theme_essentials/slide' . $i . 'target'; $title = get_string('slideurltarget', 'theme_essential'); $description = get_string('slideurltargetdesc', 'theme_essential'); $target1 = get_string('slideurltargetself', 'theme_essential');