When drupal is not located in the web root, the path for image.css is broken. The attached patch corrects this by changing image.module to use the standard drupal_set_html_head(theme('stylesheet_import'... function. This has been tested and works as expected.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | image-stylesheet.patch | 646 bytes | decafdennis |
| #5 | imagecss.patch | 778 bytes | neclimdul |
| image.module_16.patch | 818 bytes | seanr |
Comments
Comment #1
Bèr Kessels commented+1 it uses the better Drupal APIs. using apis+++ :)
Comment #2
neclimdulWFM. This is pretty straight forward so lets push this through.
Comment #3
walkah commentedcommitted, thanks!
Comment #4
neclimdulReopening this as its come to my attention by moshe that this isn't actually the right way to do this. This breaks the $custom_theme function. Here's a patch to do it the correct way.
note: see a href="http://drupal.org/node/56182>#56182 for moshe's comments and patch to E-Commerce
Comment #5
neclimduland to quote moshe "grr."
Comment #6
decafdennis commented+1 for the patch, applies and works fine.
Because I am a nitpicker and noticed little clutter at the end of the patch file provided by neclimdul, I remembered that all PHP files should remove the last php closing tag. My modified patch does that additionally.
Comment #7
TDobes commentedUnder no circumstances should modules use theme_add_style for this sort of thing. Use of theme_add_style makes it considerably more difficult for themers to override the CSS.
Please see the long explanation.
Comment #8
decafdennis commentedThanks to TDobes for explaining the correct way to reference stylesheets. Maybe you should add some more documentation about this to the theme_add_style function, to prevent other modules from using it as well.
Settings the status back to fixed.
Comment #9
(not verified) commented