--- path_image.module.cvs 2006-12-15 15:53:20.000000000 +0000 +++ path_image.module 2006-12-19 13:07:35.750059680 +0000 @@ -8,7 +8,7 @@ * * Written by AjK October 2006 */ - + /** * 26Oct2006 11:31 : AjK * added in the use of file_directory_path() to lock the image @@ -24,13 +24,13 @@ // uncomment the following line to enable debugging mode // define("PATH_IMAGE_DEBUG", "INLINE"); } - + // define our module name, this MUST be defined here define("PATH_IMAGE_MODULE_NAME", "path_image"); - + // define the block delta define("PATH_IMAGE_BLOCK_DELTA_DISPLAY", 0); - + _path_image_debug("path_image_init()"); } @@ -39,7 +39,7 @@ */ function path_image_perm() { _path_image_debug('path_image_perm()'); - + return array('Path image admin'); } @@ -48,12 +48,12 @@ */ function path_image_help($section) { _path_image_debug("path_image_help('$section')"); - + switch ($section) { case 'admin/modules#description': return t('Provides an block containing an image dependent upon the URL path'); } - + return ''; } @@ -73,7 +73,7 @@ 'type' => MENU_NORMAL_ITEM ); } - + return $items; } @@ -82,7 +82,7 @@ */ function path_image_form_alter($form_id, &$form) { _path_image_debug("path_image_form_alter('$form_id')"); - + if ('block_admin_configure' == $form_id) { if (isset($form['module']['#value']) && 'path_image' == $form['module']['#value']) { $form['path_image'] = array( @@ -96,7 +96,7 @@ '#value' => t('This section allows you to control the block\'s visibility. '. 'To administer the block\'s content please visit the block\'s '. l('administration section', 'admin/settings/path_image')) - ); + ); } } } @@ -109,7 +109,7 @@ switch ($op) { case 'list': - $blocks[PATH_IMAGE_BLOCK_DELTA_DISPLAY] = array( + $blocks[PATH_IMAGE_BLOCK_DELTA_DISPLAY] = array( 'info' => t('Path to image display block'), 'weight' => -10, 'enabled' => 0, @@ -117,14 +117,14 @@ ); return $blocks; break; - + case 'view': switch ($delta) { case PATH_IMAGE_BLOCK_DELTA_DISPLAY: return _path_image_block_main(); break; // not really needed but be consistent } // end switch() - } // end switch() + } // end switch() } /** @@ -138,11 +138,11 @@ // where all debugging messages are normally dumped // (I like to do "tail -f error_log" to watch but // that's not always possible) - + if (!defined("PATH_IMAGE_DEBUG") || PATH_IMAGE_DEBUG != 'INLINE') { return; } - + if (is_array($GLOBALS[PATH_IMAGE_MODULE_NAME]['debug'])) { print ("\n