2007-12-31: Minor release with feature enhancements. More...
2007-09-08: Small bug fix release. More...
2007-06-29: Some bug fixes and one small feature enhancement. More...
Plugin name: | Tag/IncludeFile (Tag/Default) |
---|---|
Author: | Thomas Leitner <t_leitner@gmx.at> |
Summary: | Includes a file verbatim |
Parameters: | escapeHTML: true filename (=default mandatory parameter): nil highlight: nil processOutput: true |
Handled tags: | includeFile |
The include file tag is used to include the content of a file. The content can be highlighted via Misc/SyntaxHighlighter by specifying an available language for the parameter highlight.
Usage | Output | ||||
---|---|---|---|---|---|
{includeFile: {filename: includefile.page, processOutput: false}} | --- title: IncludeFile inMenu: true template: /plugin.template plugin: Tag/IncludeFile --- h2(#description). Description The include file tag is used to include the content of a file. The content can be highlighted via {plugin: Misc/SyntaxHighlighter} by specifying an available language for the parameter {param: Tag/IncludeFile:highlight}. h2(#examples). Examples <table class="examples"> <tr> <th>Usage</th><th>Output</th> </tr> <tr> <td>\{includeFile: {filename: includefile.page, processOutput: false}}</td> <td><pre>{includeFile: {filename: includefile.page, processOutput: false}}</pre></td> </tr> <tr> <td>\{includeFile: {filename: ../../../../plugin/emoticon.rb, escapeHTML: false, processOutput: false, highlight: ruby}}</td> <td>{includeFile: {filename: ../../../../plugin/emoticon.rb, escapeHTML: false, processOutput: false, highlight: ruby}}</td> </tr> </table> |
||||
{includeFile: {filename: ../../../../plugin/emoticon.rb, escapeHTML: false, processOutput: false, highlight: ruby}} | class ShowEmoticonsTag < Tags::DefaultTag
infos( :name => 'WebgenDocu/EmoticonTag',
:summary => "Creates a table of the existing emoticon packs"
)
register_tag 'showEmoticonPacks'
def process_tag( tag, chain )
res = @plugin_manager['Core/ResourceManager'].resources
packs = Dir[File.join( Webgen.data_dir, 'resources', 'emoticons', '*/')].collect {|p| File.basename( p )}.sort
map = @plugin_manager['Misc/SmileyReplacer'].class::SMILEY_MAP
output = '
|