diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 11:45:38 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-15 11:45:38 +0000 |
commit | d85570c9946aef61d8d935d9f50169215338d665 (patch) | |
tree | 80ff5e94178d9aa09bebfc6b897251078836cdd5 /h-source/Application/Include | |
parent | 8c287999487883a54271ae5e91bbb79b4fd15826 (diff) |
improved wiki
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r-- | h-source/Application/Include/languages.php | 7 | ||||
-rw-r--r-- | h-source/Application/Include/myFunctions.php | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 4bfb7fe..692c214 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -192,7 +192,12 @@ class Lang "Make this revision the current revision of the page" => "Rendi questa revisione la revisione corrente della pagina", "This wiki page has been hidden" => "Questa pagina della wiki è stata nascosta", "Talk" => "Discussione", - "Talk page of the wiki page" => "Pagina di discussione della pagina della wiki" + "Talk page of the wiki page" => "Pagina di discussione della pagina della wiki", + "a page with the same title already exists" => "esiste già una pagina con questo titolo", + "title is too length" => "il titolo è troppo lungo", + "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?", ), 'es' => array ( diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index d494eb6..8299157 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('/(\[\[)(.*?)(\]\])/', 'linkToInternalPage' ,$string); + $string = preg_replace_callback('/(\[a\])(.*?)(\[\/a\])/', 'linkTo',$string); $string = preg_replace_callback('/(\[a\])(.*?)\|(.*?)(\[\/a\])/', 'linkToWithText',$string); @@ -269,6 +271,11 @@ function linkTo($match) } } +function linkToInternalPage($match) +{ + return "<a title = '".$match[2]."' href='http://".DOMAIN_NAME."/wiki/page/".Lang::$current."/".encodeUrl($match[2])."'>".$match[2]."</a>"; +} + function linkToWithText($match) { if (checkUrl($match[2])) |