Zikula: A Flexible Open Source Content Management System
home | forum | contact us

Dizkus

Bottom
Regenerate Dynamic CSS
  • Posted: 16.02.2007, 03:06
     
    trimble
    rank:
    Softmore Softmore
    registered:
     December 2004
    Status:
    offline
    last visit:
    19.07.08
    Posts:
    98
    Is it possible to regenerate Xanthia's dynamic CSS file without deactivating/activating the theme?

    The theme that I'm working on has General Settings which control various height and width properties. I'd like the theme's CSS file to be rebuilt whenever any of these general settings or the color palette is changed.

    Actually, it'd also be nice to have a "Regenerate CSS" button as well! icon_smile

    --
    Regards,
    Mark
    _______________________
    LinuxMCE 0710
    Zikula 1.0.1
    Firefox 3.0.1
  • Posted: 16.02.2007, 04:55
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    online
    Posts:
    2975
    Do you want to change the CSS for 1 user... or to the theme in general (for everybody)?

    --
    David Pahl
    Zikula Support Team
  • Posted: 16.02.2007, 05:03
     
    trimble
    rank:
    Softmore Softmore
    registered:
     December 2004
    Status:
    offline
    last visit:
    19.07.08
    Posts:
    98
    I'd like to update it for the theme in general.

    --
    Regards,
    Mark
    _______________________
    LinuxMCE 0710
    Zikula 1.0.1
    Firefox 3.0.1
  • Posted: 04.05.2007, 10:21
     
    thesubmitter
    rank:
    Softmore Softmore
    registered:
     January 2005
    Status:
    offline
    last visit:
    28.04.08
    Posts:
    52
    What I do was change a line on the settings page and the hit generate configuration cache and then change the settings back. I think I also manually deleted the cached stylesheet from one of the pnTemp subfolders
  • Posted: 04.10.2007, 06:37
     
    lhale
    rank:
    Freshman Freshman
    registered:
     September 2007
    Status:
    offline
    last visit:
    14.11.08
    Posts:
    19


    1) Tell me where and how you perform the regeneration of dynamic CSS for Xanthia - I see no evidence that any CSS files are being updated.
    2) When you say 'settings page' is that the usual system settings page accessed by the admin user (http://XXX/pnuke/admin.php?module=Settings)? If so, where does one find a 'generate configuration cache' link or button to push? I don't see any of this
    3) Do you guys have a clue as to how to persist a color palette with a theme? I don;t see any relationships for this in the DB tables.
    4) Is #1 and #2 on somebody's dream list?
  • Posted: 04.10.2007, 07:30
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    online
    Posts:
    2975
    1. Are you using dynamic CSS? Dumping any Cached and Compiled files will automatically regenerate new ones on the fly (as needed).

    2. Xanthia and pnRender settings

    3. I am not sure what you mean. Color palettes are hardcoded to themes (sometimes, rarely). I hope you are not storing themes in the DB...

    4. Nope

    --
    David Pahl
    Zikula Support Team
  • Posted: 04.10.2007, 15:24
     
    videokid
    rank:
    Professional Professional
    registered:
     March 2003
    Status:
    offline
    last visit:
    19.11.08
    Posts:
    901
    dynamic CSS?
    how hard is it to include one line

    in your master and if you have one, home.htm...?
    I just don't understand your goal here I gues...

    - Igor

    --
    Have a nice day
    zikulapro.be is currently running
    Zikula 1.0.2
  • Posted: 04.10.2007, 17:09
     
    trimble
    rank:
    Softmore Softmore
    registered:
     December 2004
    Status:
    offline
    last visit:
    19.07.08
    Posts:
    98
    By Dynamic CSS I'm referring to a static CSS file (style.css) generated from a dynamic style.php file. Using style.php to create a style.css can greatly simplify maintenance on long and complex stylesheets by using customized General Settings variables for sizes, widths, heights, colors, etc. With a style.php file one can define these basic attributes and let PHP take care of the calculating and/or inserting the necessary values throughout the generated style.css file. This is a *big* time-saver that also is also less error prone. There's no performance hit because the operative style.css file remains static and cachable.

    What I'd like to be able to do is trigger PN to regenerate style.css whenever any of the General Settings variables are changed. Presently in .7x it doesn't.

    --
    Regards,
    Mark
    _______________________
    LinuxMCE 0710
    Zikula 1.0.1
    Firefox 3.0.1
  • Posted: 04.10.2007, 20:22
     
    lhale
    rank:
    Freshman Freshman
    registered:
     September 2007
    Status:
    offline
    last visit:
    14.11.08
    Posts:
    19
    Thanks for clarifying the synamic CSS semantics. You're doing exactly what this person is doing -> http://www.digital-web.com/articles/generating_dynamic_css_with_php/. At first this thread sounded like PN or Xanthia/AT could already do dynamic CSS.

    What I'm looking for is something simply to associate a new color palette to the current default theme. Getting back to my #2, I see no evidence on the Xanthia main configuration settings page of the 'generate configuration cache' facility you alluded to - do you really mean this page (http://XXX/pnuke/index.php?module=Xanthia&type=admin&func=config) or something totally obscure I can't find? The pnRender settings do allow a 'force compilation' - is that it?

    All I'm trying to figure out is how to associate a new color palette (persisted in the DB's palette table) with the current selected theme (my previous #3). I'.m not attempting to store a theme in the DB - don;t need to do that with that Xanthia subsystem. I'[m just tyryingto figure out how PN associates colors that you change (via http://XXX/pnuke/index.php?module=Xanthia&type=admin&func=editTheme&todo=colors&skin=PiterPanV2) with the name of the color palette you've chosen for the current theme - I see no evidence of a DB association or anything supporting that in the code whatsoever. But since there's this wonderful Xanthia change color facility, how the hell does it work???
  • Posted: 04.10.2007, 20:57
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    online
    Posts:
    2975
    To edit a color pallette, this is what I do..

    Note: I cannot stand the Xanthia 2, administration panel, I do not use it (ever) other than the general config, and to activate themes...

    If you feel the need to create a pallette, I (this is how I 'would' do it). I would simply edit the ../themes/$theme/xaninit.php directly, no fancy admin interface, at least not for XTE2. XTE3 on the other hand does not irritate me, so I am moving to using it (somewhat) for .8 templates.

    Read this for your setting questions: http://community.postnuke.com/Wiki-CachingCompiling.htm



    Dynamic CSS is using a variable language like PHP to create variables in a CSS file. Apache, has to be configured to process PHP in a CSS file to return variable CSS



    --
    David Pahl
    Zikula Support Team
  • Posted: 04.10.2007, 21:35
     
    lhale
    rank:
    Freshman Freshman
    registered:
     September 2007
    Status:
    offline
    last visit:
    14.11.08
    Posts:
    19
    I discovered the xainit.php way last week but was hoping I was missing something with the color palette UI and weird config options, which apparently are just plain half baked and broken. Thanks guys.

    That pretty much ends my inquiries - no need to waste more time when the client is banging on the schedule door wondering why it's taking so long...
  • Posted: 04.10.2007, 23:16
     
    AmmoDump
    rank:
    Professional Professional
    registered:
     December 2003
    Status:
    online
    Posts:
    2975
    I never use color palettes. I just use CSS :)

    --
    David Pahl
    Zikula Support Team

Main Menu

Extensions Database

Documentation

Development

Login

Donate to Zikula