Pastoid

Twitter Linkify stuff

The page you are looking at now is at this URL: http://pastoid.com/an7

This paste was last updated on February 17, 2009 at 3:01 pm.

Pasted Coderaw

                if ( Options::get( 'twitter__linkify_urls' ) != FALSE ) {
                        /* link to all http: */
//                      $theme->tweet_text = preg_replace( "/(http:\/\/\S*)/", "<a href=\"$1\">$1</a>", $theme->tweet_text );
                        $theme->tweet_text = preg_replace( '%https?://\S+?(?=(?:[.:?"!$&\'()*+,=]|)(?:\s|$))%i', "<a href=\"$0\">$0</a>", $theme->tweet_text );
                        /* link to usernames */
//                      $theme->tweet_text = preg_replace( "/(^|\(|\[|\s+)@([A-Za-z0-9]{1,64})/", "$1@<a href=\"http://twitter.com/$2\">$2</a>", $theme->tweet_t$
                        $theme->tweet_text = preg_replace( "/(?<!\w)@([\w-.]{1,64})/", "@<a href=\"http://twitter.com/$1\">$1</a>", $theme->tweet_text );
                        /* link to hashtags */
//                      $theme->tweet_text = preg_replace( "/(^|\(|\[|\s+)#([A-Za-z0-9_\-\.]{1,64})/",
                        $theme->tweet_text = preg_replace( '/(?<!\w)#((?>\d{1,64}|)[\w-.]{1,64})/',
                                "<a href=\"" . Options::get('twitter__hashtags_query') ."$1\">#$1</a>", $theme->tweet_text );
//                              "$1<a href=\"" . Options::get('twitter__hashtags_query') ."$2\">#$2</a>", $theme->tweet_text );
 
                }
 
 

Toggle wordwrap

Referring DomainHits
Unknown Referer 127
www.google.es 5
search.live.com 2
Is this paste spam?
<Hide