Index: views_header_nodes_plugin_attachment_header_node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/views_header_nodes/views_header_nodes_plugin_attachment_header_node.inc,v
retrieving revision 1.1
diff -u -p -r1.1 views_header_nodes_plugin_attachment_header_node.inc
--- views_header_nodes_plugin_attachment_header_node.inc	11 May 2010 16:08:20 -0000	1.1
+++ views_header_nodes_plugin_attachment_header_node.inc	24 Sep 2010 03:34:15 -0000
@@ -153,8 +153,13 @@ class views_header_nodes_plugin_attachme
       // No corresponding header node found. 
       // If prepopulate module is present, show a helper link to admins
       // to create one.
-      if (module_exists('prepopulate') && user_access('create page content') && user_access('create url aliases')) {
-        // @todo: allow other node types than page?
+      // The content type can be changed by assiging the variable
+      // 'views_header_nodes_type' to a content type, e.g. in the settings.php
+      // file add the line:
+      // $conf['views_header_nodes_type'] = 'image';
+      // @todo Allow this to be changed in the View.
+      $content_type = check_plain(variable_get('views_header_nodes_type', 'page'));
+      if (module_exists('prepopulate') && user_access('create '. $content_type .' content') && user_access('create url aliases')) {
         $options = array(
           'query' => array(
             'edit[path][path]' => $node_path,
@@ -165,7 +170,7 @@ class views_header_nodes_plugin_attachme
           // Prevent pathauto from setting the path.
           $options['query']['edit[path][pathauto_perform_alias]'] = 0;
         }
-        $output = l(t('Add a header'), 'node/add/page', $options);
+        $output = l(t('Add a header'), 'node/add/'. $content_type, $options);
         
         return $output;
       }
