• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Implemented CSS static file please

gordy

Well-known member
#1
Can there be an option to make the CSS file the same name? In my environment, I have numerous static pages that call the css by my forums CSS (vB for today until converted)

This is a nuisance as I'll have to always updated my CSS include file whenever there is a minor template change (non CSS)
 

bambua

Well-known member
#2
I'm not sure what your asking for here, but I know as it is now I call the css.php from everywhere on my site without issues at all.
 

James

Well-known member
#5
EXTRA.css is basically for extra CSS that you want to add. It's loaded last, thus overriding any CSS that is called before it. It's also not changed during upgrades so you won't lose any custom CSS you've applied.
 

Onimua

Well-known member
#6
I'm not sure if I completely understand what you're trying to do but if you put your style changes into EXTRA.css and then call it, you can use that for all your changes without worrying needing to change anything else. Then you only have to worry about that one CSS call and nothing else.

Of course I could be incorrect as this is based on my assumption of what you're doing. :confused:
 

gordy

Well-known member
#7
Then no, it wouldn't work
The forum is the heart of the site, all additional content (static and dynamic pages) shares the forums core values in terms of css for unity of the visuals.

Non-forum pages are derived via includes from the forums' CSS dynamically named file, any trivial layout changes not even involving CSS write out a new randomly numbered CSS file breaking CSS for the non-forum pages.

It would be convenient to have that file NOT rename itself.
 

Brogan

XenForo moderator
Staff member
#8
It's loaded last, thus overriding any CSS that is called before it.
Not quite.
It's near the bottom of the cascade but there are instances when the !important declaration is required.

I'm afraid I'm another one who doesn't really understand what it is you're trying to do.
 

gordy

Well-known member
#9
I'm not sure what your asking for here, but I know as it is now I call the css.php from everywhere on my site without issues at all.
Thanks bambau, that works I expected the rest of the string was needed, which it isn't ;)
 
F

Floris

Guest
#10
Load xenforo, right click and view source, the link to the css.php with what it loads is listed, you can remote call that.
 

James

Well-known member
#12
The timestamp forces a re-cache whenever the CSS is changed doesn't it? If I'm right, it's not ideal to drop the timestamp.
 

gordy

Well-known member
#13
The timestamp forces a re-cache whenever the CSS is changed doesn't it? If I'm right, it's not ideal to drop the timestamp.
Yes, but as I mentioned before, for example vB land, a trivial structure change to a template would cause a CSS update, when not even touching any CSS values.
 

James

Well-known member
#15
Yes, but as I mentioned before, for example vB land, a trivial structure change to a template would cause a CSS update, when not even touching any CSS values.
If this is indeed the case, you might want to make a suggestion for the timestamp not to update unless the .css files have specifically been changed from their previous revision.
 

gordy

Well-known member
#16
If this is indeed the case, you might want to make a suggestion for the timestamp not to update unless the .css files have specifically been changed from their previous revision.
That's the gist of what I'm requesting.. I'll craft a script, cron it to stat and symlink the file, messy but will automate it nonetheless
 

Kier

XenForo Developer
Staff member
#17
If this is indeed the case, you might want to make a suggestion for the timestamp not to update unless the .css files have specifically been changed from their previous revision.
That's really not practical, as any change to any style property or any template could also mean that the materialized content of the CSS changes.
 

bambua

Well-known member
#18
I just link directly to it and do the following, in the end it gives you the same cache updates so it works really nice:

Code:
<link rel="stylesheet" type="text/css" href="http://www.shadowedsoul.net/community/css.php?css=xenforo,form,public&amp;style=12&amp;d=<?php echo time(); ?>">
 

bambua

Well-known member
#19
That's really not practical, as any change to any style property or any template could also mean that the materialized content of the CSS changes.
I agree that seems really confusing for what in the end is a pretty elegant solution...and really pretty easy to utilize without even needing cron scripts or symbolically linked files.