customize admin setting page

customize admin setting page

por suman bogati -
Número de respostas: 4

Hello everyone,

As we all know we can add the setting page for particular theme, for that we have to create a file named settings.php, inside that file we have to call particualr object for particular html form. for example if you want to input box then you can add those code into settings.php

$name = 'theme_splash/logo';
$title = get_string('logo','theme_splash');
$description = get_string('logodesc', 'theme_splash');
$setting = new admin_setting_configtext($name, $title, $description, '', PARAM_URL);
$settings->add($setting),

But what if I want to customize that particular input box for my particular theme, suppose If I want to add a image with that input box.

for that I should override the admin_setting_config_text class and make a new class extending from that class.

Basically I want to say, as we can override the renderer for particular theme.

Can we do override the particular class for particular theme to customize html form for adming setting page?

Média das avaliações:  -
Em resposta à suman bogati

Re: customize admin setting page

por Danny Wahl -

I've been looking for the documentation for the functions admin_setting_*(); which doesn't seem to be readily available - however, I don't think that for what you're looking for (in your example) requires an overridden renderer or an extended class:

simply put the image call and required HTML in your string so it's rendered when it's called.

Em resposta à suman bogati

Re: customize admin setting page

por Richard Oelmann -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers

Suman,

take a look at flexi_ii. That has images added onto the settings page and a lot of css styling to change the look of the admin settings page for the theme.

Richard