Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are
spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the
password reset link.
Due to spam on this forum, all posts now need moderator approval.
Entire forum
➜ Forum
➜ Test
➜ Urls?
It is now over 60 days since the last post. This thread is closed.
Refresh page
Posted by
| Faux
United Kingdom (77 posts) Bio
|
Date
| Thu 13 Jan 2005 12:58 PM (UTC) Amended on Thu 13 Jan 2005 12:59 PM (UTC) by Faux
|
Message
| [[url]]http://google.co.uk/[[/url]]
[url]http://google.co.uk/[/url]
Noe =( |
Faux, from Discworld. Feel free to come talk to me =)
http://faux.servebeer.com/ | Top |
|
Posted by
| Kris
USA (198 posts) Bio
|
Date
| Reply #1 on Sat 15 Jan 2005 07:01 AM (UTC) |
Message
| Yeah someone asked about this a couple years ago I think. I believe Nick said he decided not to create a URL forum code because of fears that it could be exploited or abused by users.
| Top |
|
Posted by
| Flannel
USA (1,230 posts) Bio
|
Date
| Reply #2 on Sat 15 Jan 2005 07:32 AM (UTC) |
Message
| |
Posted by
| Faux
United Kingdom (77 posts) Bio
|
Date
| Reply #3 on Sat 15 Jan 2005 08:36 PM (UTC) |
Message
| Simply to avoid boosting an old thread..
What'd be wrong with something like..?
http://faux.servebeer.com/t/bbcode2html.php |
Faux, from Discworld. Feel free to come talk to me =)
http://faux.servebeer.com/ | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #4 on Sat 15 Jan 2005 08:54 PM (UTC) |
Message
|
Quote: At present, it simply does a "replace all" of "[b]" to "<b>" and so on. Instead of replace all of [b] to <b>, you could do replace all of [a]...[/a] to <a href="...">...</a>. Unless, of course, Nick meant that he does only one linear scan of the message, instead of uses multiple regular expressions on it. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Gammon
Australia (23,133 posts) Bio
Forum Administrator |
Date
| Reply #5 on Sat 15 Jan 2005 10:05 PM (UTC) |
Message
| It is done with a linear scan. It is hard to get regexps right, because of the nesting problem. |
- Nick Gammon
www.gammon.com.au, www.mushclient.com | Top |
|
Posted by
| David Haley
USA (3,881 posts) Bio
|
Date
| Reply #6 on Sat 15 Jan 2005 11:33 PM (UTC) |
Message
| You could use non-greedy regexes, but I agree that the linear scan is certainly faster.
To get the link working, you'd have to keep track of where you found the open-link, then as soon as you find a close-link you'll have to do some fancy replacing. It'd be nice to have but I agree the copy/pasting isn't too bad. |
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
http://david.the-haleys.org | Top |
|
Posted by
| Nick Cash
USA (626 posts) Bio
|
Date
| Reply #7 on Sun 16 Jan 2005 09:06 AM (UTC) |
Message
| I dont mind the copy and pasting, but if you really wanted to you could probably just grab phpBB's code since I believe they allow you to do it. |
~Nick Cash
http://www.nick-cash.com | Top |
|
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.
31,189 views.
It is now over 60 days since the last post. This thread is closed.
Refresh page
top