Giter Club home page Giter Club logo

moodle-theme_boost_union_child's People

Contributors

abias avatar danowar2k avatar

Stargazers

 avatar

Watchers

 avatar  avatar

moodle-theme_boost_union_child's Issues

Use file chooser image for courseheaderimagefallback in child theme

Is it possible to use the Boost Union image courseheaderimagefallback in the child theme where it would generate a proper URL to the image in core_renderer.php such as with this code:
$headerbg = $this->page->theme->setting_file_url('courseheaderimagefallback', 'courseheaderimagefallback');

Currently I can get the proper image name but it cannot generate the proper URL to the image from the child theme.

`public function get_generated_image_for_id($id) {

    $headerbg = $this->page->theme->setting_file_url('courseheaderimagefallback', 'courseheaderimagefallback');

    $hasheaderbg = get_config('theme_boost_union', 'courseheaderimageenabled')
    == THEME_BOOST_UNION_SETTING_SELECT_YES;
    if (isset($headerbg) && $hasheaderbg)  {
        return $headerbg;
    } elseif ($hasheaderbg) {
        // Usefallback image for mycourse regardless.
        return $this->page->theme->image_url('noimg', 'theme')->out();
    } else {
        $color = $this->get_generated_color_for_id($id);
        $pattern = new \core_geopattern();
        $pattern->setColor($color);
        $pattern->patternbyid($id);
        return $pattern->datauri();
    }
}`

As I am developing a child theme I would like to use as many of the core Boost Union settings as possible to avoid confusion and also to keep as many of the theme settings in Boost Union in case they remove my child theme.

grandchild of boost union, child of the boost_union_child, to control their own settings

I want each grandchild of boost union, child of the boost_union_child, to control their own settings but instead I get a grandchild listing underneath the boost_union_child, like so:

image

In the image QA is the grandchild.

So if i change any of the settings in the grandchild it also changes the settings in the boost_union_child.

How do I move the grandchild up one level so it can control just its own settings?

Thankyou.

Include Boost Union config using require instead of require_once

In config.php, the Boost Union config should be included using require, not require_once, to make sure that all Boost Union settings are added to the $THEME object even if the Boost Union config was already included in some other place.

// As a start, inherit the whole theme config from Boost Union.
// This move will save us from duplicating all lines from Boost Union's config.php into Boost Union Child's config.php.
require_once($CFG->dirroot . '/theme/boost_union/config.php');

Settings tab no longer working by move to ../theme/boost_union/settings_overview.php

https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_child/blob/master/settings.php implementation no longer seems compatible with theme Boost Union.

Before:
image

After (at least at Boost Union version 2023010561):
image

I'd like to know if there already is a new way of implementing, so we can get a tile in the settings_overview.php page?
Like so perhaps?:
image

For now we had to revert back to an older version of Boost Union to keep our settings page available.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.