You are here

function tableofcontents_filter_tips in Table of Contents 6.2

Same name and namespace in other branches
  1. 5.2 tableofcontents.module \tableofcontents_filter_tips()
  2. 5 tableofcontents.module \tableofcontents_filter_tips()
  3. 6.3 tableofcontents.module \tableofcontents_filter_tips()

Implementation of hook_filter_tips().

File

./tableofcontents.module, line 49
This is a filter module to generate a collapsible jquery enabled mediawiki style table of contents based on <h[1-6]> tags. Transforms header tags into named anchors.

Code

function tableofcontents_filter_tips($delta, $format, $long = FALSE) {
  $override = variable_get('tableofcontents_allow_override_' . $format, TRUE);
  if ($long) {
    if ($override) {
      return t('Every instance of "&lt;!--tableofcontents--&gt;" in the input text will be replaced with a collapsible mediawiki-style table of contents. Accepts options for title, list style, minimum heading level, and maximum heading level, and attachments as follows: &lt;!--tableofcontents list: ol; title: Table of Contents; minlevel: 2; maxlevel: 3; attachments: yes;--&gt;. All arguments are optional.');
    }
    else {
      return t('Every instance of "&lt;!--tableofcontents--&gt;" in the input text will be replaced with a collapsible mediawiki-style table of contents.');
    }
  }
  else {
    if ($override) {
      return t('Insert &lt;!--tableofcontents [list: ol; title: Table of Contents; minlevel: 2; maxlevel: 3; attachments: yes;]--&gt; to insert a mediawiki style collapsible table of contents. Arguments within [] are optional.');
    }
    else {
      return t('Insert &lt;!--tableofcontents--&gt; to insert a mediawiki style collapsible table of contents.');
    }
  }
}