Login     Sign up
bug or feature?
Jim Teja (@jimteja)
Join date: Sep 29th 2010
Community posts: 10
View Profile
Send Message

I'm not sure if this is a bug or feature.. I've been trying desperately to get the activity updates to recognize URL's and convert them to live links.. by mistake, I found that if you lead your URL with a " it will convert to a link.. for example..

Hey check out [url]http://www.google.com[/url]

would be..

Hey check out "[url]http://www.google.com[/url]

Is this supposed to be happening? Is there a way to make them live links without the leading quotation mark? Thanks!

174 months ago
adil (@adil)
Join date: May 9th 2010
Community posts: 202
View Profile
Send Message

hhhhh you solve the mystery man it is a bug but you found what every body is looking for !!!! thanks any way

174 months ago
Jim Teja (@jimteja)
Join date: Sep 29th 2010
Community posts: 10
View Profile
Send Message

haha as long as i'm not the only one having trouble posting links :)

174 months ago
Jim Teja (@jimteja)
Join date: Sep 29th 2010
Community posts: 10
View Profile
Send Message

does anyone happen to know what part of the code this is in?

174 months ago
Jim Teja (@jimteja)
Join date: Sep 29th 2010
Community posts: 10
View Profile
Send Message

Ok, so I did some digging around, and it appears to be in ss.inc.php..

[code]
$_POST['message'] = parseurl($_POST['message']);

    $url_search = array(            

        "/\[url]www.([^'\"]*)\[\/url]/iU",

        "/\[url]([^'\"]*)\[\/url]/iU",

        "/\[url=www.([^'\"\s]*)](.*)\[\/url]/iU",

        "/\[url=([^'\"\s]*)](.*)\[\/url]/iU",

    );

    $url_replace = array(

        "<a href=\"http://www.\\1\" target=\"_blank\" rel=\"nofollow\">www.\\1</a>",

        "<a href=\"\\1\" target=\"_blank\" rel=\"nofollow\">\\1</a>",

        "<a href=\"http://www.\\1\" target=\"_blank\" rel=\"nofollow\">\\2</a>",

        "<a href=\"\\1\" target=\"_blank\" rel=\"nofollow\">\\2</a>"

        );

    $stream_id = stream_publish(preg_replace($url_search,$url_replace, h($_POST['message']) ),$attachment,$app);

    $arr = array(

        'id'=>$stream_id,'avatar'=>$client['avatar'],'message'=>decode_bb(h(stripslashes($_POST['message']))),'attachment'=>$attachment,'username'=>$client['uname'],'created'=>time()

        );

    echo stream_display($arr,'',1);

[code]

It obviously needs an extra quotation mark somewhere in this. Does anyone know where it should go?

174 months ago