function _syntaxhighlighter_filter_tips in Syntax Highlighter 7
Same name and namespace in other branches
- 8 syntaxhighlighter.module \_syntaxhighlighter_filter_tips()
- 7.2 syntaxhighlighter.module \_syntaxhighlighter_filter_tips()
1 call to _syntaxhighlighter_filter_tips()
1 string reference to '_syntaxhighlighter_filter_tips'
- syntaxhighlighter_filter_info in ./
syntaxhighlighter.module - Implements hook_filter_info()
File
- ./
syntaxhighlighter.module, line 171 - Syntax highlight code using the Syntaxhighlighter javascript library. See http://alexgorbatchev.com/wiki/SyntaxHighlighter
Code
function _syntaxhighlighter_filter_tips($filter, $format, $long = FALSE) {
if ($long) {
$tip[] = '<p>' . t('Syntax highlight code surrounded by the <code>!ex0</code> tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".', array(
'!ex0' => '{syntaxhighlighter SPEC}...{/syntaxhighlighter}',
)) . '</p>';
$tip[] = '<p>' . t('Example: <code>!ex1</code>', array(
'!ex1' => '{syntaxhighlighter brush:php;collapse:true;first-line:50;highlight:[57,81,101];class-name:\'some_class some_other_class\'}...{/syntaxhighlighter}',
)) . '</p>';
$tip[] = '<p>' . t('This will syntax highlight PHP code, initially collapsed, start line number at 50, highlight lines 57, 81 and 101 and tag highlighted code with class names some_class and some_other_class.');
$tip[] = '<p>' . t('See <a href="!url0">the Syntaxhighlighter javascript library site</a> for additional helps.', array(
'!url0' => 'http://alexgorbatchev.com/',
)) . '</p>';
$tip = implode("\n", $tip);
}
else {
$tip = t('Syntax highlight code surrounded by the <code>!ex0</code> tags, where SPEC is a Syntaxhighlighter options string or class="OPTIONS" [title="the title"].', array(
'!ex0' => '{syntaxhighlighter SPEC}...{/syntaxhighlighter}',
));
}
return $tip;
}