load plugin stylesheets from theme folder

Bug #891010 reported by Danny Wahl
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Triaged
Wishlist
Unassigned

Bug Description

Please make themes completely modular within their own folder, rather than having to create a new folder in a plugin for the theme.

Current (example):
/theme/default/static/style/style.css
/interaction/forum/theme/default/static/style/style.css

Proposed:
/theme/default/static/style/style.css
/theme/default/interaction/forum/static/style/style.css

The reason for the proposed change is to make themes fully modular, specifically when dealing with a version control system, specifically that all versioning is contained in the theme folder, rather than in the mahara root folder:

Current (example)
/.git

Proposed:
/theme/default/.git

From what I can tell this only affects the following file:

/lib/web.php

specifically around lines 331-337, it seems to just require changing the get_url() call to look in the theme directory rather than the plugin directory.

Tags: plugins themes
Revision history for this message
Richard Mansfield (richard-mansfield) wrote : Re: [Mahara-contributors] [Bug 891010] [NEW] load plugin stylesheets from theme folder

This would be great for people creating new themes, and I'm not saying
it shouldn't happen, but I think it's unlikely to happen any time soon.

It would make plugins non-modular, and we'd get complaints from plugin
developers and installers. Currently, a new artefact plugin can be
dropped in say htdocs/artefact/foo and that's it. It'd be harder to
have to put files in htdocs/artefact/foo and
htdocs/theme/raw/artefact/foo/static/style/style.css,
htdocs/theme/default/artefact/foo/static/style/style.css, etc.

Changed in mahara:
status: New → Triaged
importance: Undecided → Wishlist
Revision history for this message
Danny Wahl (danny-jl) wrote :

What about if it were to support inheritance similar to the way that a child theme works with either style.css or calendar.css:

A plugin developer would create the following file:

htdocs/artefact/foo/bar.css

A Theme developer would create the following file:

htdocs/theme/default/artefact/foo/bar.css

then Mahara would do one of the following:

1) Load the plugin style then load the theme style (similar to style.css)
2) check for a theme style if it exists load it, if it doesn't then fall back to the plugin style (similar to calendar.css).

tags: added: themes
tags: added: plugins
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.