aboutsummaryrefslogtreecommitdiff
path: root/h-source/Application/Include
diff options
context:
space:
mode:
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r--h-source/Application/Include/languages.php7
-rw-r--r--h-source/Application/Include/myFunctions.php7
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]))