Allow per theme / per user styles
Michelle - June 20, 2009 - 21:27
| Project: | Advanced Forum |
| Version: | 6.x-2.x-dev |
| Component: | Styles |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
Currently you need to implement a hook to add a completely new style. This is a barrier for non programmers. Adding "themes/advanced_forum" as an alternate location would mean styles could simply be dropped in.
Michelle

#1
Whoops, forgot I had an issue for this. Note to self: look at code in #400158: Simple style installation
Michelle
#2
Expanding this issue with the whole plan:
*-- Registering styles
* Modules can return directories containing styles
* AF will register the advanced_forum/styles directory as well as themes/advanced_forum_styles
* Each style has a .info
- name = NAME
- description = DESCRIPTION
- version = AF VERSION (ie: 2.x)
- base style = BASE STYLE
* AF scans the given directories for .info files to assemble information about styles in them
*-- Style inheritance
* Each style states the style it is based on, if any
* Style directories area added to the theme registry paths in order so template discovery falls back thru
* CSS files are loaded looking first at the active theme, then the active style, then back up the chain of parent styles
*-- Admin selection of styles
* Choose default style for site
* Choose style for each theme (optional)
* Permission to allow user to choose their own theme (optional)
*-- Deciding style to use
* Look first for user specific style
* Look second to theme specific style
* Look third to default style for site
#3
This is what the included style structure will look like:
Naked
* Inherits from: Nothing
* Files:
- Info
- Structure
- Images
- All tpls
Naked Stacked
* Inherits from: Naked
* Files:
- Info
- Structure (adjustements to stack the AP)
- Author pane tpl
Boxy
* Inherits from Naked
* Files:
- Info
- Style
Boxy Stacked
* Inherits from: Naked Stacked, Boxy
* Files:
- Info
Blue Lagoon
* Inherits from Naked
* Files:
- Info
- Style
- Images
Blue Lagoon Stacked
* Inherits from Naked Stacked, Blue Lagoon
* Files:
- Info
#4
Did a massive commit that does quite a bit of this. It adds in a CTools dependency as well. Unfortunately, there is either a bug in CTools or something wrong with how I'm using it so there's a critical bug in it that makes the 2.x branch unusable until I can get it fixed. Should have this finished up and stable again in a few days.
Michelle
#5
Update. Here's what's left to do:
* Revamp the settings page where you choose the style to allow for style per theme as well as style per site
* Add permission to allow user to choose their own theme
*-- This will require a change when deciding style to use:
* Look first for user specific style
* Look second to theme specific style
* Look third to default style for site
#6
Renaming to reflect the remaining items. This may end up waiting until 3.x as it's not a critical feature.
Michelle
#7
Maybe per type as well? Not sure on this... Might be overkill. I was just thinking I'd like to use stacked for my forums but maybe a simpler, non stacked style for actual comments in other places.
Michelle
#8
Postponing... This is going to wait for 3.x
Michelle