Index: headerimage.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/headerimage/headerimage.module,v retrieving revision 1.17 diff -u -p -r1.17 headerimage.module --- headerimage.module 8 May 2008 16:19:29 -0000 1.17 +++ headerimage.module 8 May 2008 20:36:25 -0000 @@ -589,9 +589,44 @@ function headerimage_nodeapi(&$node, $op function headerimage_help($path, $arg) { switch ($path) { case 'admin/help#headerimage': + // Determine the status of the installation + $type_is_set = count(variable_get('headerimage_node_type', array())) ? t('(DONE)') : t('(TO DO)'); + $block_is_created = count(headerimage_get_blocks()) ? t('(DONE)') : t('(TO DO)'); + foreach (headerimage_get_blocks() as $delta => $name) { + $block_has_nodes = db_result(db_query("SELECT nid FROM {headerimage} WHERE block = %d", $delta)); + if ($block_has_nodes) break; + } + $block_has_nodes = $block_has_nodes ? t('(DONE)') : t('(TO DO)'); + foreach (headerimage_get_blocks() as $delta => $name) { + $block_in_region = db_result(db_query("SELECT region FROM {blocks} WHERE module = '%s' AND theme = '%s' AND delta = %d", 'headerimage', variable_get('theme_default', 'garland'), $delta)); + if ($block_in_region) break; + } + $block_in_region = $block_in_region ? t('(DONE)') : t('(TO DO)'); + $output = "

". t('Header Image module allows you to to display an image on selected pages. It can display one image on the front page, a different one on the FAQ pages and yet an other on the about us all remaining pages.') ."

\n"; $output .= "

". t('Visibility of each image, included in a node, can be based on node id, path, taxonomy, book, node type or PHP code. Header Image uses an arbitrary node type.') ."

\n"; $output .= "

". t('Multiple images (nodes) can be displayed in one block, with each image having its own conditions. Using a weight per node the order of selection can be controlled.') ."

\n"; + $output .= "

". t('Execute following steps to install: +

    +
  1. Set !access_permissions.
  2. +
  3. Optionally !create_node_type which will contain the header image.
  4. +
  5. !set_node_type to be the Heade Image node type. %status_type
  6. +
  7. !create_header_image_block. %status_create
  8. +
  9. Create Header Image nodes. Select a Header Image block and set display conditions for each node. %status_assign
  10. +
  11. !assign_header_image_block to a region. %status_region
  12. +
', array( + '!access_permissions' => l(t('access permissions'), 'admin/user/permissions'), + '!create_node_type' => l(t('create a node type'), 'admin/content/types/add'), + '!set_node_type' => l(t('Set a node type'), + 'admin/settings/headerimage/settings'), + '%status_type' => $type_is_set, + '!create_header_image_block' => l(t('Create a Header Image block'), 'admin/settings/headerimage'), + '%status_create' => $block_is_created, + '!assign_header_image_block' => l(t('Assign the Header Image block'), 'admin/build/block'), + '%status_assign' => $block_has_nodes, + '%status_region' => $block_in_region, + ) +) ."

\n"; $output .= "

". t('For more information please read the configuration and customization handbook Header Image page.', array('@headerimage' => 'http://drupal.org/node/201426/')) ."

\n"; return $output; }