Find and replace URLs from [PHP] and [CODE] tags
ZiNgA BuRgA Offline
Fag
*******
Posts: 3,357
Joined: Jan 2008
Post: #2
RE: Find and replace URLs from [PHP] and [CODE] tags
Your regex is extremely weird - I don't know what you were trying to do with it.  It somewhat works on some contrived examples, but probably not what you want, eg

Code:
http://www.example.com


Also, the 'parse_message' hook is run after MyCodes have been parsed, so trying to do anything to match [code] or [url] tags won't work.
You're probably better off taking the regexes MyBB uses in class_parser.php.


My Blog
11-03-2014 11:04 AM
Find all posts by this user Quote this message in a reply

« Next Oldest | Next Newest »

Messages In This Thread
RE: Find and replace URLs from [PHP] and [CODE] tags - ZiNgA BuRgA - 11-03-2014 11:04 AM

 Standard Tools
Forum Jump: