is it possible to change the way stylesheets are included? [SOLVED]

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

is it possible to change the way stylesheets are included? [SOLVED]

Post by davids355 »

I am using cmsmadesimple 1.4.1

My site has been set up to use HTML 4.01 Transitional, however, the stylesheets are included using xhtml (I think) and this gives errors when I validate it using w3c validator.

Is there any way to change how stylesheets are included? All I want to do is remove the "/" from the end of the tag.
Last edited by davids355 on Sat Nov 08, 2008 1:42 pm, edited 1 time in total.
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: is it possible to change the way stylesheets are included?

Post by Dee »

Edit plugins/function.stylesheet.php - on line 52 change

Code: Select all

$str .= 'href="'.$url.'" />';
to

Code: Select all

$str .= 'href="'.$url.'">';
Regards,
D
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

Re: is it possible to change the way stylesheets are included?

Post by davids355 »

thats great thanks!

Also, below the stylesheet includes I have this code:



Any ideas where I can edit this?
Dee
Power Poster
Power Poster
Posts: 1197
Joined: Sun Mar 19, 2006 8:46 pm

Re: is it possible to change the way stylesheets are included?

Post by Dee »

modules/News/News.module.php line 213:

Code: Select all

$text = '<link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="'.$url.'" />'
By the way plugins/function.stylesheet.php contains 2 more XHTML tags on lines 86 and 87:

Code: Select all

$fmt1 = '<link rel="stylesheet" type="text/css" media="%s" href="%s" />';
$fmt2 = '<link rel="stylesheet" type="text/css" href="%s" />';
Regards,
D
davids355
Power Poster
Power Poster
Posts: 279
Joined: Fri Apr 04, 2008 10:08 am

Re: is it possible to change the way stylesheets are included?

Post by davids355 »

Many thanks.
newseed
New Member
New Member
Posts: 2
Joined: Fri Oct 24, 2008 10:40 pm

Re: is it possible to change the way stylesheets are included? [SOLVED]

Post by newseed »

You may find that the img closing tag still persist. The code will still validate but it will give a warning.
Post Reply

Return to “CMSMS Core”