Theme Adaptable

Re: Theme Adaptable

by Gareth J Barnard -
Number of replies: 1
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers

Thanks, ok its a coding fault as PHP 7.0 does not support the syntax on that line (https://www.php.net/manual/en/function.list.php), so please replace the contents of (after backing up) '/theme/adaptable/settings/block_regions.php' with:

defined('MOODLE_INTERNAL') || die;
// Frontpage Block Regions Section.
$temp = new admin_settingpage('theme_adaptable_frontpage_block_regions',
    get_string('frontpageblockregionsettings', 'theme_adaptable'));
if ($ADMIN->fulltree) {
    $temp->add(new admin_setting_heading('theme_adaptable_marketing', get_string('blocklayoutbuilder', 'theme_adaptable'),
        format_text(get_string('blocklayoutbuilderdesc', 'theme_adaptable'), FORMAT_MARKDOWN)));
    $name = 'theme_adaptable/frontpageblocksenabled';
    $title = get_string('frontpageblocksenabled', 'theme_adaptable');
    $description = get_string('frontpageblocksenableddesc', 'theme_adaptable');
    $setting = new admin_setting_configcheckbox($name, $title, $description, false);
    $temp->add($setting);
    // Block region builder.
    $noregions = 20; // Number of block regions defined in config.php.
    $blocklayout = \theme_adaptable\toolbox::admin_settings_layout_builder(
        $temp, 'blocklayoutlayoutrow', $bootstrap12defaults, $bootstrap12);
    $temp->add(new admin_setting_heading('theme_adaptable_blocklayoutcheck', get_string('layoutcheck', 'theme_adaptable'),
        format_text(get_string('layoutcheckdesc', 'theme_adaptable'), FORMAT_MARKDOWN)));
    $checkcountcolor = '#00695C';
    if ($blocklayout['totalblocks'] > $noregions) {
        $mktcountcolor = '#D7542A';
    }
    $mktcountmsg = '<span style="color: ' . $checkcountcolor . '">';
    $mktcountmsg .= get_string('layoutcount1', 'theme_adaptable') . '<strong>' . $noregions . '</strong>';
    $mktcountmsg .= get_string('layoutcount2', 'theme_adaptable') . '<strong>' . $blocklayout['totalblocks'] . '/' . $noregions . '</strong>.';
    $temp->add(new admin_setting_heading('theme_adaptable_layoutblockscount', '', $mktcountmsg));
$temp->add(new admin_setting_heading('theme_adaptable_layoutbuilder', '', $blocklayout['imgblder']));
}
$ADMIN->add('theme_adaptable', $temp);

and let me know if it solves the problem.

G

In reply to Gareth J Barnard

Re: Theme Adaptable

by Madai QU -

HI, Gareth.

I have the same problem you are helping to solve. So I did what you recommended: replace the contents of '/theme/adaptable/settings/block_regions.php' with: (the code you suggested), but the problem is still there. 

Another idea?


Thank's a lot for your help