Index: zipcode.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/zipcode/zipcode.module,v
retrieving revision 1.7
diff -u -p -r1.7 zipcode.module
--- zipcode.module	26 Dec 2006 11:48:55 -0000	1.7
+++ zipcode.module	24 Jan 2007 05:51:48 -0000
@@ -71,21 +71,39 @@ function zipcode_field($op, &$node, $fie
   switch ($op) {
     case 'view':
       foreach ($node_field as $delta => $item) {
-        $node_field[$delta]['view'] = zipcode_field_view_item($field, $item);
+        $node_field[$delta]['view'] = content_format($field, $item, 'default', $node);
       }
       return theme('field', $node, $field, $node_field, $teaser, $page); 
   }
 }
 
 /**
- * Implementation of hook_field_view_item().
- *
- */
-function zipcode_field_view_item($field, $node_field_item) {
-    $zipcode =  check_plain($node_field_item['value']);
-    return $zipcode;
+  *Implementation of hook_field_formatter_info
+  */
+function zipcode_field_formatter_info() {
+  return array(
+    'default' => array(
+      'label' => 'Default',
+      'field types' => array('fr_zipcode', 'ca_zipcode', 'us_zipcode', 'nl_zipcode',),
+    ),
+  );
 }
 
+/**
+  *Implementation of hook_field_formatter
+  */
+function zipcode_field_formatter($field, $item, $formatter, $node) {
+  if (!isset($item['value'])) {
+    return '';
+  }
+  if ($field['text_processing']) {
+    $text = check_markup($item['value'], $item['format'], is_null($node) || isset($node->in_preview));
+  }
+  else {
+    $text = check_plain($item['value']);
+  }
+    return $text;
+}
 
 /**
  * Implementation of hook_widget_info().
