Topic: IRC links automatically detected

HTTP links are detected, like http://punbb.org/forums/ and punbb make automatically an hyperlink.

Is it possible to do the same with IRC links ? Like irc://irc.freenode.net/ubuntu --> irc://irc.freenode.net/ubuntu

Thanks for your answer (yes or no ^^)

Re: IRC links automatically detected

Yes.

The file parser.php contains this:

//
// Make hyperlinks clickable
//
function do_clickable($text)
{
    global $pun_user;

    $text = ' '.$text;

    $text = preg_replace('#([\s\(\)])(https?|ftp|news){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', '\'$1\'.handle_url_tag(\'$2://$3\')', $text);
    $text = preg_replace('#([\s\(\)])(www|ftp)\.(([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^"\s\(\)<\[]*)?)#ie', '\'$1\'.handle_url_tag(\'$2.$3\', \'$2.$3\')', $text);

    return substr($text, 1);
}

Copy, rename and modify the function to handle IRC links. Then call it at the appropriate places (i.e. where do_clickable is called usually).

Aftonbörsens skapare. Var med och starta något roligt och stort du med!

Re: IRC links automatically detected

Thanks Limber for the answer, but i wasn't clear enought : is it possible to added this feature to the official version of punBB ?

Good week end wink

Re: IRC links automatically detected

Hi guys ! So is it plan for the 1.3 ?

Thanks