post-page

Admin based WordPress CSS Style Manager Hack

12
responses
by
 
on
March 6th, 2004
in
WordPress Hack

This hack adds a style/theme manager to the WordPress admin panel and allows a blog owner to choose a style to be displayed. Addition of styles is as simple as creating new folder for styles and copying them to a wp-style folder in your WordPress folder. This hack is also Alex’s Style switcher compatible, though the tutorial is not updated with that info. It will be in a future release. This hack comes with 2 styles from the CSS styles competition.

Here is the link to the hack http://weblogtoolscollection.com/b2-img/wp_styles.zip

You can see it on display here
http://dinki.mine.nu/wp/

Please post bugs and feedback here.

heading
12
Responses

 

Comments

  1. cfont (1 comments.) says:

    i’m not getting the ” theme\style ” button to show on the admin interface. anything right off that i might have missed? sorry, it seemed simple to follow your directions but… oh yeah, i’m using 1.2-mingus if that matters.

  2. p@ says:

    In the README you say:
    Find menu.txt in your wp-admin

    I don’t have this file

  3. Mark (34 comments.) says:

    Try looking for menu.php This hack was originally for an older version of WordPress

  4. Matt (1 comments.) says:

    I just tried this, but I’m having a problem. I put the add_style file in my wp-admin older and ran it, I added a properly formatted line to menu.php, I created wp-style with the included styles, I added $css… below the header line in index.php, and I replaced the @import line. When I went to test it, I chose “blue” on the Style page in the admin area and viewed my blog. The page turned out totally white with no style at all. When I viewed the page source, it was not getting the correct info – for some reason no matter what I choose, it was saying the CSS url was /wp-styles/wp-default/style.css. It should have had my full domain before that, plus wp-default wasn’t even one of my styles. In the mean time I’ve copied and renamed the default wp theme to wp-default and replaced the php echo $siteurl part of the index.php line with my actual hard coded URL. Any idea what’s going wrong?

  5. Mark says:

    This is designed for a much older version of WordPress and a lot of it is incompatible with recent versions.

  6. Alex says:

    Cool, that had been on my to-do list forever! :)

    If you break it out, I’d love to include it as an option part of the Style Switcher hack.

  7. Mark says:

    Sweet! Thanks for the support Alex. Style switcher is already integerated into this in WW. I just have to re-write the tutorial for it. :) Ill let you know!

  8. Mark (2 comments.) says:

    I’m getting the following error when I click on “Theme/Style”:
    Call to undefined function: checked() in /home/chopsock/public_html/wp-admin/chose_style.php on line 69

    The error shows up right next to a radio button. Help?

  9. Mark says:

    This could be a version issue. The checked function should be loaded with admin-header.php which is loaded right at the beginning of chose-style.php Did you make any other modifications to this file? This might be solved better over email.

  10. Scott O'Raw says:

    Hi,

    I got exactly the same error message after installing the hack.

    If you managed to get this issue sorted out is there any chance you could let me know what to do to rectify it?

    Cheers

    Scott.

  11. Mark (36 comments.) says:

    There are 2 solutions.
    1) you can copy the following to the top of chose_style.php, after the < ?php

    function checked($checked, $current) {
    if ($checked == $current) echo ‘ checked=”checked”‘;
    }

    2) You can add this to the top of chose_style.php, after the include(‘admin-functions.php’);

  12. Scott O'Raw says:

    Hi Mark,

    Thaks for your reply. However, I think there may be some gremlins in the works. Your message seems to be have been cut off mid-sentence:

    “2) You can add this to the top of chose_style.php, after the” was as far as the message got to.

    Is there any chance you could re-post your message so that I can see the solution.

    Thanks again

    Scott



Obviously Powered by WordPress. © 2003-2013

page counter
css.php