Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
yet another themes idea Themes
By janra , Section Project []
Posted on Sun Apr 14, 2002 at 12:00:00 PM PST

So despite all the other ideas that have come through here over time about themes that have never been implemented, I'm posting another one.

The difference is that I'm submitting this for feedback before I start working on it, rather than putting it up as a wishlist item. I have a second instance of apache running on my new computer on port 8080 (currently behind a firewall; I'll let you know when it takes over public server duties from my old computer) with a separate scoop codebase so I'm guaranteed not to break my YASS, which is running on the same computer.

The first thing to do is to create block categories, similar to the var categories that exist already. This is mostly just because it would be really useful, and also because it would make themes a bit easier to deal with.

The question of interface I haven't answered to my satisfaction, though I have narrowed it down to two options: display all blocks and their descriptions on one page, like the vars do it, or keep the same interface but filter the list of blocks you can select to the ones in that category. I dislike the first option because blocks, by necessity, have large text boxes, and will therefore make for extremely long pages; however, I dislike the second option because it could be confusing that the boxes you can select are not all there at the same time, so it doesn't act similarly to the site controls interface. I'm currently leaning towards the first option.

The categories I will create for the default blocks will be (subject to change if someone suggests something better):

  • site_admin
  • advertising
  • ad_templates
  • boxes
  • content
  • display
  • email_content
  • forumzilla
  • misc_bits (I don't like this name; what could I call a category for stuff like |dot| and |header| and |footer|, as well as the various other miscellaneous bits of html that are inserted into the page)
  • page_templates
  • rss
  • submission (covers voting as well, or seperately?)

Any blocks that are not assigned to a theme are considered to be part of the 'default' theme, so that scoop sites that don't want to use themes can keep their blocks exactly as they are and have everything still 'just work.' A new theme will be created by giving it a name and choosing which theme to use as a base, or 'parent'. A new theme does not have to duplicate all of the blocks; any blocks it is missing will be taken from its parent theme, and the default theme is ultimately the parent of all themes. It will also be possible to 'copy' a theme, ie to make a duplicate of the theme but with a different parent. This could be useful if you wanted to make a couple of main themes, each with a couple of possible colour schemes; the main themes could contain most all the changes, while the 'colour' themes would contain only colours, and have one of the main themes as a parent.

Some changes will be made to the blocks table to allow this; specifically, the fields "description", "category", "theme", and "parent" (parent theme) will be added.

To work with a theme as a whole, the blocks would be filtered such that the blocks for that theme only are displayed, plus blocks from the parent theme where the theme is missing a block, so that a full complement of blocks are available. While working with the theme, any changes made to a block that the theme does not explicitly have a version of causes a new block to be created inside that theme, and the block from the parent theme is left unchanged.

When not working with one theme specifically, selecting a category will show the blocks in that category for all themes; this makes it easy to, for example, add a new item to all the theme-specific versions of one block at the same time and in as consistent a manner between themes as desired.

The admin will be able to select which theme is served by default, for example to a given user-agent; ie, the 'light' theme could be given to user-agents matching known PDA or console web browsers, a 'netscape' theme using tables for layout could be given to netscape 4.x users while the default theme uses CSS positioning. The admin will also be able to select which theme is served to non-logged in users, and to newly created accounts as well.

The users will be able to select which theme they want to use at any time, out of any of the options. The heirarchy of the themes should be clear in a simple to understand way; for example if the site had a 'beginners' and an 'expert' theme, the beginners theme having extra help text (such as 'scroll down to see the comments' at the end of a story) and each having a sub-theme consisting only of changed colours, the user would see:

  • default
    • beginners
      • red
      • green
      • blue
    • expert
      • red
      • green
      • blue

in their display preferences and could choose any of those options, including simply 'beginners' or 'expert' or even 'default'. Note that 'default' is the only theme that must be fully defined, as it is the parent to all other themes. So admins would set up the default theme to their satisfaction, similar to what they do right now without themes, and only then start adding additional themes.

Eventually, when all the HTML is ripped out of the scoop code and placed in blocks, it would be relatively simple to add internationalisation by creating a new theme then, while leaving the structure unchanged, translating all of the text to the new language. To facilitate this, a way for admins to set themes based on the language content negotiation could be added with an interface similar to that for selecting themes based on user-agent, if I managed to figure out how to recognise content negotiation.

< PublicAccessTV.net and Discuss.NewSlavery.org | Alternative Short Dates >

Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Login
Make a new account
Username:
Password:

Related Links
· Scoop
· YASS
· More on Themes
· Also by janra

Story Views
  80 Scoop users have viewed this story.

Display: Sort:
yet another themes idea | 11 comments (11 topical, 0 hidden)
DB changes, data structure and languages (none / 0) (#1)
by hillct on Tue Apr 16, 2002 at 08:56:35 AM PST

In general, I like this mechanism, but there are a few issues with your proposed block handling. First:
Any blocks that are not assigned to a theme are considered to be part of the 'default' theme, so that scoop sites that don't want to use themes can keep their blocks exactly as they are and have everything still 'just work.'
worries me a great deal. Your patch will include an SQL patch which will implement the new DB fields. It will also need to include a script that inserts 'default' into the theme field for all blocks that currently exist. This will have the same effect as your above proposal, but will avoid the potential DB inconsistency problem your mechanism of having admins not use themes. Admins who choose not to implement themes should simply define the default theme for their site 'default' and then have a VAR that determines whether or not users will see theme related preferences and options.

Second, I would suggest that there be a table 'themes' with the fields 'theme', 'parent' and 'description'. This instead of your proposal to place the field 'parent' in the blocks table, since this would be inconsistant with the goals of database normalization, because the data 'parent' is relitive to the data 'theme', rather than directly related to each 'block'.

Additionally, I suggest including a field 'language' in the blocks table so each block in each theme will be able to appear in multiple languages. All of this will require a multipart primary index in the blocks table composed of 'bid,type,theme,language'.

--CTH


--
ScoopHost.com - Premier Scoop Hosting and custom development from the lead developers.


part 1: block categories - update (none / 0) (#4)
by janra on Fri Apr 19, 2002 at 12:18:34 AM PST

Almost done. I've got the blocks and categories creating, updating, and deleting just fine. While I was re-doing the block admin tool, I ripped the HTML out of the var admin tool as well; they work almost identically now, except vars have smaller textboxes and there are three kinds of them.

I still have think about how to work the spelling/html check into the block editor, so it works with multiple updates at once on a category page. Then, make sure the db patch I've written works, and figure out how to make a patch to send in :-)

I think that's it for part 1...


--
Discuss the art and craft of writing




aliana (none / 0) (#7)
by hasnainkhatri on Tue May 12, 2020 at 02:32:57 AM PST

Your article is extremely helpful exceptionally fascinating subject i am looking that sort of post thank for imparting to us keep it up. best CBD gummies



great (none / 0) (#8)
by thutrangctp on Sat Jul 11, 2020 at 03:40:32 AM PST

Thanks for sharing good posts. It would really help people like me. facebook baixar



Zay'sCordless Airbush Compressor (none / 0) (#9)
by storm chancey on Tue Jul 28, 2020 at 03:42:14 AM PST

We supply cordless airbrush compressors, elite barber kits, hair grippers, hair fibers, straight razors, and many more things. Free shipping on orders over $49. Zay'sCordless Airbush Compressor



real-time Live Monitoring services (none / 0) (#10)
by hasnainkhatri on Thu Jul 30, 2020 at 09:43:57 AM PST

We are providing 24/7 Customer Support. Serena Security acts faster. Our live monitoring allows us to intervene instantly whenever any doubtful activity is noticed real-time Live Monitoring services



online mobile recharge (none / 0) (#11)
by hasnainkhatri on Fri Jul 31, 2020 at 02:13:15 PM PST

Mobile Masters is a leading mobile recharge company and accessories store based out of Houston, TX. As an authorized top-up company it is our duty to provide you with the highest customer service. At Mobile Masters, we provide an easy way to recharge and make payment. All payments are instant 24/7! online mobile recharge



yet another themes idea | 11 comments (11 topical, 0 hidden)
Display: Sort:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search