Page 1 of 1

2k11: Including the user.css

Posted: Fri Mar 29, 2013 12:03 pm
by yellowled
As of now, 2k11 includes the user.css using a template option to determine whether the user.css should be used and serendipity_getFile. Someone just pointed out to me that serendipity_getFile seems to be “part of the fallback mechanism”, which means if:

* the option to include it is set to “Yes”
* there is no user.css in /templates/2k11
* there is a user.css in /templates/bulletproof

Bulletproof's user.css is used in 2k11. That's not ideal.

The solution would be simple: include the user.css using

Code: Select all

<link rel="stylesheet" href="{$serendipityHTTPPath}templates/{$template}/user.css">
instead. Does anyone see any drawback to this?

YL

Re: 2k11: Including the user.css

Posted: Fri Mar 29, 2013 1:10 pm
by Timbalu
No, not really (apart from those guys who may symlink (plugins/ and) templates/ dir to their repo...) ;-)
What about keeping serendipity_getFile and provide an empty file user.css with 2k11? Then it would not fall back in case someone activates a user file, but does not push one, which would be pretty silly...

Re: 2k11: Including the user.css

Posted: Fri Mar 29, 2013 7:21 pm
by yellowled
Timbalu wrote:What about keeping serendipity_getFile and provide an empty file user.css with 2k11? Then it would not fall back in case someone activates a user file, but does not push one, which would be pretty silly...
Not an option. Not shipping a user.css with 2k11 (or BP) makes the user.css safe in case of an update (since it will not be overwritten by the shipped one), which is the key argument for having one in the first place.

However, the user experiencing this has reported that he can't reproduce the issue, so it might just be some kind of caching voodoo after all. I guess I'm going to leave it as is for the time being. I guess the chances of someone even reproducing the steps necessary to experience this are pretty slim anyway.

YL