diff options
author | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-18 00:17:07 +0000 |
---|---|---|
committer | Antonio Gallo <tonicucoz@gmail.com> | 2011-02-18 00:17:07 +0000 |
commit | 0f42e1a7816893e083f49c933d1393a102a3510e (patch) | |
tree | 70ec94d02d098e75453d5961d9b6a9c0b77be469 /h-source/Application/Include | |
parent | 265e0708d6eea9de98b36035fff1287a01221a00 (diff) |
improved wiki
Diffstat (limited to 'h-source/Application/Include')
-rw-r--r-- | h-source/Application/Include/languages.php | 2 | ||||
-rw-r--r-- | h-source/Application/Include/myFunctions.php | 34 |
2 files changed, 22 insertions, 14 deletions
diff --git a/h-source/Application/Include/languages.php b/h-source/Application/Include/languages.php index 5145029..4bfb40e 100644 --- a/h-source/Application/Include/languages.php +++ b/h-source/Application/Include/languages.php @@ -210,6 +210,8 @@ class Lang "list of deleted pages" => "lista delle pagine cancellate", "restore the wiki page" => "ripristina la pagina", "delete the wiki page" => "cancella la pagina", + "list of blocked pages" => "lista delle pagine bloccate", + "special pages" => "pagine speciali", ), 'es' => array ( diff --git a/h-source/Application/Include/myFunctions.php b/h-source/Application/Include/myFunctions.php index d731062..6b87958 100644 --- a/h-source/Application/Include/myFunctions.php +++ b/h-source/Application/Include/myFunctions.php @@ -23,28 +23,32 @@ if (!defined('EG')) die('Direct access not allowed!'); function encodeUrl($url) { $url = str_replace(' ','-',$url); + $url = str_replace('.','-',$url); $url = str_replace('[','-',$url); $url = str_replace(']','-',$url); $url = str_replace('(','-',$url); $url = str_replace(')','-',$url); $url = str_replace('/','-',$url); $url = str_replace('@','-at-',$url); + $url = str_replace('#','-at-',$url); + $url = str_replace('?','-at-',$url); - $temp = null; - for ($i=0;$i<strlen($url); $i++) - { - if (strcmp($url[$i],' ') === 0) - { - $temp .= '-'; - } - else - { - if (preg_match('/^[a-zA-Z0-9\-]$/',$url[$i])) $temp .= $url[$i]; - } - } +// $temp = null; +// for ($i=0;$i<strlen($url); $i++) +// { +// if (strcmp($url[$i],' ') === 0) +// { +// $temp .= '-'; +// } +// else +// { +// if (preg_match('/^[a-zA-Z0-9\-]$/',$url[$i])) $temp .= $url[$i]; +// } +// } - $temp = urlencode($temp); - return $temp; +// $url = urlencode($url); +// $url = urlencode($url); + return $url; } // function encodeUrl($url) @@ -232,6 +236,8 @@ function decodeWikiText($string) $string = preg_replace('/(\[h2\])(.*?)(\[\/h2\])/s', '<div class="div_h2">${2}</div>',$string); $string = preg_replace('/(\[h3\])(.*?)(\[\/h3\])/s', '<div class="div_h3">${2}</div>',$string); + + $string = preg_replace('/(\[lang\])(.*?)(\[\/lang\])/s', '<div class="div_lang">${2}</div>',$string); return $string; } |