proposed change to function.stylesheet.php (related to wget mirroring)
Posted: Tue Sep 25, 2007 6:34 pm
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
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