You are here

function footnotes_filter_tips in Footnotes 5

Same name and namespace in other branches
  1. 5.2 footnotes.module \footnotes_filter_tips()
  2. 6.2 footnotes.module \footnotes_filter_tips()
  3. 6 footnotes.module \footnotes_filter_tips()

Implementation of hook_filter_tips().

This hook allows filters to provide help text to users during the content editing process. Short tips are provided on the content editing screen, while long tips are provided on a separate linked page. Short tips are optional, but long tips are highly recommended.

File

./footnotes.module, line 38
The Footnotes module is a filter that can be used to insert automatically numbered footnotes into Drupal texts.

Code

function footnotes_filter_tips($delta, $format, $long = FALSE) {
  switch ($delta) {
    case 0:
      if ($long) {
        return t('You can insert footnotes directly into texts with <code>&lt;fn&gt;This text becomes a footnote.&lt;/fn&gt;</code>. This will be replaced with a running number (the footnote reference) and the text within the &lt;fn&gt; tags will be moved to the bottom of the page (the footnote).');
      }
      else {
        return t('Use &lt;fn&gt;...&lt;/fn&gt; to insert automatically numbered footnotes.');
      }
      break;
    case 1:
      if ($long) {
        return t('You can insert footnotes directly into texts with [# ...]. This will be replaced with a running number (the footnote reference) and the text within the [# ...] tags will be moved to the bottom of the page (the footnote). <em>This filter outputs footnotes in Textile format. You should use it together and before the Textile filter.</em>');
      }
      else {
        return t('Use [# ...] to insert automatically numbered footnotes. Textile variant.');
      }
      break;
  }
}