Index: liquid_filters.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/liquid/liquid_filters.module,v
retrieving revision 1.3
diff -u -p -r1.3 liquid_filters.module
--- liquid_filters.module	8 Feb 2007 21:02:10 -0000	1.3
+++ liquid_filters.module	16 Mar 2007 10:45:48 -0000
@@ -61,4 +61,65 @@ function liquid_filters_filter($op, $del
   }
 }
 
-?>
\ No newline at end of file
+function liquid_filters_filter_tips($delta, $format, $long = false) {
+  $output = '<p>'.t('This site allows wiki content. The wiki format is called "MediaWiki" and you can get more info about it on <a href="http://wikipedia.org/cheatsheet">Wikipedia.org</a>.').'</p>';
+  $supported_tags = 'italics bold bold-italics heading-1 heading-2 heading-3 links rule bullet-list numbered-list table ';
+  $output = '<p>'.t('Supported formatting is:').t($supported_tags).'</p>';
+
+  if ($long) {
+    $output .= t('<p>This table is from the wikipedia cheat-sheet:</p>');
+
+    $tips = array(
+      'italics' => array( '<em>'. t('Italics') .'</em>', t("''Italics''") ),
+      'bold' => array( '<strong>'. t('Bold'). '</strong>', t("'''Bold'''")),
+      'bold-italics' => array( '<strong><em>'. t('Bold Italics'). '</em></strong>', t("'''''Bold Italics'''''")),
+      'heading-1' => array( '<h1 style="white-space:nowrap">'. t('Heading 1') .'</h1>', t('==Heading 1==')),
+      'heading-2' => array( '<h2>'. t('Heading 2') .'</h2>', t('===Heading 2===')),
+      'heading-3' => array( '<h3>'. t('Heading 3') .'</h3>', t('====Heading 3====')),
+      'links' => array( '<a href="http://example.com/page">'. t('Link with text') .'</a>', t('[http://example.com/page Link with text]')),
+      'rule' => array( '<hr />', '----'),
+      'bullet-list' => array( '<ul><li>'.t('one').'</li><li>'.t('two').'<ul><li>'.t('two-one').'</li><li>'.t('two-two').'</li></ul></li><li>'.t('three').'</li></ul>', "
+      * one
+      * two
+      ** two-one
+      ** two-two
+      * three"),
+      'numbered-list' => array( '<ol><li>'.t('one').'</li><li>'.t('two').'<ol><li>'.t('two-one').'</li><li>'.t('two-two').'</li></ol></li><li>'.t('three').'</li></ol>', "
+      # one
+      # two
+      ## two-one
+      ## two-two
+      # three"),
+      // Assumes and describes tr, td, th.
+      'table' => array( '<table border="1" align="center"><tr bgcolor="silver"><th>'. t('Header 1') .'</th><th>'.t('Header 2').'</th></tr><tr><td>'.t('Cell').'</td><td>'.t('Cell').'</tr><tr><td>'.t("Cell").'</td><td>'.t('Cell').'</td></tr></table>', "
+      {| border=1 align=center
+        |- bgcolor=silver
+          !Header 1 || Header 2
+        |-
+          | Cell    || Cell 
+        |-
+          | Cell    || Cell 
+      |}"),
+    );
+    $header = array(t('You Want'), t('You Type'));
+    preg_match_all('/([a-z0-9-]+)[^a-z0-9-]/i', $supported_tags, $out);
+    foreach ($out[1] as $tag) {
+      if (array_key_exists($tag, $tips)) {
+        if ($tips[$tag]) {
+          $rows[] = array(
+            array('data' => $tips[$tag][0], 'class' => 'get'),
+            array('data' => '<pre>'. check_plain($tips[$tag][1]) .'</pre>', 'class' => 'type'),
+          );
+        }
+      }
+      else {
+        $rows[] = array(
+          array('data' => t('No help provided for tag %tag.', array('%tag' => $tag)), 'class' => 'description', 'colspan' => 3),
+        );
+      }
+    }
+    $output .= theme('table', $header, $rows);
+  }
+  return($output);
+} 
+?>
