Advanced search  


cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.

Pages: [1]   Go Down

Author Topic: Для работы ссылок ВВ [img] [url]  (Read 5052 times)

0 Members and 1 Guest are viewing this topic.


  • Coppermine regular visitor
  • **
  • Offline Offline
  • Posts: 61
Для работы ссылок ВВ [img] [url]
« on: April 23, 2011, 09:52:37 pm »

Для работы ссылок ВВ- img, url с использованием РУССКИХ букв, типа

Необходимо добавить в файл include/ символы \x7f-\xff
function make_clickable($text)
    $ret = ' '.$text;
        $ret = preg_replace("#([\n ])([a-z]+?)://([a-z0-9\x7f-\xff\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#i", "\\1<a href=\"\\2://\\3\" rel=\"external\">\\2://\\3</a>", $ret);
        $ret = preg_replace("#([\n ])www\.([a-z0-9\x7f-\xff\-]+)\.([a-z0-9\x7f-\xff\-.\~]+)((?:/[a-z0-9\x7f-\xff\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", "\\1<a href=\"http://www.\\2.\\3\\4\" rel=\"external\">www.\\2.\\3\\4</a>", $ret);
        $ret = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $ret);
        return substr($ret, 1);
Pages: [1]   Go Up

Page created in 0.018 seconds with 20 queries.