Page 1 of 1

proposed change to function.stylesheet.php (related to wget mirroring)

Posted: Tue Sep 25, 2007 6:34 pm
by wesyah234
as discussed in this thread
http://forum.cmsmadesimple.org/index.ph ... l#msg76372

I propose a change to function.stylesheet.php.

quick summary:
This change will add a dummy parameter at the end of the generated stylesheet url, causing it to appear that the stylesheet url is actually fetching a file ending with the .css extension.  The effect of this is that when wget is used to mirror a cmsms site, and it saves off local files, the css "file" is saved off with a .css extension, thus causing apache to properly set the content type to text/css.  If the content type is not set correctly, Firefox (and maybe other browsers) will not apply the styles to the pages.

The actual change is around line 51:
current:
                        $stylesheet .= "\" />\n";

to:
                        $stylesheet .= "&file=style.css\" />\n";

it doesn't matter what the parameter name or the filename is, as long as the url generated ends with ".css"

Please refer to the discussion thread for more info.

Thank you.
Wes

Re: proposed change to function.stylesheet.php (related to wget mirroring)

Posted: Tue Sep 25, 2007 6:51 pm
by cyberman
Maybe StaticStylesheet does the same ...

http://dev.cmsmadesimple.org/projects/static-css/

Re: proposed change to function.stylesheet.php (related to wget mirroring)

Posted: Tue Sep 25, 2007 7:05 pm
by calguy1000
This change unfortunately won't be done for 1.2
it's too late in the process.

Re: proposed change to function.stylesheet.php (related to wget mirroring)

Posted: Tue Sep 25, 2007 7:47 pm
by wesyah234
no problem... I can make the change by hand to the sites I want to mirror for now.  If you have any other questions about the change, let me know.

Thanks.