Topic: own clickable links


i have set for clickable kommte:// link in parser.php
but this not make a sence mean not work.

    $text = preg_replace('#(?<=[\s\]\)])(<)?(\[)?(\()?([\'"]?)(https?|ftp|news|kommute){1}://([\w\-]+\.([\w\-]+\.)*[\w]+(:[0-9]+)?(/[^\s\[]*[^\s.,?!\[;:-])?)\4(?(3)(\)))(?(2)(\]))(?(1)(>))(?![^\s]*\[/(?:url|img)\])#ie', 'stripslashes(\'$1$2$3$4\').handle_url_tag(\'$5://$6\', \'$5://$6\', true).stripslashes(\'$4$10$11$12\')', $text);

but it will not clickable i must use to get clickable?

or i must rewrite handle_url_tag ?

    $full_url = str_replace(array(' ', '\'', '`', '"'), array('%20', '', '', ''), $url);
    if (strpos($url, 'www.') === 0)            // If it starts with www, we add http://
        $full_url = 'http://'.$full_url;
    else if (strpos($url, 'ftp.') === 0)    // Else if it starts with ftp, we add ftp://
        $full_url = 'ftp://'.$full_url;
    else if (!preg_match('#^([a-z0-9]{3,6})://#', $url))     // Else if it doesn't start with abcdef://, we add http://
        $full_url = 'http://'.$full_url;

But this it will add 2 "kommute://"

    else if (strpos($url, 'kommute://') === 0)    
        $full_url =kommute://'.$full_url;

how must it look to get work?

Re: own clickable links

Dupe of … ble-links/ . Moved to Archive.

Carpe diem