Gammon Forum
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 (22,975 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.
28,041 views.
It is now over 60 days since the last post. This thread is closed.
  Refresh page
top
Quick links:
MUSHclient.
MUSHclient help.
Forum shortcuts.
Posting templates.
Lua modules.
Lua documentation.
Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.