Action: New InterWikiList

Current version:
Credits:

{{newinterwiki}}


/actions/newinterwiki.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);

?>

1.1. 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.


1.2. How to

1.2.1. 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]

1.3. To Do

Read comments (2 comments)