Creating extra field formatters in Drupal 7 is fairly simple, but it can take some poking around in the new Fields code. So here is some sample code to make it easier for you! You can add formats to your own fields -- or existing fields that are defined by other Drupal modules. This is the case for the following example - a formatter for a link field to display the URL as an absolute URL.
hook_field_formatter_info() to declare your field formatter to the fields API, and implement
hook_field_formatter_view() which tells Drupal what to do when viewing the...