Firefox PHP

Clickable URLs in messages

Posted by Anonymous User 
Anonymous User
Clickable URLs in messages
January 21, 2003 10:47AM
Hello,

I have been trying out various solutions found here and elsewhere on the web, without a satisfying result. Most seem to work fine, but some don't display URLs with commas & other non-alpha-numerical characters correctly, some don't handle URLs followed by characters like period or comma, etc. etc.

The other day, however, I found a code chunk that seem to handle everything fine: [www.lists.morelogs.de]

It can probably be used as is, but I chose to
- remove the "global $body;" line,
- place $body as a parameter for the function (plugin_core_url_conversion($body)),
- and added a "return $body" at the end of the function.

You can now place this function in \include\read_functions.php, and
call it from the proper place in the same file (somewhere in the format_body function), like this:
$body = plugin_core_url_conversion($body);
(You might want to rename the function, too ...)

The file references are for Phorum 3.3.2c. I can't vouch for the coding quality, but it's working! If you know any better solutions, please respond.

Knut Tore Breivik
Sorry, you do not have permission to post/reply in this forum.