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
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

Michelle - June 20, 2009 - 21:40

Whoops, forgot I had an issue for this. Note to self: look at code in #400158: Simple style installation

Michelle

#2

Michelle - June 21, 2009 - 16:10
Title:Allow adding styles by adding to themes/advanced_forum» Overhaul style discovery & selection

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

Michelle - June 22, 2009 - 19:58

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

Michelle - June 23, 2009 - 03:39

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

Michelle - June 24, 2009 - 15:36

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

Michelle - July 14, 2009 - 03:06
Title:Overhaul style discovery & selection» Allow per theme / per user styles

Renaming to reflect the remaining items. This may end up waiting until 3.x as it's not a critical feature.

Michelle

#7

Michelle - July 15, 2009 - 03:56

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

Michelle - August 23, 2009 - 03:20
Status:active» postponed

Postponing... This is going to wait for 3.x

Michelle

 
 

Drupal is a registered trademark of Dries Buytaert.