[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Forum
. -> [Folder]  Test
. . -> [Subject]  Urls?

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Urls?
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Sun 16 Jan 2005 09:06 AM (UTC)  quote  ]
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
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Sat 15 Jan 2005 11:33 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Nick Gammon   Australia  (18,772 posts)  [Biography] bio   Forum Administrator
Date Sat 15 Jan 2005 10:05 PM (UTC)  quote  ]
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
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Sat 15 Jan 2005 08:54 PM (UTC)  quote  ]
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
[Go to top] top

Posted by Faux   United Kingdom  (77 posts)  [Biography] bio
Date Sat 15 Jan 2005 08:36 PM (UTC)  quote  ]
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/
[Go to top] top

Posted by Flannel   USA  (1,230 posts)  [Biography] bio
Date Sat 15 Jan 2005 07:32 AM (UTC)  quote  ]
Message
Although as an administrator you can insert URLs (and pictures, and anything else you want) into your posts.

Nick talks about it here:
http://www.gammon.com.au/forum/bbshowpost.php?bbsubject_id=2840

~Flannel

Messiah of Rose
Eternity's Trials.

Clones are people two.
[Go to top] top

Posted by Kris   USA  (198 posts)  [Biography] bio
Date Sat 15 Jan 2005 07:01 AM (UTC)  quote  ]
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.

--Kris
[Go to top] top

Posted by Faux   United Kingdom  (77 posts)  [Biography] bio
Date Thu 13 Jan 2005 12:58 PM (UTC)  quote  ]

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/
[Go to top] 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.


4,746 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]