customize admin setting page

customize admin setting page

by suman bogati -
Number of replies: 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?

Average of ratings: -
In reply to suman bogati

Re: customize admin setting page

by 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.

In reply to suman bogati

Re: customize admin setting page

by Richard Oelmann -
Picture of Core developers Picture of Plugin developers Picture of 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