• I’d say I’m 6 out of 10 on the programming scale, and I feel I know my way around CSS/HTML/PHP fairly well… But I’m having trouble visualizing a solution to this feature I’d like to code (if it hasn’t been done already).

    I have several authors that write for my website, who each post on a specific day of the week. I want my site to have a default CSS style (which it currently does), and through the admin panel I want to have some easy-to-change fields so the authors can customize their specific days. These fields will affect only their day of posting.

    I can code the admin interface, the panel, deal with variables, and showing a daily css file is as easy as saying include $dayoftheweek.’.css’. What I’m having trouble wrapping my head around, is how to get the admin interface to write to the appropriate file without messing the whole thing up.

    It would be fairly simple to use the already-present editor function to edit the entire source, but my writers are html-inept and wouldn’t know where to start. I want my admin interface to just say “BACKGROUND COLOR:” and an input field next to it.

    How to line up those input fields with, say, line 452 of my css?

Viewing 3 replies - 1 through 3 (of 3 total)
  • I don’t know if this would be an answer, or how often they would change their settings, but there was a rotating template hack running around here at one point in time.

    In a nut shell, it lets you specify the what, when, where, why, and how of your themes. I used it on a site for a friend last summer, and had it set a different theme for each day of the week.

    If your authors aren’t going to make changes often, once you have it set up is should be pretty simple to keep going.

    Agree with lunabyte. Wouldn’t it be easier to automate this entirely? You can use the PHP date function to generate the day of the week in your header template, like so:

    <link rel="stylesheet" type="text/css" media="screen" href="<?php bloginfo('stylesheet_directory'); ?>/<?php echo strtolower(date('l')); ?>.css" />

    Then just set up sunday.css, monday.css, etc.

    Thread Starter weasello

    (@weasello)

    Well yes, that would be easiest, unfortunately I am not the designer of the CSS files… I don’t know how monday should look, since I post on tuesdays. ??

    I want to give my authors the ability to change it up at any time.

    If it’s just too difficult I could always tell my authors to suck it up and learn html…

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dynamic CSS Customization?’ is closed to new replies.