<?php // Textallion syntax for pmwiki // // Get the lastest version from http://www.pmwiki.org/wiki/Cookbook/Textallion // or from the svn: http://txt2tags.googlecode.com/svn/trunk/extras/pmwiki/textallion.php // // Installation : // - Save this textallion.php in your /cookbook directory. // - Add the following line into your local/config.php script: // require_once ("cookbook/textallion.php"); // $RecipeInfo['textallion']['Version'] = '2011-12-24'; // textallion specifics: // PmWiki allows some advanced formatting not in txt2tags. We can extend it using the textallion syntax (see http://code.google.com/p/textallion/) Markup ('textallion_center' , 'directives', '/\{ ~~ \}(.*?)\{\/~~ \}/' , "%center% $1"); Markup ('textallion_rfloat' , '<directives', '/\{~~~~\}Attach:(.*?)/' , "%rfloat% Attach:$1"); Markup ('textallion_lfloat' , 'directives', '/(.*?)\{~~~~\}/' , "%lfloat% $1"); Markup ('textallion_linebreak' , '<directives', '/\{\/\/..\}/' , '<br/>'); # french dialogs Markup ('txt2tags_french_dialog' , 'directives', '/^--- (.*?)/', "— $1"); # french guillemets Markup ('txt2tags_french_guillemets_open01' , 'directives', '/\{ " \}/', "« "); Markup ('txt2tags_french_guillemets_open01' , 'directives', '/\{" \}/', "« "); Markup ('txt2tags_french_guillemets_open01' , 'directives', '/\{" \}/', "« "); Markup ('txt2tags_french_guillemets_close01' , 'directives', '/\{ " \}/', " »"); Markup ('txt2tags_french_guillemets_close01' , 'directives', '/\{ "\}/', " »"); Markup ('txt2tags_french_guillemets_close01' , 'directives', '/\{ "\}/', " »"); # # lettrine Markup ('txt2tags_lettrine' , 'directives','/\{\*~~~\}(.{1}?)/',"<span class=\"initial\">$1</span>"); # ignore 4 characters surrounded by {}, for example {****} Markup ('textallion_ignore_unknown_rule' , '>directives', '/\{(.{4})\}/' , ''); # ignore 3 characters surrounded by {}, for example {|1|} (columns) Markup ('textallion_ignore_unknown_rule2' , '>directives', '/\{(.{3})\}/' , ''); # ignore index mark Markup ('textallion_ignore_indexrule' , '>directives', '/\{\^\}/' , '');