• OK, so I’m almost a complete newbie to PHP. I’m sure that this problem has been asked an answered here many times. I tried searching for it repeatedly, and nothing seems to be working for me though. Perhaps I’m just too daft to understand the answer, if it was there.
    Scenario is this:
    I installed WP 1.2 yesterday. It was not installed in the server root, but in /journal/
    Everything seemed to work well. I played with some minor customizations of the default template, and managed to not screw things up (at least, I don’t think so, it all seemed to be working OK).
    Then I tried to install Alex Jone’s wp-styleswitcher, and I downloaded a ton of his sample styles to test out, but I just can’t seem to get it to work.
    The styles are located in their individual folders, under /journal/wp-style
    The wp-style-switcher.php file is located in /journal/wp-content/plugins
    When I make the mod in /lournal/index.php, I can get a list of the styles, but none of them will load.
    I found several posts where a user called ‘Beel’ had suggested some alterations, although it sounded like there might be a slight difference in what the others were trying to do. It seemed that others were running WP from somewhere outside of public-html (which is probably a good idea, but I’m not at that level… Face it, I can’t even make the thing work as it is…). Either way, I couldn’t get any of it to work.
    Eventually, I restored the original wp-style-switcher.php file and put index.php bach the way it had been regarding styles.
    Any help would be greatly appreciated.

Viewing 12 replies - 31 through 42 (of 42 total)
  • I’m having something of a problem with the style-switcher as well.
    I have:
    Installed and activated the plugin and added the code necessary to have it function on the site.
    @import url( <?php wp_stylesheet(); ?> ); (at the top replacing what was there – tried setting a default style here as well, didn’t solve the problem)
    <?php wp_style_switcher(); ?> (in the menu area to display the list of styles available)
    Changed the default style-sheet called within the plugin as well (because I was sick of looking at the default one), hoping that would make some difference. It didn’t.
    Aside from filling in my own content on the menu, I haven’t done anything at all to the default template (that I know of or meant to do).
    The style-switcher:
    Does change the style when you click on one of the links for a different style.
    It is setting a cookie.
    The style carries through as you surf through pages other than the main page, but …
    Here’s where the problem comes in: When you go back to the main page, it reverts to the style I set as default (or before that the default WP style – or no style at all when I didn’t have that one uploaded into the style folder). It’s doing this in both IE and Mozilla browsers. I’ve seen this behavior on other sites using WP and the style-switcher as well. The style won’t stick to the main page and reverts to the default (whatever it may be set at, wherever it may be set).
    Here’s the url for my test install if you want to take a look: https://justorb.com/wordpress/
    Any suggestions? Is it something entirely stupid that I am just not seeing? I’ve been reading about this plugin and fussing with this for a few days now, and my limited knowledge of WordPress and PHP is now exhausted (as am I). Hopefully someone else will have encountered this same problem and know how to fix it quickly and easily.
    Thanks!

    I just went to your page.
    Clicked on photolog then main, then general, then an individual post (the one that says “User Error” with a smilie), then main, then ‘Smilies Away’ then main and all looks good.
    Is there a sequence which causes you the problem which we could copy ?
    I’m using Firefox btw..

    Here’s how I produced this on both our computers here:
    Went to the page and it loads the style I have as default (browns and greens). I then select one of the other styles from the Style list at the bottom of the menu (blue fade). The style on the main page changes to that one. Clicked a link to go to a entry only page. It shows the blue fade style. Then, I hit the link at the top of my menu to go back to the main page from that entry page, and it defaults to the green/brown one again … though only on the main page. All other pages still load the style I selected (blue fade) if I go back to an entry page or a category page. It’s quite maddening really. ??
    I’m using Firefox right now, but I have had it do the same thing in IE 5.5, IE 6 and plain Mozilla on two different computers.

    I’ll go try.

    Well at least I know I’m not just going crazy! Thanks for looking into it.

    @import url( <?php wp_stylesheet(); ?> ); is the only thing in the style section of index.php …
    I orginally had the link go to just the wordpress directory, but thought adding the index.php to the link might make a difference. It didn’t as far as I could tell.
    I was reading that article earlier, and maybe after my grey matter has recuperated a bit, I’ll just figure out how to do it that way, but I’d really like to get this working. It’s awfully cool and simple to use. At the moment, just knowing how to do things in WP is giving me a few headaches (moving away from MT – totally love WP).

    Well, here’s what I did tonight. Tried every thing I could think of and a few things that probably weren’t possible … then I sort of fixed it by accident. I set the style selector to be a dropdown box in the plugin file itself (where you can select “text” or “dropdown”) as well as defining the style I wanted to be used as the default. For some reason, now it’s working. I deleted all my cookies in all my browsers, closed them all, and then visited the site with each one, and yeah … seems to be working now. Maybe someone could stop by and check just to be sure I haven’t lost my mind though. LOL! My abilities don’t allow me to even fathom what the difference could be. At this point, it’s all looking like gibberish to me (not that it made all that much sense to me to begin with). But it’s working, so I’m happy. The dropdown box takes up less room anyway.
    Thanks guys for being so helpful and sweet!
    Now to get back to designing styles and less reading of code for hours on end. ??

    yep – looking great !
    Glad you got it fixed ??

    Beel, you said
    “TG – Sorry, but my page is run off my Windoze computer running Apache so it must be something else.”
    quite a few people who use windows use the IIS as its part of windows, it may be an issue with IIS.

    Hi Beel,
    After I posted my previous comment, I was thinking that I might just test my theory, I have a spare pc so i’m going to trying using Apache on it and then i’ll try the style switcher.
    I’ll let you know,
    also to anyone reading these posts, don’t give up, i just have a short fuse and get annoyed with things too easy,….. which is quite funny as I am an IT engineer and i don’t normally get annoyed with pc’s, i think one of the main things is that even though I know a little HTML, I don’t have a full grasp on php.
    Best wishes to all, and if you want to see how i’m getting on, have a look here https://home.puerilis.co.uk/wordpress/

    Nice looking Trident install peurilis :). I am following this style switcher malarkey very closely because I would like to fit one myself.

    I was having problems with the style switcher and did some debugging. My symptoms: the default style I had selected — either in wp-style-switcher.php or in the wp_stylesheet() call in index.php — would always be displayed, no matter which style I selected on the page.
    The problem is that my browser cookie was not getting set at all. I had the user and password cookie values, but the ‘wpstyle’ cookie value was never getting set, therefore the wp_stylesheet function would revert to the default setting.
    The solution: I used a fully-qualified name for my webserver in the browser (i.e.: ‘poobah.hoochiepep.home’ instead of just ‘poobah’) . Many people who are testing on an Apache server using ‘localhost’ as the server name will have the same problem. This is some weird bug with cookies not getting set when there is not at least one ‘.’ in the hostname! I experienced this problem on Linux/Apache 2, by the way – so it’s not just a Windows problem!
    I have done a lot of PHP programming myself, and long ago gave up on setting cookies directly. I’ve had much better luck using the PHP session functions (session_name, session_register, etc.). I’ve had no problems like the above using those functions.
    Hope this helps someone!
    -Greg

Viewing 12 replies - 31 through 42 (of 42 total)
  • The topic ‘Aaaarrrgh… wp-style-switcher plugin’ is closed to new replies.