• My site works fine in Firefox, Netscape and IE but doesn’t in Mozilla ?? The header and the stylesheet don’t show up properly. I think it’s to do with the style switcher I use. Can anyone help?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter anonymousmousse

    (@anonymousmousse)

    Sorry, it’s very early in the morning…

    URL is https://www.vaguely.org/blog
    PHP source is at https://www.vaguely.org/blog/phpsource.txt

    Absolutely terrible in Safari. Probably the same problem as you describe for Mozilla. No styling whatsoever.

    Jeremy

    At the moment the ‘site style’ variable doesn’t get a value so the style sheet is looked for in a file called “.css”
    Would it be silly to “hard-code” your default style sheet (called User Defined Style in the head tag) to the one you’ve selected as default (pink)? That’d at least be a quick fix ??

    Thread Starter anonymousmousse

    (@anonymousmousse)

    Sorry if I’m being dense but how do I do that?

    just replace this line in your index.php (or the PHP source you pasted above)
    <link rel="stylesheet" type="text/css"
    media="screen" title="User
    Defined Style" href="https://www.vaguely.org/blog/<?php echo($sitestyle);?>.css" />

    with the direct address to your pink style sheet (weblog.css I think):
    <link rel="stylesheet" type="text/css" media="screen" title="User Defined Style" href="https://www.vaguely.org/blog/weblog.css">

    Oh, hold on… maybe you should add a new link because that site style probably gets the wanted style from the switcher…
    so put the latter link tag with a different title above the former link tag ??

    Ehm… I’m not sure that’ll work after all. If the first stylesheet link is always selected. Oh well, I don’t know how the switcher works.

    Sorry… :/

    One way would be to assign an initial value to the sitestyle variable in the switcher code… but maybe there’re answers wherever you got the code from?

    Thread Starter anonymousmousse

    (@anonymousmousse)

    The code is loosely based around this:
    https://www.alistapart.com/articles/phpswitch
    but I modified it slightly, on somebody’s advice
    (if I recall, because that tutorial doesn’t include an image-switcher so the header graphics don’t change along with the themes). Anyway, as you can see there’s a forum attached to it, but it is closed ??

    If you look at Stage 2 on that page, there is this piece of code:
    <?php echo (!$sitestyle)?'defaultstyle':$sitestyle ?>
    You have almost that, but the odd syntax checks if you have a cookie with preferred style and if not (which causes the problem) it puts the default style. So, in your code instead of ‘defaultstyle’ it would say ‘weblog’
    So, in your <link> with the “User Defined Style” title, put that php tag instead of what you have there now. Or was there a specific reason for leaving it out?

    Thread Starter anonymousmousse

    (@anonymousmousse)

    It works!! Hooray!!
    Thank you xx ??

    (or at least, it does in Mozilla. Dunno about Safari!)

    The problem was just for the first visit. As soon as one chooses (chose) a theme the cookie was saved and the page worked normally. You probably had cookies for the other browsers you tested on and when you used Mozilla for the first time (on your site) it appeared to be its fault.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Mozilla Compatibility Issue’ is closed to new replies.