Index: syndication.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/syndication/syndication.module,v
retrieving revision 1.50
diff -u -p -r1.50 syndication.module
--- syndication.module	1 Jun 2008 05:56:31 -0000	1.50
+++ syndication.module	4 Jun 2008 23:08:43 -0000
@@ -64,31 +64,31 @@ function syndication_block($op = 'list',
 function syndication_page() {
   $output = '';
   if (module_exists('atom')) {
-    $output .= theme('box', t('Atom feed'), l(t('Atom front page feed'), 'atom/feed'));
+    $output .= theme('syndication_section', t('Atom feed'), l(t('Atom front page feed'), 'atom/feed'));
   }
   if (function_exists('blog_feed_user')) {
-    $output .= theme('box', t('Blogs'), syndication_blogs());
+    $output .= theme('syndication_section', t('Blogs'), syndication_blogs());
   }
   if (module_exists('aggregator') && user_access('access news feeds')) {
-    $output .= theme('box', t('External feeds'), syndication_opml());
+    $output .= theme('syndication_section', t('External feeds'), syndication_opml());
   }
   if (module_exists('taxonomy') && user_access('access content')) {
-    $output .= theme('box', t('Categories'), syndication_vocabularies());
+    $output .= theme('syndication_section', t('Categories'), syndication_vocabularies());
   }
   if (module_exists('views') && module_exists('views_rss') && user_access('access content')) {
-    // Only bother generating the box if there are enabled views feeds.
+    // Only bother generating the section if there are enabled views feeds.
     if ($views = syndication_views_rss()) {
-      $output .= theme('box', t('Views'), $views);
+      $output .= theme('syndication_section', t('Views'), $views);
     }
   }
 
-  // Modules may add their own syndication boxes.
+  // Modules may add their own syndication sections.
   $result = array();
   foreach (module_list() as $name) {
     $result = module_invoke($name, 'syndication', $edit);
     if (isset($result)) {
-      foreach ($result as $box) {
-        $output .= theme('box', $box['subject'], $box['content']);
+      foreach ($result as $section) {
+        $output .= theme('syndication_section', $section['subject'], $section['content']);
       }
     }
   }
@@ -125,13 +125,14 @@ function syndication_users() {
  */
 function syndication_blogs() {
   $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", 0, 16);
+  $path = "blog/$account->uid/feed";
   while ($account = db_fetch_object($result)) {
-    $author = $account->name .': '. l(t('RSS feed'), "blog/$account->uid/feed");
+    $author = $account->name .': '. l(t('RSS feed'), $path);
     $author .= module_exists('atom') ? ', '. l(t('Atom feed'), "blog/$account->uid/atom/feed") : '';
-    $authors[] = $author;
+    $authors[] = theme('syndication_item', $path, $author);
   }
   if ($authors) {
-    $output = theme('item_list', $authors, t('Recent Blog Authors'));
+    $output = theme('syndication_item_list', $authors, t('Recent Blog Authors'));
   }
 
   $output .= drupal_get_form('syndication_users');
@@ -170,7 +171,7 @@ function syndication_vocabularies() {
     $tree = array_slice($tree, 0, 30);
     $items = syndication_taxonomy_build_list_items($index = 0, $tree);
     if ($items) {
-      $output .= theme('item_list', $items, $vocab->name);
+      $output .= theme('syndication_item_list', $items, $vocab->name);
     }
   }
   $output .= l('Combine terms into a single feed', 'syndication/builder');
@@ -196,7 +197,7 @@ function syndication_taxonomy_build_list
         $prefix = "";
       }
       $item = $prefix . $term_link ." ($count)";
-      $items[] = $item;
+      $items[] = theme('syndication_item', $term_path, $item);
       $index++;
     }
     else {
@@ -327,7 +328,7 @@ function syndication_views_rss() {
   if ($vids) {
     $result = _syndication_return_views_rss_feeds($vids);
     while ($view = db_fetch_object($result)) {
-      $rows[] = l($view->page_title, $view->url .'/feed', array('class' => 'syndication_view_rss'));
+      $rows[] = theme('syndication_item', l($view->page_title, $view->url .'/feed', array('class' => 'syndication_view_rss')));
     }
     $output = theme('syndication_views_rss', $rows);
   }
@@ -368,7 +369,7 @@ function _syndication_return_views_rss_f
  */
 function theme_syndication_views_rss($rows) {
   if (is_array($rows)) {
-    $output = theme('item_list', $rows, '', 'ul');
+    $output = theme('syndication_item_list', $rows, '');
   }
   return $output;
 }
@@ -454,25 +455,47 @@ function syndication_help_api() {
 
   $output = '
 
-    Any module can export boxes to the syndication page. You do so
+    Any module can export sections to the syndication page. You do so
     by creating a <i>modulename</i>_syndication function which returns
-    an associative array of boxes, much like the block module. Each box
+    an associative array of sections, much like the block module. Each section
     in the array requires <i>subject</i> and <i>content</i> fields. Example:
     <pre>
     function mymodule_syndication() {
 
-      // Creating the first box
+      // Creating the first section.
 
-      $box[0]["subject"] = "Existentialism";
-      $box[0]["content"] = "So many feeds in this world";
+      $section[0]["subject"] = "Existentialism";
+      $section[0]["content"] = "So many feeds in this world";
 
-      // Lets create a one box more
+      // Let\'s create a one section more.
 
-      $box[1]["subject"] = "Got any question?";
-      $box[1]["content"] = "Who, Where, Why, When";
-      return  $box;
+      $section[1]["subject"] = "Got any question?";
+      $section[1]["content"] = "Who, Where, Why, When";
+      return  $section;
     }
     </pre>';
 
   return $output;
 }
+
+/**
+ * Theme a syndication section.
+ */
+function theme_syndication_section ($title, $content) {
+  return theme('box', $title, $content);
+}
+
+/**
+ * Theme a syndication item.
+ */
+function theme_syndication_item ($path, $item) {
+  return theme('feed_icon', $path) . ' ' . $item;
+}
+
+/**
+ * Theme a list of syndication items.
+ */
+function theme_syndication_item_list ($items, $title) {
+  return theme('item_list', $items, $title);
+}
+
