WordPress.org

Support

Support » Plugins and Hacks » Style Switcher in Admin ?

Style Switcher in Admin ?

  • Would it be possible to set up a style switcher so that it is operated from admin I wonder.? Is there anything in the plugin architecture which could be adapted or built on.? What would be the issues? What we would need to be doing I would think is simply passing a variable into the import url call. I just wonder how difficult that is? My goal would be *single click*. All thoughts gratefully received. Just my 2 c 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • AIMJournals

    @aimjournals

    actually… I might work on a plugin for a style switcher. I know there’s already one out there, but I might make one that uses my method (javascript) as seen on: http://www.ajblog.uni.cc
    Have to look at how plugins work and stuff first though.

    TechGnome

    @techgnome

    Moderator

    I think what Root is looking for is the style switch to be controled from the Admin screen, by the site admin, rather than by the user from the blog itself. It’s an idea for sure, and has it merits. At the moment, I don’t think there’s anything that does that, but it can’t be all that difficult to make one…. can it?
    TG

    Thanks you guys. I was beginning to wonder if my q had sunk without trace.
    I can envisage a situation in which a user would like a style switcher controlled by him not the reader of the blog, and not disturbing the design on the front page.
    Admin seems the logical place for it. I envisage a drop in style pack. Tech I do not have your email address. Would you mind ?

    chuyskywalker

    @chuyskywalker

    Couldn’t you just set an option in the wp_options tables – something like “current_css_file” and have the value be “defualt.css”.
    Then in the template add:
    link src="<?php get_site_setting('current_css_file'); ?>"
    (please excuse the aweful coding and obviously incorrect function calls – i know they exists, but as i’ve only been on wp a few weeks, i don’t know them by heart…yet…)
    That should do the trick, then just getting the option to show up in the admin section is all that’s left. And that should be a pretty simple hack.

    TechGnome

    @techgnome

    Moderator

    chuysky – that would seem an ideal choice…. take it one step further, have a page in the admin area where there is a drop down list that could then populatde the option setting.
    Root – you should be able to grab it off my site… just hit either of the “email me” links.
    TG

    chuyskywalker

    @chuyskywalker

    Where would the values for that drop down list come from? Scanning a “css” folder? mmm, I don’t like that so much.
    If I wanted to use that feature, but my css was on a different server, or something like that, it would be cumbersome. Having a list from a scanned folder AND a text field would make us both happy, but it’s too many choices to be practical solution.

    No this needs an extra field / values in the mysql db surely ?

    chuyskywalker

    @chuyskywalker

    @root : that’s what I said previous post. This would be another option set via the database, the question is whether the admin section would pull the availble css files from a folder, or simple have a text field to allow people to change the value.
    Either way the value would go into the wp_options mysql table

    That sounds right but I am not very hot on php. 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Style Switcher in Admin ?’ is closed to new replies.