[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
** Changed in: mahara Status: Fix Committed = Fix Released -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Fix Released Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
For a quick overview of what's new, see https://mahara.org/interaction/forum/topic.php?id=6342offset=0limit=10#post26920 ** Tags added: nominatedfeature -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Fix Committed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
** Changed in: mahara Status: Confirmed = Fix Committed -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Fix Committed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
Hm, I've taken a crack at implementing this, and I've got a system working for templates as described above. But, I realize I need to do something similar for static assets, i.e. images and stylesheets. Which brings up a question of directory structures. Within the custom theme directory, should we have a directory for each plugin, each with its own templates and static subdirectories? Or, within the theme's main templates and static subdirectories should there be a separate directory for each plugin? Option 1: Multiple templates and static subdirectories: theme/ +- raw/ +- templates/ +- index.tpl +- static/ +- images/ +- mahara--logo.png +- blocktype/ +- clippy/ +- templates/ +- clippy.tpl +- images/ +- thumb.png +- creativecommons/ +- templates/ +- summary.tpl +- assets/ +- images/ +- cclogo.png Option 2: Multiple plugin subdirectories theme/ +- raw/ +- templates/ +- index.tpl +- blocktype/ +- clippy/ +- clippy.tpl +- creativecommons/ +- summary.tpl +- static/ +- images/ +- mahara-logo.png +- blocktype/ +- clippy/ +- images/ +- thumb.png +- creativecommons +- images/ +- cclogo.png Basically the choice comes down to grouping files together by type (static v templates) or grouping them together by plugin. -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Confirmed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
Another weird thing, is that under the current system, plugin theme directories don't actually contain a templates directory like normal theme directories. Instead the templates sit loose in the root level of the plugin theme directory. In other words: Expected location: /blocktype/clippy/theme/raw/templates/path/to/template.tpl Actual location: /blocktype/clippy/theme/raw/path/to/template.tpl Static assets on the other hand, are under a static directory. Maybe part of my fix should be to regularize plugin theme directories. Or, keep it so they support having the templates loose (so that non-updated plugins will continue to work) but add a theme/templates directory to the search path. -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Confirmed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
I decided it was most beneficial to group the files together by plugin (scenario #1 in my comment above). I also spun off the plugin templates directory issue into a separate bug: https://bugs.launchpad.net/mahara/+bug/1328319 Also, I realized that /local/theme template files were *not* overriding normal theme files like I thought they were. So I spun off another bug to make that work the way I expected it to: https://bugs.launchpad.net/mahara/+bug/1328310 -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Confirmed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
** Changed in: mahara Milestone: 1.9.0 = 1.10.0 -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Confirmed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
** Changed in: mahara Importance: Wishlist = Medium -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Confirmed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp
[Mahara-contributors] [Bug 1231755] Re: Allow /local and custom theme override of Plugin templates
** Changed in: mahara Milestone: 1.9rc1 = 1.9.0 -- You received this bug notification because you are a member of Mahara Contributors, which is subscribed to Mahara. Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it! https://bugs.launchpad.net/bugs/1231755 Title: Allow /local and custom theme override of Plugin templates Status in Mahara ePortfolio: Confirmed Bug description: One of the handiest features for site admins to tweak their Mahara site without making hacks that make upgrades difficult, is the relatively obscure local theme overrides feature: https://wiki.mahara.org/index.php/Customising/Themes/1.2#Local_theme_overrides Theme support is there, but you have to put the theme template dirctories under the plugin's own theme directory. i.e. artefact/internal/theme/primary/static/templates/content.tpl . So, this is handy for plugin authors, but not for custom theme developers. I propose the following: 1. We allow for /local overrides of plugin templates. The path should be local/theme/templates/{plugintype}/{pluginname}/{template} . Or in the case of plugins that live underneath other plugins (i.e. blocktypes under artefacts) local/theme/templates/{plugintype1}/{pluginname1}/{plugintype2}/{pluginname2}/{template}. So: local/theme/templates/artefact/internal/content.tpl local/theme/templates/artefact/internal/blocktype/textbox/content.tpl 2. For custom themes, we take a similar approach: theme/{themename}/static/templates/{plugintype}/{pluginname}/{template} theme/aaronstheme/static/templates/artefact/internal/content.tpl theme/aaronstheme/static/templates/artefact/internal/blocktype/textbox/content.tpl And in order of precedence: 1. /local theme overrides 2. custom theme located under /theme directory 3. theme template files locate under plugin's directory To manage notifications about this bug go to: https://bugs.launchpad.net/mahara/+bug/1231755/+subscriptions ___ Mailing list: https://launchpad.net/~mahara-contributors Post to : mahara-contributors@lists.launchpad.net Unsubscribe : https://launchpad.net/~mahara-contributors More help : https://help.launchpad.net/ListHelp