Using color.module with no images

skiquel - September 19, 2007 - 21:23

Hi, I'm working on an theme called cleanstate. It has no images, and I'm curious of how an imageless color.module theme could be done without errors.

Looking at the code in color.module, it seems it is made to handle themes with images, but one could imagine that it could do good for image-less themes as well.

    * warning: Invalid argument supplied for foreach() in /Volumes/iDisk/Sites/drupal/modules/color/color.module on line 250.
    * warning: Invalid argument supplied for foreach() in /Volumes/iDisk/Sites/drupal/modules/color/color.module on line 367.
    * warning: Invalid argument supplied for foreach() in /Volumes/iDisk/Sites/drupal/modules/color/color.module on line 384.

These foreach's are all designed to take in code for an image. What if one wanted to create a color.module theme with no images?

Make sure you have the

dvessel - September 22, 2007 - 20:05

Make sure you have the default keys set as an empty array for the $info array. Color.module assumes it to be there always.

partial example:

<?php
$info
= array(
 
'copy' => array(),
 
'gradient' => array(),
 
'fill' => array(),
 
'slices' => array(),
);
?>

 
 

Drupal is a registered trademark of Dries Buytaert.