Content added Content deleted
imported>DrOwl (→Source) |
imported>DrOwl No edit summary |
||
Line 1: | Line 1: | ||
Integrate [[ |
Integrate [[figlet]] text into wiki pages using [http://figletlink/ figletlink] in a custom [[Mediawiki]] extension: |
||
(For example to [http://is-root.de/wiki/index.php/RecentChangesOfOurNeighbors interwiki syndicate RecentChanges pages].) |
|||
[[User:mutante|mutante]] 20:57, 25 Mar 2005 (UTC) |
|||
=== Syntax === |
=== Syntax === |
||
<nowiki>< |
<nowiki><figlet>text</figlet></nowiki> |
||
==== Example ==== |
==== Example ==== |
||
<nowiki>< |
<nowiki><figlet>moo</figlet></nowiki> |
||
=== Result === |
=== example Result === |
||
<pre> |
|||
<rss>http://slashdot.org/slashdot.rss</rss> |
|||
| '_ ` _ \ / _ \ / _ \ |
|||
| | | | | | (_) | (_) | |
|||
|_| |_| |_|\___/ \___/ |
|||
</pre> |
|||
(not installed on anything this is only beta i dont have figlet installed on this server) |
|||
(not installed on wikipedia, but [http://is-root.de/wiki/index.php/MediawikiExtensions/RSS here]) |
|||
=== Source === |
=== Source === |
||
Line 52: | Line 51: | ||
?> |
?> |
||
</pre> |
</pre> |
||
=== Improved Version by [[User:Duesentrieb|Duesentrieb]] === |
|||
: Also have a look at [[User:Duesentrieb/RSS]] for a modified version with a few more features -- [[User:Duesentrieb|Duesentrieb]] 01:29, 2 May 2005 (UTC) |
|||
This includes converting different charsets using iconv and an option to hide the description (shortened list). Thanks for your help , [[User:Duesentrieb|Duesentrieb]], I didnt feel like messing with the charset conversion especially. [[User:mutante|mutante]] 22:31, 5 May 2005 (UTC) |
|||
Revision as of 00:48, 21 May 2005
Integrate figlet text into wiki pages using figletlink in a custom Mediawiki extension:
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[] = "wffigltExtension"; function wffigletExtension() { global $wgParser; $wgParser->setHook( "rss", "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;
}
?>