I am using a Drupal theme which makes use of the colour picker. When I select a new colour scheme, a directory gets creates in MyDrupalSite/sites/default/files/color/ThemeName-RandomNumer. Using Opera's developer console, I can see that these files (the generated images and CSS) are used to render the website (if CSS caching is switched off, of course). However, I have no idea where Drupal is told to look in that directory for the CSS: it doesn't seem to be in a config file and I have no idea where something like that might be stored in the DB. I would also like to know where the colours for a "custom" configuration are stored: I spent a large chunk of last night trying to figure that out, but to no avail. Are they somehow encoded into the "RandomNumber"? So, if someone could enlighten me, I would be much obliged.
Tell me more
×
Server Fault is a question and answer site for
professional system and network administrators. It's 100% free, no registration required.
|
|
|||
|
|
|
You'll find that the color form on your theme saves the locations of the files as variables at the end of its save operation: http://api.drupal.org/api/function/color_scheme_form_submit/6
These values are then picked up by your color-aware theme. For instance, the Drupal 6 default theme (Garland) has the following in it's phptemplate_preprocess_page():
This will add the CSS files to the header. |
|||
|
|