' . t('Table of Contents') . "\n" . '' . t('About') . ' | ' . t('Creating a Formatter') . ' | ' . t('Testing a Formatter') . ' | ' . t('Using a Formatter') . ' | ' . t('CustomFormatters.com') . "\n" . "

 

\n" . '

' . t('About') . "

\n" . "

\n" . ' ' . t('The Custom Formatters module is a utility to simplify the creation of Field Formatters, which can be used to theme the output of a Field via the Field UI, Views, Display Suite, Wysiwyg Fields and many other modules.') . "\n" . "

\n" . "

\n" . ' ' . t('Field Formatters created within the Custom Formatters interface can be used as is or exported as either a standard Drupal API Field Formatter or as a Custom Formatters CTools Exportable.') . "

\n" . "

 

\n" . '

' . t('Creating a Formatter') . "

\n" . "

\n" . ' ' . t('Formatters can be created via the Formatters interface (!cfui) by clicking the !add button.', array('!cfui' => l(t('Administration » Structure » Formatters'), 'admin/structure/formatters', array('html' => TRUE)), '!add' => l(t('Add'), 'admin/structure/formatters/add'))) . "
\n" . "

\n" . "

\n" . ' ' . t('The Formatter add/edit form may vary based on the Format you choose, but in general all Formatters should consist of the following:') . "\n" . "

\n" . "
\n" . '
' . t('Formatter name / Machine name') . "
\n" . '
' . t('The Formatter name and the Machine name, in general generated via the same field, are the Human readable name and the unique identifier for the Formatter.') . "
\n" . '
' . t('Description') . "
\n" . '
' . t('Used purely for administration purposes, displays as a tooltip on the Formatters UI and in the Formatter add/edit form only.') . "
\n" . '
' . t('Format') . "
\n" . "
\n" . ' ' . t('The format that the Formatter is to be created in, may change the Formatters add/edit form.') . "
\n" . ' ' . t('Two format engines are supplied out of the box, PHP and HTML + Tokens.') . "\n" . "
\n" . '
' . t('Field type(s)') . "
\n" . "
\n" . ' ' . t('Which field type(s) the Formatter will apply to (file, image, text, etc).') . "
\n" . ' ' . t('The value of this field should be the machine name of the field type, not the name of a field you have created on a Content type, available values will be auto-completed as you type.') . "\n" . "
\n" . '
' . t('Formatter') . "
\n" . "
\n" . ' ' . t('The actual value of the Formatter, style depending on the chosen Format:') . "

\n"; $items = array(); $engines = module_invoke_all('custom_formatters_engine_info'); foreach ($engines as $engine) { if (isset($engine['file']) && file_exists($engine['file'])) { require_once $engine['file']; } if (isset($engine['callbacks']['help']) && function_exists($engine['callbacks']['help'])) { $items[] = ' ' . $engine['label'] . "
\n" . ' ' . $engine['callbacks']['help']() . "

\n"; } } if (count($items) > 0) { $output .= theme('item_list', array('items' => $items)); } $output .= "
\n" . '
' . t('Formatter Settings') . "
\n" . "
\n" . "

\n" . ' ' . t('As of Custom Formatters 7.x-2.1, the PHP format now supports Formatter Settings, which allow you PHP formatters to be configured on each instance of use (Display settings per content type, etc).') . "\n" . "

\n" . "

\n" . ' ' . t('To enable the Formatter Settings functionality uou need to download and enable the Form Builder module, once enabled, you will be able to drag and drop fields to create your settings form, and then access the settings inside of your Formatter.') . "\n" . "

\n" . "

\n" . ' ' . t('The Example: Image (PHP) Formatter demonstrates how Formatter Settings can be used.', array('!url' => url('admin/structure/formatters/list/example_php_image/edit'))) . "\n" . "

\n" . "
\n" . "
\n" . "

 

\n" . '

' . t('Testing a Formatter') . "

\n" . "

\n" . ' ' . t('The Formatter add/edit form includes a Preview tool allowing quick testing of the Formatter on live content.') . "\n" . "

\n" . "

\n" . ' ' . t('To do so all you need to do is expand the Preview fieldset and select a populated Entity type (Node, Comment, etc), Bundle (Article, Basic page, etc) and Field (Image, Tags, etc) combination, select the desired Entity for testing and hit the Preview button.') . "\n" . "

\n" . "

\n" . ' ' . t('Enabling the Devel and Devel Generate module (packaged with the Devel module) adds additional debugging information into your Formatter preview.') . "\n" . "

\n" . "

 

\n" . '

' . t('Using a Formatter') . "

\n" . "

\n" . ' ' . t('Formatters can be used on a variety of different modules, including, but not limited to, Drupal Core Field UI, Views, Display Suite and Insert modules.') . "\n" . "

\n" . "

\n" . ' ' . t('Instructions on how to apply Formatters to Fields varies from module to module, but in general there will be a Format or Formatter field with the Field configuton within said module.') . "\n" . "

\n" . "

 

\n" . '

' . t('CustomFormatters.com') . "

\n" . "

\n" . ' ' . t('CustomFormatters.com is a Custom Formatters repository, containing a every growing list of reusable Custom Formatters available as raw code snippets, exportables and as Drupal API field formatters, it\'s a useful resouce to see examples of how to create Formatters.') . "\n" . "

\n" . "

 

\n" . "

 

\n"; return $output; } }