fedai |
|
---|---|
cotonti function:
function sed_parse_autourls($text)
{
$text = preg_replace('`(^|\s)(http|https|ftp)://([^\s"\'\[]+)`', '$1<a href="$2://$3">$2://$3</a>', $text);
$text = preg_replace_callback('`(^|\s)(\w[\._\w\-]+@[\w\.\-]+\.[a-z]+)`', 'sed_obfuscate_eml', $text);
return $text;
}
function sed_bbcode_autourls($text)
{
$text = ' '.$text;
$text = preg_replace("#([\n ])([a-z0-9]+?)://([^\t \n\r]+)#i", "\\1[url]\\2://\\3[/url]", $text);
$text = preg_replace("#([\n ])([a-z0-9-_.]+?@[A-z0-9-]+\.[^,\t \n\r]+)#i", "\\1[email]\\2[/email]", $text);
return(substr($text,1));
} seditio Hide links to guests corehack: function sed_bbcode_autourls($text)
{
global $usr;
if ($usr['maingrp']>0)
{
$text = ' '.$text;
$text = preg_replace("#([\n ])([a-z0-9]+?)://([^\t \n\r]+)#i", "\\1[url]\\2://\\3[/url]", $text);
$text = preg_replace("#([\n ])([a-z0-9-_.]+?@[A-z0-9-]+\.[^,\t \n\r]+)#i", "\\1[email]\\2[/email]", $text);
return(substr($text,1));
}
else
{
$text = ' '.$text;
$text = preg_replace("#([\n ])([a-z0-9]+?)://([^\t \n\r]+)#i", " Linkleri görebilmek için <a href=\"users.php?m=register\">ÜYE</a> olmalısınız.", $text);
$text = preg_replace("#\[url([^\t \n\r]+)#i", " Linkleri görebilmek için <a href=\"users.php?m=register\">ÜYE</a> olmalısınız.", $text);
$text = preg_replace("#([\n ])([a-z0-9-_.]+?@[A-z0-9-]+\.[^,\t \n\r]+)#i", "\\1[email]\\2[/email]", $text);
return(substr($text,1));
}
}
You can help cotonti about corehack?[/] "peace in the homeland, peace in the world" K.ATATÜRK
personal blog: http://www.sametbal.net |