Details about admin_setting_configstoredfile

Details about admin_setting_configstoredfile

by Deepak Tripathi -
Number of replies: 5

Hello,


I am using Moodel 3.3.2, The theme I am using is labland. I have created a child theme based on labland. 

Now the problem I am facing is In the settings.php of labland there is  this line

$setting = new admin_setting_configstoredfile($name, $title, $description, 'homeblock1image');

The complete code black is:

   $name = 'theme_demochild/homeblock1image';

    $title = get_string('homeblockimage', 'theme_demochild');

    $description = get_string('homeblockimagedesc', 'theme_demochild');

    $setting = new admin_setting_configstoredfile($name, $title, $description, 'homeblock1image');

    $setting->set_updatedcallback('theme_reset_all_caches');

    $temp->add($setting);


In demochild theme I have copied this settings page from labland. I want to initialise this with some default image say demo.png.

How can a achieve this.


Thanks.  

Average of ratings: -
In reply to Deepak Tripathi

Re: Details about admin_setting_configstoredfile

by Gareth J Barnard -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Labland is a commercial theme that should come with its own support.

In reply to Deepak Tripathi

Re: Details about admin_setting_configstoredfile

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Take a look at the More theme as that has a default background image.

Learning curve....

Grrrr.....

Give me a shout if you get stuck.

Cheers

Mary

In reply to Mary Evans

Re: Details about admin_setting_configstoredfile

by Deepak Tripathi -
Hello Mary,


I had a look at More theme. In lib.php there is this function theme_more_extra_less() and its is call in config.php as $THEME->extralesscallback = 'theme_more_extra_less'; but couldn't get what's exactly going on.

Can you please direct me.


Thanks   


In reply to Deepak Tripathi

Re: Details about admin_setting_configstoredfile

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

I have just spent 10 mins typing and lost it in sending....

look at Afterburner in my GitHub link

https://github.com/lazydaisy/moodle-theme_afterburner.git

In reply to Mary Evans

Re: Details about admin_setting_configstoredfile

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Look at the afterburner/ Lib.php