diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 17:06:09 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 17:06:09 +0000 |
commit | 4a27b517fc52dde60e5c1837860e4785317490a6 (patch) | |
tree | 73b91c5d212f1bb67eb83fea9694cf8d1a360846 /h-source/Application/Include | |
parent | d85570c9946aef61d8d935d9f50169215338d665 (diff) |
improved wiki
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r-- | h-source/Application/Include/languages.php | 13 | ||||
-rw-r--r-- | h-source/Application/Include/myFunctions.php | 7 |
2 files changed, 17 insertions, 3 deletions
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 692c214..0a8a728 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -175,8 +175,8 @@ class Lang "at" => "alle ore", "last modifications" => "ultime modifiche", "watch all modifications" => "guarda tutte le modifiche", - "title" => "titolo", - "text of the wiki page" => "testo della pagina", + "the title" => "il titolo", + "the text of the wiki page" => "il testo della pagina", "the wiki page has not been found" => "la pagina della wiki non è stata trovata", "Page not-found" => "Pagina non trovata", "Insert" => "Inserisci", @@ -198,6 +198,13 @@ class Lang "the page text is too length" => "il testo della pagina è troppo lungo", "History of the wiki page" => "History della pagina della wiki", "Would you like to insert it?" => "Vuoi inserirla?", + "Wiki modifications" => "Modifiche alla Wiki", + "List of the wiki modifications carried out by users" => "Lista delle modifiche apportate alla Wiki dagli utenti", + "list of pages" => "lista delle pagine", + "List of wiki pages" => "Lista delle pagine della wiki", + "This wiki page has been blocked" => "Questa pagina della wiki è stata bloccata", + "unblock the wiki page" => "sblocca la pagina", + "block the wiki page" => "blocca la pagina", ), 'es' => array ( @@ -499,7 +506,7 @@ class Go $urls = getUrlsFromIdHard($clean['idHard']); return $urls['urlView']; } - + } class MyStrings diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index 8299157..d2b54e7 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -195,6 +195,8 @@ function decodeWikiText($string) $string = preg_replace('/(\[hr\])/', '<hr />',$string); + $string = preg_replace_callback('/(\[\[)(.*?)\|(.*?)(\]\])/', 'linkToInternalPageWithText' ,$string); + $string = preg_replace_callback('/(\[\[)(.*?)(\]\])/', 'linkToInternalPage' ,$string); $string = preg_replace_callback('/(\[a\])(.*?)(\[\/a\])/', 'linkTo',$string); @@ -276,6 +278,11 @@ function linkToInternalPage($match) return "<a title = '".$match[2]."' href='http://".DOMAIN_NAME."/wiki/page/".Lang::$current."/".encodeUrl($match[2])."'>".$match[2]."</a>"; } +function linkToInternalPageWithText($match) +{ + return "<a title = '".$match[2]."' href='http://".DOMAIN_NAME."/wiki/page/".Lang::$current."/".encodeUrl($match[2])."'>".$match[3]."</a>"; +} + function linkToWithText($match) { if (checkUrl($match[2])) |