lilalo

changeset 142:e939c147dcdd

Добавлен l3pre.php --- mediawiki extension, предназначенный для вставки на wiki фрагментов журнала
author igor@chub.in
date Tue Jul 22 00:16:20 2008 +0300 (2008-07-22)
parents c48bd05dca85
children 51a232faeb27
files l3pre.php
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/l3pre.php	Tue Jul 22 00:16:20 2008 +0300
     1.3 @@ -0,0 +1,15 @@
     1.4 +<?
     1.5 +$wgExtensionFunctions[] = "wfLiLaLoExtension";
     1.6 +
     1.7 +function wfLiLaLoExtension() {
     1.8 +    global $wgParser;
     1.9 +    $wgParser->setHook( "lilalo", "renderLiLaLoPRE" );
    1.10 +}
    1.11 +
    1.12 +function renderLiLaLoPRE( $input ) {
    1.13 +    $input = preg_replace('/[^\n]*l3: local_session_id[^\n]*[\n]/', '', $input);
    1.14 +    $input = preg_replace('/((..:..:...)(#[^\n]*))/', '$2<b><a href="http://xgu.ru/">$3</a></b>', $input);
    1.15 +    return "<pre>$input</pre>";
    1.16 +}
    1.17 +
    1.18 +?>