Page 1 of 1

External CSS Config in .8

Posted: Thu Jan 27, 2005 6:38 am
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>

Re: External CSS Config in .8

Posted: Thu Jan 27, 2005 12:43 pm
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

Posted: Thu Jan 27, 2005 3:48 pm
by tomsommer
do it, remove it -- REMOVE IT!!!! :D