You are here

function freelinking_filter_tips in Freelinking 6

Same name and namespace in other branches
  1. 5 freelinking.module \freelinking_filter_tips()
  2. 6.3 freelinking.module \freelinking_filter_tips()
  3. 6.2 freelinking.module \freelinking_filter_tips()

File

./freelinking.module, line 324

Code

function freelinking_filter_tips($delta, $format, $long = FALSE) {
  if ($long) {
    $output = t('Content in [[double square brackets]] will be linked to existing content with that title, or a page to create that content. ');
    $output .= t('Links can contain an optional bar, "|". Content on the left of the bar is the target; to the right, the link shown. ');
    $output .= t('Links to pages outside this site are allowed. They must start with one of the following: "http", "https", "ftp", or "mailto", and can exist either by themselves, or on the left of the bar. ');
    $output .= t('Examples: ');
    $ouptut .= '<ul>';
    $output .= '<li>' . t('[[simple link]] - will go to the content titled "simple link" or a page to create that content.') . '</li>';
    $output .= '<li>' . t('[[this is the target|this is the source]] - will present "this is the source" as a link to "this is the target", or a page to create that content.') . '</li>';
    $output .= '<li>' . t('[[http://www.example.com|this is the source]] - will present "this is the source" as a link to http://www.example.com.') . '</li>';
    $output .= '<li>' . t('[[http://www.example.com]] - will present "http://www.example.com" as a link to http://www.example.com.') . '</li>';
    $output .= '</ul>';
    if (variable_get('freelinking_camelcase', TRUE)) {
      $output .= t('Content consisting of two or more capitalized words run together (aka "CamelCase") will be linked to existing content with that title, or a page to create that content.');
    }
  }
  else {

    // short tips displayed in-line
    $output = t('Link to content with [[some text]], where "some text" is the title of existing content or the title of a new piece of content to create. You can also link text to a different title by using [[link to this title|show this text]]. ');
    $output .= t('Link to outside URLs with [[http://www.example.com|some text]], or even [[http://www.example.com]]. ');
    if (variable_get('freelinking_camelcase', TRUE)) {
      $output .= t('Link to existing or new content with CamelCaseWords.');
    }
  }
  return $output;
}