Forums / Cotonti / Support / Hide links to guests about

AbkHaZiaN
#16659 2009-09-01 19:02
it'nıt work again, my functions.php

function sed_parse_autourls($text)
{
global $usr;
if ($usr['maingrp']>0)
{
    $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;
}
else
{
    $text = preg_replace('`(^|\s)(http|https|ftp)://([^\s"\'\[]+)`', 'nolink', $text);
    $text = preg_replace_callback('`(^|\s)(\w[\._\w\-]+@[\w\.\-]+\.[a-z]+)`', 'nolink', $text);
    return $text;
}
}

Give an error:
Warning: preg_replace_callback() [function.preg-replace-callback]: Requires argument 2, 'nolink', to be a valid callback in /home/pow3r/domains/zzzzz/public_html/system/functions.php on line 699

This is on line 699:
$text = preg_replace_callback('`(^|\s)(\w[\._\w\-]+@[\w\.\-]+\.[a-z]+)`', 'nolink', $text);

Added 4 days later:

are you forget us:([/][/]
This post was edited by AbkHaZiaN (2009-09-06 08:20, 14 years ago)