| version 1.63, 2007/04/29 13:12:24 |
version 1.64, 2007/07/07 22:16:26 |
|
|
| * http://platon.sk/projects/Metafox/ |
* http://platon.sk/projects/Metafox/ |
| */ |
*/ |
| |
|
| /* $Platon: Metafox/functions.inc.php,v 1.62 2007-04-22 15:37:53 nepto Exp $ */ |
/* $Platon: Metafox/functions.inc.php,v 1.63 2007-04-29 13:12:24 nepto Exp $ */ |
| |
|
| function ezin_eval($evalcode) /* {{{ */ |
function ezin_eval($evalcode) /* {{{ */ |
| { |
{ |
| Line 37 function ezin_process_text_flags(&$str, |
|
| Line 37 function ezin_process_text_flags(&$str, |
|
| $line_wrap_p = stristr(@$ezin_cfg['flags_'.$type], 'P') != false; |
$line_wrap_p = stristr(@$ezin_cfg['flags_'.$type], 'P') != false; |
| $line_wrap_br = stristr(@$ezin_cfg['flags_'.$type], 'B') != false; |
$line_wrap_br = stristr(@$ezin_cfg['flags_'.$type], 'B') != false; |
| |
|
| |
$max_word_size = intval($ezin_cfg['message_max_word_size']); |
| |
if ($max_word_size <= 0) { |
| |
$max_word_size = 60; // set to 60 even if disabled |
| |
} |
| |
|
| /* Links substitution code borrowed from phpBB2, http://www.phpbb.com/ |
/* Links substitution code borrowed from phpBB2, http://www.phpbb.com/ |
| See make_clickable() in includes/bbcode.php for more info. */ |
See make_clickable() in includes/bbcode.php for more info. */ |
| |
|
| Line 45 function ezin_process_text_flags(&$str, |
|
| Line 50 function ezin_process_text_flags(&$str, |
|
| |
|
| $http_substs && $str = preg_replace( |
$http_substs && $str = preg_replace( |
| "#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#ie", |
"#([\n ])([a-z]+?)://([a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]+)#ie", |
| "'\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://'.Platon::pretty_substr('\\3',80).'</a>'", $str); |
"'\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://'.Platon::pretty_substr('\\3',$max_word_size).'</a>'", $str); |
| |
|
| $www_substs && $str = preg_replace( |
$www_substs && $str = preg_replace( |
| "#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", |
"#([\n ])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[a-z0-9\-\.,\?!%\*_\#:;~\\&$@\/=\+]*)?)#i", |