You are here

function filetree_filter_tips in File Tree 6

Same name and namespace in other branches
  1. 6.2 filetree.module \filetree_filter_tips()

Implementation of hook_filter_tips().

File

./filetree.module, line 69

Code

function filetree_filter_tips($delta, $format, $long = FALSE) {
  $output = t('You may use [filetree dir="some-directory"] to display a list of files inline.');
  if ($long) {
    $output = '<p>' . $output . '</p>';
    $output .= '<p>' . t('Additional options include "multi", "controls", "absolute", "exclude", "dirname", "dirtitle", "filename", and "filetitle". For example:') . '</p>';
    $output .= '<blockquote>[filetree dir="some-directory" multi="false" controls="false" absolute="false" exclude="CVS; directory1; directory2" dirname="%basename" dirtitle="Click to toggle this folder." filename="%basename" filetitle="Click to download this %extension file."]</blockquote>';
    $output .= '<p>' . t('Available tokens for use within the "dirname", "dirtitle", "filename", and "filetitle" options include:') . '</p>';
    $output .= theme('item_list', array(
      '%filename: ' . t("The file's name and extension."),
      '%basename: ' . t("The file's name, without extension."),
      '%extension: ' . t("The file's extension."),
    ));
    $output .= '<p>' . t('You can also read a <a href="http://drupal.org/project/filetree">detailed explanation of these options</a>.') . '</p>';
  }
  return $output;
}