moodle-an-hochschulen / moodle-theme_boost_union_child Goto Github PK
View Code? Open in Web Editor NEWBoost Union Child is a boilerplate for enhancing Boost Union with custom or local functionality
License: GNU General Public License v3.0
Boost Union Child is a boilerplate for enhancing Boost Union with custom or local functionality
License: GNU General Public License v3.0
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.
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:
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.
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.
moodle-theme_boost_union_child/config.php
Lines 31 to 33 in 29d715c
https://github.com/moodle-an-hochschulen/moodle-theme_boost_union_child/blob/master/settings.php implementation no longer seems compatible with theme Boost Union.
After (at least at Boost Union version 2023010561):
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?:
For now we had to revert back to an older version of Boost Union to keep our settings page available.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.