Changeset 1401 in ExiteCMS for trunk/includes/forum_functions_include.php
- Timestamp:
- 05/15/08 15:10:13 (4 years ago)
- File:
-
- 1 edited
-
trunk/includes/forum_functions_include.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/forum_functions_include.php
r1305 r1401 383 383 if (strlen($rawmsg)) $message .= $rawmsg; 384 384 385 // find remaining URL's in the text, and convert them to a href as well386 $pattern = '#(^|[^\"=]{1})(https?://|ftp://|mailto:|news:)([^(,\s<>\[\]\)]+)([,\s\n<>\)]|$)#sme';387 $message = preg_replace($pattern,"'$1<a href=\'$2$3\' target=\'_blank\'>'.shortenlink('$2$3',83).'</a>$4'",$message);388 // re-insert the saved url blocks389 foreach($urlblocks as $urlblock) {390 // find the first placeholder391 $i = strpos($message, "{@@**@@}");392 $message = substr($message, 0, $i).$urlblock.substr($message, $i+8);393 }394 395 385 // detect and convert wikitags to wiki bbcodes if needed 396 386 if (isset($settings['wiki_forum_links']) && $settings['wiki_forum_links']) { … … 405 395 $message = preg_replace($search, $replace, $message); 406 396 } 397 398 // find remaining URL's in the text, and convert them to a href as well 399 $pattern = '#(^|[^\"=]{1})(https?://|ftp://|mailto:|news:)([^(,\s<>\[\]\)]+)([,\s\n<>\)]|$)#sme'; 400 $message = preg_replace($pattern,"'$1<a href=\'$2$3\' target=\'_blank\'>'.shortenlink('$2$3',83).'</a>$4'",$message); 401 // re-insert the saved url blocks 402 foreach($urlblocks as $urlblock) { 403 // find the first placeholder 404 $i = strpos($message, "{@@**@@}"); 405 $message = substr($message, 0, $i).$urlblock.substr($message, $i+8); 406 } 407 407 408 // parse the smileys in the message 408 409 if ($smileys) $message = parsesmileys($message);
Note: See TracChangeset
for help on using the changeset viewer.
