Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

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

0 Members and 1 Guest are viewing this topic.

lineart

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

Для работы ссылок ВВ- img, url с использованием РУССКИХ букв, типа
_ttp://www/search-thumbnails-русский.html

Необходимо добавить в файл include/functions.inc.php символы \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);
}
====
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 18 queries.