Copy of http://www.kyuran.be/wiki/index.php?page=TaviPatches%2FWikiLogo

Macro WikiLogo allow you to change the top right logo of a Wiki page.

Look [1] for preview

To implement the WikiLogo macro for 'Tavi, you need to do the following:

  1. Create the file wikilogo.php and place it on your web server. Contents listed below.
  2. Edit the file parse/transforms.php to require('some location/wikilogo.php') at the beginning of the file.
  3. Edit the file config.php; add a line to the $ViewMacroEngine array that looks like: "$ViewMacroEngine['WikiLogo'] = 'view_wiki_logo';".

It's done :)


wikilogo.php

<?


function view_wiki_logo($text)
{
global $PHP_AUTH_USER, $PHP_AUTH_PW, $WikiLogo;

if (substr($text,0,1) <> "/") {
    $WikiLogo = "http://" . $text;
    } else {
    $WikiLogo = $text;
    }

return "";
}

?>