### Eclipse Workspace Patch 1.0 #P drupal-contrib-5 Index: modules/site_map/site_map.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/site_map/site_map.module,v retrieving revision 1.29.2.1 diff -u -r1.29.2.1 site_map.module --- modules/site_map/site_map.module 21 Mar 2007 08:14:04 -0000 1.29.2.1 +++ modules/site_map/site_map.module 26 May 2007 22:44:56 -0000 @@ -13,7 +13,7 @@ function site_map_help($section) { switch ($section) { case 'sitemap': - return '

'. variable_get('site_map_message', '') .'

'; + return (($output = variable_get('site_map_message', ''))) ? '

'. $output .'

' : ''; } } @@ -220,9 +220,9 @@ $output = ''; if (variable_get('site_map_show_rss_links', 1)) { - $output .= '

'. t('RSS') .' '. t('This is a link to a content RSS feed'); + $output .= '

'. theme_site_map_feed_icon(NULL, t('RSS')) .' '.t('This is a link to a content RSS feed'); if (module_exists('commentrss')) { - $output .= '
'. t('C-RSS') .' '. t('This is a link to a comment RSS feed'); + $output .= '
'. theme_site_map_feed_icon(NULL, t('C-RSS'), 'comment') .' '. t('This is a link to a comment RSS feed'); } $output .= '

'; } @@ -255,7 +255,7 @@ function _site_map_front_page() { $title = t('Front page'); - $output = l(t("Front page of %sn", array("%sn" => variable_get('site_name', 'Drupal'))), '', NULL, NULL, NULL, FALSE, TRUE) . (variable_get('site_map_show_rss_links', 1) ? ' '. l(t('RSS'), 'rss.xml', array('class' => 'rss', 'title' => t('Syndicate content'))) . (module_exists('commentrss') ? ' '. l(t('C-RSS'), 'crss', array('class' => 'rss', 'title' => t('Syndicate comments'))) : '') : ''); + $output = l(t("Front page of %sn", array("%sn" => variable_get('site_name', 'Drupal'))), '', NULL, NULL, NULL, FALSE, TRUE) . (variable_get('site_map_show_rss_links', 1) ? ' '. theme_site_map_feed_icon('rss.xml', t('Syndicate content')) . (module_exists('commentrss') ? ' '. theme_site_map_feed_icon('crss', t('Syndicate comments'), 'comment') : '') : ''); $output = theme('box', $title, $output); return $output; @@ -270,13 +270,13 @@ $output = '
'. t("Community blog and recent blog authors at %sn.", array("%sn" => variable_get('site_name', 'Drupal'))) .'
'; $blogs = array(); - $blogs[] .= l(t('All blogs'), 'blog') . (variable_get('site_map_show_rss_links', 1) ? ' '. l(t('RSS'), 'blog/feed', array('class' => 'rss', 'title' => t('Syndicate content'))) : ''); + $blogs[] .= l(t('All blogs'), 'blog') . (variable_get('site_map_show_rss_links', 1) ? ' '. theme_site_map_feed_icon('blog/feed', t('Syndicate content')) : ''); $result = db_query_range("SELECT DISTINCT u.uid, u.name FROM {users} u INNER JOIN {node} n ON u.uid = n.uid WHERE n.type = 'blog' AND n.status = 1 ORDER BY n.created DESC", 0, 10); while ($account = db_fetch_object($result)) { - $blogs[] = l(t("!s's blog", array("!s" => $account->name)), "blog/$account->uid") . (variable_get('site_map_show_rss_links', 1) ? ' '. l(t('RSS'), "blog/$account->uid/feed", array('class' => 'rss', 'title' => t('Syndicate content'))) : ''); + $blogs[] = l(t("!s's blog", array("!s" => $account->name)), "blog/$account->uid") . (variable_get('site_map_show_rss_links', 1) ? ' '. theme_site_map_feed_icon("blog/$account->uid/feed", t('Syndicate content')) : ''); } $output .= theme('item_list', $blogs); $output = theme('box', $title, $output); @@ -288,7 +288,7 @@ function _site_map_audio() { if (module_exists('audio')) { $title = t('Audio'); - $output = l(t('Audio content'), 'audio') . (variable_get('site_map_show_rss_links', 1) ? ' '. l(t('RSS'), 'audio/feed', array('class' => 'rss', 'title' => t('Syndicate content'))) : ''); + $output = l(t('Audio content'), 'audio') . (variable_get('site_map_show_rss_links', 1) ? ' '. theme_site_map_feed_icon('audio/feed', t('Syndicate content')) : ''); $output = theme('box', $title, $output); } @@ -298,7 +298,7 @@ function _site_map_video() { if (module_exists('video')) { $title = t('Video'); - $output = l(t('Video content'), 'video') . (variable_get('site_map_show_rss_links', 1) ? ' '. l(t('RSS'), 'video/feed', array('class' => 'rss', 'title' => t('Syndicate content'))) : ''); + $output = l(t('Video content'), 'video') . (variable_get('site_map_show_rss_links', 1) ? ' '. theme_site_map_feed_icon('video/feed', t('Syndicate content')) : ''); $output = theme('box', $title, $output); } @@ -434,7 +434,7 @@ $output .= " ($term->count)"; } if (variable_get('site_map_show_rss_links', 1)) { - $output .= ' '. l(t('RSS'), "taxonomy/term/$term->tid/$rss_depth/feed", array('class' => 'rss', 'title' => t('Syndicate content'))); + $output .= ' '. theme_site_map_feed_icon("taxonomy/term/$term->tid/$rss_depth/feed", t('Syndicate content')); } $output .= "\n"; // Reset $last_depth in preparation for the next $term. @@ -452,3 +452,15 @@ return $output; } + +function theme_site_map_feed_icon($url, $title = '', $type = '') { + if ($image = theme('image', (drupal_get_path('module', 'site_map'). '/img/feed-icon-12x12'.(($type == '') ? '' : '-'.$type) .'.png'), t($title), t($title), array('class' => 'rss'))) { + if ($url) { + $output = ''. $image. ''; + } + else { + $output = $image; + } + } + return $output; +} \ No newline at end of file Index: modules/site_map/site_map.css =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/site_map/site_map.css,v retrieving revision 1.2 diff -u -r1.2 site_map.css --- modules/site_map/site_map.css 23 Jun 2006 18:14:11 -0000 1.2 +++ modules/site_map/site_map.css 26 May 2007 22:44:55 -0000 @@ -1,6 +1,3 @@ .site-map .rss { - background: #ff5200; - padding: 0 2px; - color: #fff; - font-size: 9px; + padding: 0 0.1em; }