Finished-[6.3] Correctly hyperlink URL's with a comma(s) in them - 03/24/2004 4:46 PM
Mod Name / Version: Correctly hyperlink URL's with a comma(s) in them
Description: Some URL's contain one or more commas in them which will not hyperlink correctly when pasted into a post. This mod will allow them to hyperlink correctly.
Ex. http://www.thesun.co.uk/section/0,,3,00.html
This mod should work in versions other than 6.3, but I cannot confirm.
---
NOTE: It will only apply to URL's which begin with http:// and not ones that begin with www. since those have a greater chance of being placed within text that may be preceeded by a comma not related to the URL.
Ex. I recently visted www.example.com, and found the site quite interesting.
---
Working Under: UBB.Threads 6.3
Mod Status: Finished
Any pre-requisites:
Author(s): Twisty
Date: 03/24/04
Credits:
Files Altered: ubbt.inc.php
New Files:
Database Altered: no
Info/Instructions: In ubbt.inc.php
CHANGE THIS:
TO THIS:
Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.
Description: Some URL's contain one or more commas in them which will not hyperlink correctly when pasted into a post. This mod will allow them to hyperlink correctly.
Ex. http://www.thesun.co.uk/section/0,,3,00.html
This mod should work in versions other than 6.3, but I cannot confirm.
---
NOTE: It will only apply to URL's which begin with http:// and not ones that begin with www. since those have a greater chance of being placed within text that may be preceeded by a comma not related to the URL.
Ex. I recently visted www.example.com, and found the site quite interesting.
---
Working Under: UBB.Threads 6.3
Mod Status: Finished
Any pre-requisites:
Author(s): Twisty
Date: 03/24/04
Credits:
Files Altered: ubbt.inc.php
New Files:
Database Altered: no
Info/Instructions: In ubbt.inc.php
CHANGE THIS:
Code
$Body = preg_replace("#([\n\r ])([a-z]+?)://([^, \n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $Body);
TO THIS:
Code
$Body = preg_replace("#([\n\r ])([a-z]+?)://([^ \n\r]+)#i", "\\1<a href=\"\\2://\\3\" target=\"_blank\">\\2://\\3</a>", $Body);
Disclaimer: Please backup every file that you intend to modify.
If the modification modifies the database, it's a good idea to backup your database before doing so.
Note: If you modify your UBB.Threads code, you may be giving up your right for "official" support from Infopop.If you need official support, you'll need to restore unmodified files.