ID:               6893
 User updated by:  pgl at instinct dot org
 Reported By:      pgl at instinct dot org
 Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: N/A
 PHP Version:      4.0.2
 Assigned To:      tal
 New Comment:

Done: http://pear.php.net/bugs/bug.php?id=9789

Not sure setting the Status to "bogus" was a very nice way of dealing
with this feature request, though. (Also: The original request was for
PHP itself to include this function! :)


Previous Comments:
------------------------------------------------------------------------

[2007-01-07 11:37:51] [EMAIL PROTECTED]

Please file PEAR/PECL related issues in the PEAR/PECL bug 
tracker.

------------------------------------------------------------------------

[2003-01-21 15:50:30] [EMAIL PROTECTED]

How about posting a link to this source online?

------------------------------------------------------------------------

[2003-01-21 14:23:19] alan at frostick dot com

I developed such a function in php with extensive exceptions checking,
some months ago.

If it would help you, you might like to eyeball it. It may give you
valuable and time-saving clues to coding it as a C++ function.

Please send me an email address to deliver you part of my script
library as an attachment.

------------------------------------------------------------------------

[2002-04-28 13:35:01] [EMAIL PROTECTED]

dealing with trailing periods and commas on urls is pretty easy -- just
ignore them if they're followed by a whitespace character. (it's not
100% reliable, of course, but in my experience is more often correct
than including the trailing period or comma in that case.)

------------------------------------------------------------------------

[2002-04-28 06:57:19] pear at tfc-central dot com

In playing with this kind of thing in the past I've come up against the
following problem: How do you handle URLs embedded in sentences which
have contact with a full stop or commas?

"Have a look at www.examples.com/hi.html, it might help you out"

Baring in mind that some sites DO include a comma in the URL, for
example any site powered by the Vignette content managment system -
example:

http://www.vignette.com/CDA/Site/0,2097,1-1-1489,00.html

The same goes for sentences where the URL is followed directly by a
full stop.

The other thing that might be worth taking in to consideration is that
many site designs will "break" if suitably long URLs are added (this is
especially true for forums, which will be a major use for this
function). The  best solution I have seen is vBulletin's, where long
URLs are shortened to look like this:

http://example.com/lon...blah.html

Where the full URL (to which the above text is linked) looks like
this:

http://example.com/long-url-here/blah/blah/blah.html

Obviously different sites would need different lengths of URL, so
whether or not URLs were shortened like this (and to what extent they
were shortened) should probably be specified by an optional second
paramater of some sort.

Hope that helps,

Simon

------------------------------------------------------------------------

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/6893

-- 
Edit this bug report at http://bugs.php.net/?id=6893&edit=1

Reply via email to