1. 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

Discussion in 'Closed Suggestions' started by gordy, Mar 6, 2011.

  1. gordy

    gordy Well-Known Member

    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)
     
  2. bambua

    bambua Well-Known Member

    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.
     
    gordy likes this.
  3. Onimua

    Onimua Well-Known Member

    Can't you use EXTRA.css for this?
     
  4. gordy

    gordy Well-Known Member

    Can you elaborate?
     
  5. James

    James Well-Known Member

    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.
     
  6. Onimua

    Onimua Well-Known Member

    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:
     
  7. gordy

    gordy Well-Known Member

    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.
     
  8. Brogan

    Brogan XenForo Moderator Staff Member

    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.
     
    James likes this.
  9. gordy

    gordy Well-Known Member

    Thanks bambau, that works I expected the rest of the string was needed, which it isn't ;)
     
  10. Floris

    Floris Guest

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

    gordy Well-Known Member

  12. James

    James Well-Known Member

    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.
     
  13. gordy

    gordy Well-Known Member

    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.
     
  14. Floris

    Floris Guest

  15. James

    James Well-Known Member

    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.
     
  16. gordy

    gordy Well-Known Member

    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 [​IMG]
     
  17. Kier

    Kier XenForo Developer Staff Member

    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.
     
  18. bambua

    bambua Well-Known Member

    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(); ?>">
     
  19. bambua

    bambua Well-Known Member

    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.
     

Share This Page