? .project Index: site-map.tpl.php =================================================================== RCS file: site-map.tpl.php diff -N site-map.tpl.php --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ site-map.tpl.php 20 May 2010 02:48:54 -0000 @@ -0,0 +1,56 @@ + + +
+ +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +
Index: site_map.admin.inc =================================================================== RCS file: /cvs/drupal/contributions/modules/site_map/site_map.admin.inc,v retrieving revision 1.1.2.7.2.4 diff -u -p -r1.1.2.7.2.4 site_map.admin.inc --- site_map.admin.inc 7 May 2010 11:16:29 -0000 1.1.2.7.2.4 +++ site_map.admin.inc 20 May 2010 02:48:54 -0000 @@ -21,6 +21,7 @@ function site_map_admin_settings() { '#rows' => 5, '#description' => t('Define a message to be displayed above the site map.'), ); + $form['site_map_message_format'] = filter_form(variable_get('site_map_message_format', FILTER_FORMAT_DEFAULT)); $form['site_map_content'] = array( '#type' => 'fieldset', Index: site_map.module =================================================================== RCS file: /cvs/drupal/contributions/modules/site_map/site_map.module,v retrieving revision 1.39.2.17.2.7 diff -u -p -r1.39.2.17.2.7 site_map.module --- site_map.module 7 May 2010 11:22:23 -0000 1.39.2.17.2.7 +++ site_map.module 20 May 2010 02:48:55 -0000 @@ -19,9 +19,6 @@ function site_map_perm() { */ function site_map_theme() { return array( - 'site_map_display' => array( - 'arguments' => array(), - ), 'site_map_box' => array( 'arguments' => array('title' => NULL, 'content' => NULL, 'class' => NULL), ), @@ -34,6 +31,13 @@ function site_map_theme() { 'site_map_menu_item' => array( 'arguments' => array('link' => NULL, 'has_children' => NULL, 'menu' => NULL), ), + 'site_map' => array( + 'arguments' => array(), + 'template' => 'site-map', + ), + 'site_map_commentrss' => array( + 'arguments' => array(), + ), ); } @@ -95,61 +99,48 @@ function site_map_page() { drupal_add_css(drupal_get_path('module', 'site_map') .'/site_map.css'); } - return theme('site_map_display'); + return theme('site_map'); } /** - * Return a themed site map. + * Process variables for site-map.tpl.php. * - * @return - * A string containing the site map output. + * @see site-map.tpl.php */ -function theme_site_map_display() { - $output = ''; - - $message = filter_xss_admin(variable_get('site_map_message', '')); - $output .= $message ? '

'. $message .'

' : ''; - +function template_preprocess_site_map(&$variables) { + $variables['message'] = check_markup(variable_get('site_map_message', ''), variable_get('site_map_message_format', FILTER_FORMAT_DEFAULT)); if ((variable_get('site_map_show_rss_links', 1) != 0) && module_exists('commentrss') && variable_get('commentrss_site', COMMENTRSS_SITE_FRONT_PAGE)) { - $output .= '

'. t('Legend:') .'
'; - $output .= ''. theme('site_map_feed_icon', NULL) .' '. t('Link to a content RSS feed'); - $output .= '
'. theme('site_map_feed_icon', NULL, 'comment') .' '. t('Link to a comment RSS feed'); - $output .= '

'; + $variables['comentrss'] = theme('site_map_commentrss'); } - if (variable_get('site_map_show_front', 1)) { - $output .= _site_map_front_page(); + $variables['front_page'] = _site_map_front_page(); } - if (variable_get('site_map_show_blogs', 1)) { - $output .= _site_map_blogs(); + $variables['blogs'] = _site_map_blogs(); } - -/* $output .= _site_map_audio(); */ - -/* $output .= _site_map_video(); */ - // Compile the books trees. - $output .= _site_map_books(); - + if (module_exists('books')) { + $variables['books'] = _site_map_books(); + } // Compile the menu trees. - $output .= _site_map_menus(); - + $variables['menus'] = _site_map_menus(); if (variable_get('site_map_show_faq', 1)) { - $output .= _site_map_faq(); + $variables['faq'] = _site_map_faq(); } - // Compile the vocabulary trees. - $output .= _site_map_taxonomys(); - + $variables['taxonomys'] = _site_map_taxonomys(); // Invoke all custom modules and get themed HTML to be integrated into the site map. $additional = module_invoke_all('site_map'); foreach ($additional as $themed_site_map_code) { - $output .= $themed_site_map_code; + $variables['additional'] .= $themed_site_map_code; } +} - $output = '
'. $output .'
'; - +function theme_site_map_commentrss() { + $output .= '

'. t('Legend:') .'
'; + $output .= ''. theme('site_map_feed_icon', NULL) .' '. t('Link to a content RSS feed'); + $output .= '
'. theme('site_map_feed_icon', NULL, 'comment') .' '. t('Link to a comment RSS feed'); + $output .= '

'; return $output; }