Action: New InterWikiList
Current version: Credits: |
{{newinterwiki}}
/action/newinterwiki.php
<?php // This action allows you to rewrite your localmap.conf using a wikipage // For this action to work properly you have to create (a link from page InterWiki to) a page // called for instance NewInterWiki. Copy the old interwiki.conf / localmap.conf to this page once. Do not forget to // set rights for this page (permissions) to Read/Write/Comment = Admins. if ($this->is_admin()) { // select content between "~<[". Instead of "~]>" every other expression would do preg_match_all("/<\[(.*)\]>/s", $this->page['body'], $match); $body = $match[1][0]; // overwrites old file: localmap.conf $fp = fopen('localmap.conf', 'w+'); fputs($fp, $body); fclose($fp); }
Comment 8
see bugs:27
Comment 9
in order to show the localmap.conf you have to
2. replace "interwiki.conf" with "localmap.conf"
3. save as e.g. interwikilocal.php
4. open a wiki page and type {{interwikilocal}}