Hi,
If one wanted to create a sub theme of Garland (with only slight CSS modifications) and keep all of Garland's coloring capabilities, how should the sub-theme's color.inc file look? Specifically, are the paths used in color.inc relative to the sub-theme, drupal base or the base theme itself?
Looking at Minelli, indicates using a path relative to the sub theme is the correct way. Minelli's color.inc paths are like this:
'../images/some-image.png'
And of course Minelli is a sub-theme of Garland (and conveniently located in a sub folder of Garland). Now, if my sub-theme is site specific in a multisite installation at sites/somesite.com/themes/my_garland then how do I compose my paths? Am I really to use a relative path here like ../../../../themes/garland ?
That doesn't seem right to me. Any help would be appreciated. Thanks!
Comments
copy some files
Hi AltaVida,
I found this thread because I had the same problem. The only way I found was:
All other experiments with relative pathes leave a wrong path for the bg-images. It points to the garland folder. :-(
Ciao,
Mike
I too have the same problem.
I too have the same problem. Of course, the problem with manually copying these files is that you have to recopy them any time there's an update to the Garland theme, right?
Actually using the relative path with all the ../ is the right way to go. Now, I'm just having a problem making the color module work right. Only the bottom half of my page is the correct color. The top half remains the base blue color. Hmmm... still hunting around for an answer to this.
I hope you're not still hunting for an answer 8 years on ...
... but I encountered the same symptoms and it turns out to be related to using a theme with a 2-character name. There's a bad regexp that tries to simplify paths containing '..' and puts the wrong image URL's in style.css
Minimal color-enabled Garland subtheme
Here's a solution that doesn't involve copying any files and thus is less likely (though perhaps not unlikely) to cause problems during upgrades.
themes/my_theme/my_theme.info.my_theme.infohasbase theme = garland.my_theme/directory, make a symlink to[drupal]/themes/garland/color, so that you end up with a "directory"my_theme/color/.images/andstyle.css.themes/directory (e.g.[drupal]/sites/default/themes/my_theme/), make a symlink in thethemes/directory to[drupal]/themes/garland.At this point, you should be able to enable your theme and use the color picker, and you can proceed to customize your theme.
Minimal color-enabled Garland subtheme
"Inside the my_theme/ directory, make a symlink to [drupal]/themes/garland/color, so that you end up with a "directory" my_theme/color/."
Dumb question of the day: How exactly do you create a symlink? Is there any way to do this on a shared Linux server? I don't think I have command-line access.
Symlink on a shared server
In linux the link command makes symlinks and is quite easy to use. However if you don't have command line access it might not be so straight forward. If you have cpanel access, look around in there and there might be an option although it is not in my cpanel.
The best bet is to contact your hosting company. They will likely be able to create the link for you, or for a more sustainable option, they may enable ssh for you. If you have ssh access then you can access the command line remotely. I use hostmonster, and they required me to scan my passport before they would enable shh, but it was definitely worth the few minutes it took me to find, scan and email my passort. There have been many times when using the command line has been easier than trying to use ftp.
Good Luck!
-Josh
creating symbolic links in a shared or virtual host
Create the links using php, in particular, the symlink($target, $link) function.
I created the following php script and called it linkcolor.php:
This script is especially useful with cPanel since you aren't allowed command line access for creating the symlinks.
cheers,
kev