Content added Content deleted
imported>DrOwl (→Source) |
imported>DrOwl No edit summary |
||
Line 1: | Line 1: | ||
Integrate [[figlet]] text into wiki pages using [http://figletlink/ figletlink] in a custom [[Mediawiki]] extension: |
Integrate [[figlet]] text into wiki pages using [http://figletlink/ figletlink] in a custom [[Mediawiki]] extension: |
||
this is a first untestedversion with justmonkey knolage of how to make it work |
|||
=== Syntax === |
=== Syntax === |
||
<nowiki><figlet>text</figlet></nowiki> |
<nowiki><figlet>text</figlet></nowiki> |
Revision as of 00:53, 21 May 2005
Integrate figlet text into wiki pages using figletlink in a custom Mediawiki extension:
this is a first untestedversion with justmonkey knolage of how to make it work
Syntax
<figlet>text</figlet>
Example
<figlet>moo</figlet>
example Result
| '_ ` _ \ / _ \ / _ \ | | | | | | (_) | (_) | |_| |_| |_|\___/ \___/
(not installed on anything this is only beta i dont have figlet installed on this server)
Source
<?php # Figlet Mediawiki extension # using shell figlet # by DrOwl 21.06.2005 #modded from # by mutante 25.03.2005 $wgExtensionFunctions[] = "renderFiglet"; function renderFiglet( $input ) { $input =~ /[Aa-Zz]|[1-0]; # $input = mysql_escape_string($input); $figlet = passthru('echo $input | /home/drowl/figlet/figlet -d /home/drowl/figlet/fonts'); $output="<pre>"; $output.="$figlet"; $output.="
";
return $output;
}
?>