#||
||
Current version:
Credits:
|{{toc numerate=1}} ||
||#
##~{{newinterwiki}}##

**~/actions/newinterwiki.php**

%%(php)
<?php
//This action allows you to rewrite your localmap.conf using a wikipage

// For this action to work propperly you have to create (a link from page InterWiki to) a page
// called sth. like NewInterWiki. Copy the old interwiki.conf / localmap.conf to this page once. Do not forget to
// set rights for this page (acl) to Read/Write/Comment = Admin.

//select content between "~<[". Instead of "~]>" every other expression would do


$in=$this->page['body'];
    preg_match_all("/<\[(.*)\]>/s", $in, $treffer);
       
// in order to control output from $treffer: var_dump($treffer); exit;

$body = $treffer[1][0];

//overwrites old file: localmap.conf
$fp = fopen("localmap.conf", 'w+');
      fputs($fp, $body);
      fclose($fp);

?>%%

====Documentation==
For this action to work propperly you have to create (a link from page /InterWiki to) a page called sth. like /NewInterWiki. Copy the old nterwiki.conf / localmap.conf to this page. Do not forget to set rights for this page (acl) to ~Read/Write/Comment = Admin.


====How to==
=====Localization (optional)==
put this at the end of your language file

**/lang/wakka.xyz.php**
%%
//hacks
"YourPhrase" => "your translation here",
%%

pls. notice that this entry will not survive an Wacko upgrade, so you have to redo this

**[xyz] proposed translations**
[de] ...
[fr]
[ru]

====To Do==
  *


----
original is located at: ((/Dev/PatchesHacks/NewInterWikiList))