? styleguide-gci-task-2.patch
Index: styleguide.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/styleguide/styleguide.module,v
retrieving revision 1.14
diff -u -p -r1.14 styleguide.module
--- styleguide.module	16 Dec 2010 18:33:27 -0000	1.14
+++ styleguide.module	18 Dec 2010 04:31:57 -0000
@@ -576,3 +576,27 @@ function styleguide_pager($size = 8, $to
   $pager_total[-99] = $total;
   return theme('pager', array('element' => -99));
 }
+
+function styleguide_forum_list() {
+  module_load_include('inc', 'forum', 'forum.pages');
+  $root = forum_forum_load(0);
+  if(count($root->forums)==0) {
+  	return t('Please create a forum first.');
+  }
+  return forum_page($root);
+}
+
+function styleguide_forum_topic_list() {
+  module_load_include('inc', 'forum', 'forum.pages');
+  $root = forum_forum_load(0);
+  if(count($root->forums)==0) {
+  	return t('Please create a forum first.');
+  }
+  $forum = forum_forum_load(array_rand($root->forums,1));
+  return forum_page($forum);
+}
+
+function styleguide_forum_form() {
+  module_load_include('inc', 'forum', 'forum.admin');
+  return forum_form_main('forum');
+}
Index: styleguide.styleguide.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/styleguide/styleguide.styleguide.inc,v
retrieving revision 1.9
diff -u -p -r1.9 styleguide.styleguide.inc
--- styleguide.styleguide.inc	16 Dec 2010 18:33:27 -0000	1.9
+++ styleguide.styleguide.inc	18 Dec 2010 04:31:57 -0000
@@ -174,6 +174,11 @@ function styleguide_styleguide() {
     'content' => theme('maintenance_page', array('content' => styleguide_paragraph(2))),
     'group' => t('System')
   );
+  $items['feed_icon'] = array(
+    'title' => t('Feed Icon'),
+    'content' => theme('feed_icon', array('url' => url('rss.xml'), 'title' => t('Syndicate'))),
+    'group' => t('System')
+  );
   $items['pager'] = array(
     'title' => t('Pager'),
     'content' => styleguide_pager(),
@@ -185,5 +190,35 @@ function styleguide_styleguide() {
     'group' => t('User interface')
   );
 
+  if(module_exists('forum')) {
+    $items['forum_list'] = array(
+      'title' => t('Forum list'),
+      'content' => styleguide_forum_list(),
+      'group' => t('Forum')
+    );
+    $items['forum_topic_list'] = array(
+      'title' => t('Forum topic list'),
+      'content' => styleguide_forum_topic_list(),
+      'group' => t('Forum')
+    );
+    $items['forum_form'] = array(
+      'title' => t('Forum form'),
+      'content' => styleguide_forum_form(),
+      'group' => t('Forum')
+    );
+  };
+
+ if(module_exists('image')) {
+    if(file_destination('public://styleguide-preview.jpg', FILE_EXISTS_ERROR)!==false) {
+      file_unmanaged_copy(styleguide_image('vertical'), 'public://styleguide-preview.jpg', FILE_EXISTS_ERROR);
+ 	}
+ 	foreach(image_style_options(false) as $stylename=>$style) {
+      $items['image_'.$stylename] = array(
+        'title' => t('Image style, @stylename', array('@stylename' => $stylename)),
+        'content' => theme('image_style', array('path' => 'public://styleguide-preview.jpg', 'style_name' => $stylename)),
+        'group' => t('Media')
+      );
+    }
+  };
   return $items;
 }
