Index: markdown.info
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/markdown/Attic/markdown.info,v
retrieving revision 1.1.2.1
diff -u -p -r1.1.2.1 markdown.info
--- markdown.info	2 Jun 2008 12:56:24 -0000	1.1.2.1
+++ markdown.info	25 Feb 2010 13:51:02 -0000
@@ -1,5 +1,6 @@
 name = Markdown filter
 description = Allows content to be submitted using Markdown, a simple plain-text syntax that is transformed into valid XHTML.
 package = "Input filters"
-dependencies[] = filter
-core = 6.x
+core = 7.x
+files[] = markdown.module
+
Index: markdown.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/markdown/Attic/markdown.module,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 markdown.module
--- markdown.module	2 Jun 2008 15:46:45 -0000	1.1.2.3
+++ markdown.module	25 Feb 2010 13:51:03 -0000
@@ -11,48 +11,18 @@ function markdown_help($path = 'admin/he
   }
 }
 
-/**
- * Implementation of hook_filter().
- */
-function markdown_filter($op, $delta = 0, $format = -1, $text = '') {
-  switch ($op) {
-    case 'list':
-      return array(t('Markdown'));
-    case 'description':
-      return t('Allows content to be submitted using Markdown, a simple plain-text syntax that is filtered into valid XHTML.');
-    case 'settings':
-      return _markdown_settings($format);
-    case 'process':
-      return _markdown_process($text, $format);
-    default:
-      return $text;
-  }
-}
-
-/**
- * Implementation of hook_block().
- *
- * Provides help for markdown syntax.
- */
-function markdown_block($op = 'list', $delta = 0, $edit = array()) {
-  switch($op) {
-    case 'list':
-      return array('help' => array('info' => t('Markdown filter tips')));
-    case 'view':
-      switch($delta) {
-        case 'help':
-          return array(
-            'subject' => t('Markdown filter tips'),
-            'content' => _markdown_help_block()
-          );
-      }
-  }
+function markdown_filter_info() {
+  $filters['filter_markdown'] = array(
+    'title' => t('Markdown'),
+    'description' => t('Allows content to be submitted using Markdown, a simple plain-text syntax that is filtered into valid XHTML.'),
+    'process callback' => '_filter_markdown',
+    'settings callback' => '_filter_markdown_settings',
+    'tips callback'  => '_filter_markdown_tips'
+  );
+  return $filters;
 }
 
-/**
- * Implementation of hook_filter_tips().
- */
-function markdown_filter_tips($delta = 0, $format = -1, $long) {
+function _filter_markdown_tips($format, $long = FALSE) {
   if ($long) {
     return t('Quick Tips:<ul>
       <li>Two or more spaces at a line\'s end = Line break</li>
@@ -67,6 +37,31 @@ function markdown_filter_tips($delta = 0
   }
 }
 
+/**
+* Implements hook_block_view().
+*/
+function markdown_block_view($delta = '') {
+  $block = array();
+  switch ($delta) {
+    case 'markdown_help':
+      $block['title'] = t('Markdown filter tips');
+      $block['content'] = _markdown_help_block();
+      break;
+  }
+  return $block;
+}
+
+/**
+* Implements hook_block_info().
+*/
+function markdown_block_info() {
+  $blocks = array();
+  $blocks['markdown_help'] = array(
+    'info' => t('Markdown filter tips'),
+  );
+  return $blocks;
+}
+
 // == Internal functions =======================================================
 
 /**
@@ -104,7 +99,7 @@ And now some code:
 /**
  * Filter process callback.
  */
-function _markdown_process($text, $format) {
+function _filter_markdown($text, $format) {
   if (!empty($text)) {
     include_once drupal_get_path('module', 'markdown') .'/markdown.php';
     $text = Markdown($text);
@@ -115,9 +110,9 @@ function _markdown_process($text, $forma
 /**
  * Filter settings callback. Just provides a version overview.
  */
-function _markdown_settings($format) {
+function _filter_markdown_settings($form, &$form_state, $filter, $format, $defaults) {
   include_once drupal_get_path('module', 'markdown') .'/markdown.php';
-  $form['markdown_wrapper'] = array(
+  $settings['markdown_wrapper'] = array(
     '#type' => 'fieldset',
     '#title' => t('Markdown'),
   );
@@ -125,10 +120,10 @@ function _markdown_settings($format) {
     'Markdown PHP Version: <a href="http://www.michelf.com/projects/php-markdown/">'. MARKDOWN_VERSION .'</a>',
     'Markdown Extra Version: <a href="http://www.michelf.com/projects/php-markdown/">'. MARKDOWNEXTRA_VERSION .'</a>',
   );
-  $form['markdown_wrapper']['markdown_status'] = array(
+  $settings['markdown_wrapper']['markdown_status'] = array(
     '#title' => t('Versions'),
     '#type' => 'item',
-    '#value' => theme('item_list', $links),
+    '#markup' => theme('item_list', array('items' => $links)),
   );
-  return $form;
+  return $settings;
 }
