View Office documents online - Office.com - 0 views
Apple - iTunes U Live Webcast Series - 0 views
About pdfforge | pdfforge.org - 0 views
Wappwolf - Action Toolbox - 0 views
IFTTT / Channels - 0 views
PHP: imap_search - Manual - 0 views
BgPatterns - Background Patterns Maker - 0 views
Browse online courses on Udemy. - 0 views
Joomla! 2.5 - 0 views
Task Management for Teams - Asana - 0 views
The State of Tech: Past Episodes - 0 views
jQueryMobile - DateBox Demos - 1 views
MakeItLink - Detecting URLs In Text And Making Them Links | Joseph Scott - 0 views
-
class MakeItLink { protected function _link_www( $matches ) { $url = $matches[2]; $url = MakeItLink::cleanURL( $url ); if( empty( $url ) ) { return $matches[0]; } return "{$matches[1]}{$url}"; } public function cleanURL( $url ) { if( $url == '' ) { return $url; } $url = preg_replace( "|[^a-z0-9-~+_.?#=!&;,/:%@$*'()x80-xff]|i", '', $url ); $url = str_replace( array( "%0d", "%0a" ), '', $url ); $url = str_replace( ";//", "://", $url ); /* If the URL doesn't appear to contain a scheme, we * presume it needs http:// appended (unless a relative * link starting with / or a php file). */ if( strpos( $url, ":" ) === false && substr( $url, 0, 1 ) != "/" && !preg_match( "|^[a-z0-9-]+?.php|i", $url ) ) { $url = "http://{$url}"; } // Replace ampersans and single quotes $url = preg_replace( "|&([^#])(?![a-z]{2,8};)|", "&$1", $url ); $url = str_replace( "'", "'", $url ); return $url; } public function transform( $text ) { $text = " {$text}"; $text = preg_replace_callback( '#(?])(\()?([\w]+?://(?:[\w\\x80-\\xff\#$%&~/\-=?@\[\](+]|[.,;:](?![\s<])|(?(1)\)(?![\s<])|\)))*)#is', array( 'MakeItLink', '_link_www' ), $text ); $text = preg_replace( '#(]+?>|>))]+?>([^>]+?)#i', "$1$3", $text )
ThemeRoller | jQuery Mobile - 0 views
‹ Previous
21 - 40 of 152
Next ›
Last »
Showing 20▼ items per page