From d85570c9946aef61d8d935d9f50169215338d665 Mon Sep 17 00:00:00 2001 From: Antonio Gallo Date: Tue, 15 Feb 2011 11:45:38 +0000 Subject: improved wiki --- h-source/Application/Include/languages.php | 7 ++++++- h-source/Application/Include/myFunctions.php | 7 +++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'h-source/Application/Include') 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\])/', '
',$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 "".$match[2].""; +} + function linkToWithText($match) { if (checkUrl($match[2])) -- cgit v1.2.3