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

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
wesyah234
Forum Members
Forum Members
Posts: 60
Joined: Tue Mar 07, 2006 4:30 am

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

Post 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
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

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

Post by calguy1000 »

This change unfortunately won't be done for 1.2
it's too late in the process.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
wesyah234
Forum Members
Forum Members
Posts: 60
Joined: Tue Mar 07, 2006 4:30 am

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

Post 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.
Post Reply

Return to “Modules/Add-Ons”