External CSS Config in .8

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Tom - Daai Tou Laam
Regular
Posts: 15
Joined: Thu Jan 06, 2005 1:34 am
Location: Hong Kong
Contact:

External CSS Config in .8

Post by Tom - Daai Tou Laam »

Once I upgraded my testbed to .8 I noticed that the external style sheet stored in the configuration page was not being applied to pages and wasn't included in the default/index.tpl template.

I noticed that the variable extCSS wasn't included in the functions_smarty.inc.php array. So after the line:

Code: Select all

'head_link_stylesheet'      => serendipity_rewriteURL('serendipity.\
css'),
I added this line:

Code: Select all

'head_ExtCSS'               => $serendipity['extCSS'],
Then to my new index.tpl file I added the line:

Code: Select all

<link rel="stylesheet" type="text/css" href="{$head_ExtCSS}" />
Is this a reasonable way to add back in the external style sheet? I noticed the serendipity_genpage.inc.php had a lot of additional conditionals on the extCSS and uses an import statement.

Code: Select all

<?php if (strlen($serendipity['extCSS']) > 0 && strtolower($serendipity['extCSS\
'])!='none') { ?>
    <style type="text/css">@import "<?php echo $serendipity['extCSS']; ?>";</style>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: External CSS Config in .8

Post by garvinhicking »

Hi Tom!

Thanks for bringing this to our attention!

To be honest, it seems we developers forget about that setting 0.8 - it isn't really necessary anymore, because one can easily add another stylesheet to either his style.css (via @import) or immediately into the index.tpl.

I will write a mail to our list and discuss removing the extCss setting directly from our configuration options and make a note in our Readme.

Thanks,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
tomsommer
Core Developer
Posts: 240
Joined: Tue Sep 02, 2003 6:43 pm
Location: Denmark
Contact:

Post by tomsommer »

do it, remove it -- REMOVE IT!!!! :D
Tom Sommer (Serendipity Core Developer)
http://blog.dreamcoder.dk
Post Reply