Allow theme to turn off skins
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| Mahara |
Wishlist
|
Robert Lyon |
Bug Description
Say you made a special theme, like a moderator one, where the set of things one can access is a subset of all things one can access (eg less artefact options) and you thought hey I don't want this theme to have access to making/
So you'd want the theme to be able to turn off skins.
Aaron Wells (u-aaronw) wrote : | #2 |
To update this with some discussion we had on IRC -- the skin sylesheet is a dwoo template, so the theme can override it and "turn skins off" that way, by making it so that a Page's skin doesn't have any bearing on how the Page is displayed.
But, this patch is meant to go a bit farther, and also hide the Portfolio -> Skins page, and the "Skins" tab when editing a Page. In effect, it's the same as doing $cfg->skins = false;, or of turning skins off for the user's institution.
I'm somewhat against the feature, because I think there is too much potential for user confusion in letting Themes turn features on and off. This would be especially true if the site has user-picked themes turned on, or page themes turned on. The user changes their theme, and suddenly they can't find the Portfolio->Skins page anymore.
Or even via Institution themes it could be confusing -- the Institution admin turns skins on for their Institution, but they unknowingly pick a Theme that has skins turned off. They wonder, hey, why is there no Portfolio->Skins page?
Aaron Wells (u-aaronw) wrote : | #3 |
On the other hand, the current system could be confusing too. Consider: the site is set to a theme where the Skins CSS stylesheet has been blanked. Users create pages, and pick skins for them, but this has no effect on the page! That's pretty confusing as well.
So I don't know, maybe it is a good idea. Perhaps with some logic so that under certain circumstances you can still see the Skins pages, but with a message that says "Skins are disabled because of the theme." In order for this to not further confuse users, you'd have to limit it to circumstances where the user is actually able to change the theme. For instance, for a normal user, if it's the Page theme or User theme that has disabled Skins. For an institutional admin, if it's the Institution theme that has disabled Skins. For a site admin, when any theme has disabled Skins.
Kristina Hoeppner (kris-hoeppner) wrote : | #4 |
Yeah, the simple not showing of the "Choose skin" page would be quite confusing. What if rather than not being shown it were greyed out or showed "You cannot choose a skin with the theme you selected" text when the tab is chosen?
Changed in mahara: | |
status: | New → In Progress |
Robert Lyon (robertl-9) wrote : | #5 |
I've altered the patch so now if a theme has $theme->skins = false; it warns you when adding a skin to a page that the skin will not display while using this theme - all other features act as before - eg, you can make skins, choose skins, import/export skins like before.
If you switch theme to one that doesn't have $theme->skins (or has it set to true) then you should be able to see the skin you've picked for the page.
Reviewed: https:/
Committed: http://
Submitter: Robert Lyon (<email address hidden>)
Branch: master
commit 7aaeb1c405e0c4e
Author: Robert Lyon <email address hidden>
Date: Wed Oct 9 08:07:38 2013 +1300
Allowing a theme to disable skins from being viewed (bug 1237013)
To get a theme to stop showing skins on portfolio pages add this
to the theme's themeconfig.php
$theme->skins = false;
When you go to add a skin to a page it will warn you that skins are
incompatible with this theme - you still can add a skin to the page
but it will not show up when you view the page.
Also if 'Page themes' are turned on it will warn you that the chosen
page theme for the page is not compatible with skins.
Change-Id: I694bf14dffddd1
Signed-off-by: Robert Lyon <email address hidden>
Changed in mahara: | |
status: | In Progress → Fix Committed |
Patch for "master" branch: https:/
tags: | added: nominatedfeature |
Reviewed: https:/
Committed: http://
Submitter: Aaron Wells (<email address hidden>)
Branch: master
commit f6b7a38c54d71fc
Author: Robert Lyon <email address hidden>
Date: Fri Jan 10 10:56:20 2014 +1300
Adding info about theme prefs to default theme (bug 1237013)
To help developers know about these options when copying this theme to
make their own.
Change-Id: Iaa655141fe9287
Signed-off-by: Robert Lyon <email address hidden>
Changed in mahara: | |
status: | Fix Committed → Fix Released |
Have made a patch for it /reviews. mahara. org/#/c/ 2586/
https:/