I receive the following code message on top of my drupa site after the installation of imagecache. Unchecking the module does not remove the message. Any ideas?:

'canvasactions_rgb_form'); $form['red'] = array( '#type' => 'textfield', '#title' => t('Red'), '#default_value' => $action['red'], '#size' => 3); $form['green'] = array( '#type' => 'textfield', '#title' => t('Green'), '#default_value' => $action['green'], '#size' => 3); $form['blue'] = array( '#type' => 'textfield', '#title' => t('Blue'), '#default_value' => $action['blue'], '#size' => 3); $form['HEX'] = array( '#type' => 'textfield', '#title' => t('HEX'), '#default_value' => $action['HEX'], '#size' => 7); return $form; } /** * Prepare a subform for displaying positioning fields * * Helper function to render a common element. */ function canvasactions_pos_form($action) { $form = array( #'#theme' => 'canvasactions_pos_form', 'xpos' => array( '#type' => 'textfield', '#title' => t('X offset'), '#default_value' => isset($action['xpos']) ? $action['xpos'] : 'center', '#size' => 6, '#description' => t('Enter an offset in pixels or use a keyword: left, center, or right.'), ), 'ypos' => array( '#type' => 'textfield', '#title' => t('Y offset'), '#default_value' => isset($action['ypos']) ? $action['ypos'] : 'center', '#size' => 6, '#description' => t('Enter an offset in pixels or use a keyword: top, center, or bottom.'), ), ); return $form; } /** * Render the subform in a table */ function theme_canvasactions_rgb_form(&$form) { $header = array(); $table = array(); foreach (element_children($form) as $key) { $header[$key] = $form[$key]['#title']; unset($form[$key]['#title']); $table['field'][$key] = drupal_render($form[$key]); } $output .= theme('table', $header, $table); $output .= t('Enter colors in decimal, 0-255, or in HEX. If HEX is set, it will take priority.'); $output .= drupal_render($form); return $output; } function theme_canvasactions_rgb($rgb) { if($rgb['HEX'] && $deduced = hex_to_rgb($rgb['HEX'])) { $rgb = array_merge($rgb, $deduced); } if ($rgb['red'] || $rgb['green'] || $rgb['blue']) { $output .= ' RGB:['. $rgb['red'] .', '. $rgb['green'] .', '. $rgb['blue'] .'] #'. $rgb['HEX']; } else { $output .= ' ' .t('Transparent'); } return $output; } /** * Decode an HTML hex-code into an array of R, G, and B values. * accepts these formats: (case insensitive) #ffffff, ffffff, #fff, fff */ function hex_to_rgb($hex) { $hex = trim($hex); // remove '#' if (substr($hex, 0, 1) == '#') $hex = substr($hex, 1) ; // expand short form ('fff') color if (strlen($hex) == 3) { $hex = substr($hex, 0, 1) . substr($hex, 0, 1) . substr($hex, 1, 1) . substr($hex, 1, 1) . substr($hex, 2, 1) . substr($hex, 2, 1) ; } if (strlen($hex) != 6) trigger_error('Error: Invalid color "'. $hex .'"') ; // convert $rgb['red'] = hexdec(substr($hex, 0, 2)) ; $rgb['green'] = hexdec(substr($hex, 2, 2)) ; $rgb['blue'] = hexdec(substr($hex, 4, 2)) ; return $rgb ; }

php 5.2.6
mySQL 5.0.+
iis6
w2k3 sp2

Comments

rhylos’s picture

Project: ImageCache » ImageCache Actions
Version: 5.x-2.0 » 5.x-1.0

Update 1:

NOTE:: ORIGINAL MESSAGE SHOULD READ: I receive the following code message on top of my drupal site after the installation of ImageCache Actions.

Any ideas?:

MORE INFO::
I get the message above when this modules is enabled with or without the ImageCache Color Blend module enabled. I also get this message with the ImageCache Color Blend module enabled by itself without the ImageCache Actions module 5.x-1.0. I will place this message with the ImageCache Color Blend module issues as well, however my feeling is that the issue is related to both of them.

dman’s picture

That looks like code dumped straight out of the imagecache_actions source.
Possibly an error with the way it's being included, a missing php tag, or a corrupt download.

http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/imagecache_...

... Ah, I see. You probably have php_short_tags set to FALSE.

Adjust that file imagecache_actions/utility.inc so it opens with <?php not just <?
I'll fix that in the next roll

rhylos’s picture

Thanks dman,

yes, adding php to the opening tag in the imagecache_actions/utility.inc file worked for me:

<?php

instead of

<?

dman’s picture

Patched this in current dev. Maybe not current release yet.

dman’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.