×
Create a new article
Write your page title here:
We currently have 3,189 articles on s23. Type your article name above or create one of the articles listed here!



    s23
    3,189Articles
    Revision as of 00:43, 21 May 2005 by imported>DrOwl (→‎Source)

    Integrate RSS feeds into wiki pages using magpieRSS (a PHP RSS parser class) in a custom Mediawiki extension:

    (For example to interwiki syndicate RecentChanges pages.)

    mutante 20:57, 25 Mar 2005 (UTC)


    Syntax

    <rss>URL</rss>

    Example

    <rss>http://slashdot.org/slashdot.rss</rss>

    Result

    <rss>http://slashdot.org/slashdot.rss</rss>

    (not installed on wikipedia, but here)

    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;

    }

    ?>

    Improved Version by Duesentrieb

    Also have a look at User:Duesentrieb/RSS for a modified version with a few more features -- 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 , Duesentrieb, I didnt feel like messing with the charset conversion especially. mutante 22:31, 5 May 2005 (UTC)

    Cookies help us deliver our services. By using our services, you agree to our use of cookies.
    Cookies help us deliver our services. By using our services, you agree to our use of cookies.