1
0
mirror of https://github.com/e107inc/e107.git synced 2025-04-22 05:31:58 +02:00

Bugfix: Corrected a bug which occurred when "Make URLs Clickable" was active and "Replace clickable URLs" was inactive.. email addresses were still being replaced with the default "-email-" or the replace-text preference value.

This commit is contained in:
CaMer0n 2009-03-08 18:48:12 +00:00
parent 5f5dc41a42
commit 56e5184bcf
2 changed files with 10 additions and 16 deletions
e107_handlers
e107_languages/English/admin

@ -9,9 +9,9 @@
* Text processing and parsing functions
*
* $Source: /cvs_backup/e107_0.8/e107_handlers/e_parse_class.php,v $
* $Revision: 1.51 $
* $Date: 2009-01-30 20:39:03 $
* $Author: e107steved $
* $Revision: 1.52 $
* $Date: 2009-03-08 18:48:12 $
* $Author: e107coders $
*
*/
if (!defined('e107_INIT')) { exit; }
@ -900,21 +900,15 @@ class e_parse
$_ext = ($pref['links_new_window'] ? " rel=\"external\"" : "");
$sub_blk = preg_replace("#(^|[\s])([\w]+?://(?:[\w-%]+?)(?:\.[\w-%]+?)+.*?)(?=$|[\s()[\]<]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"\\2\" {$_ext}>".$pref['link_text']."</a>", $sub_blk);
$sub_blk = preg_replace("#(^|[\s])((?:www|ftp)(?:\.[\w-%]+?){2}.*?)(?=$|[\s()[\]<]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"http://\\2\" {$_ext}>".$pref['link_text']."</a>", $sub_blk);
if ($this->isutf8)
{
$email_text = ($pref['email_text']) ? $this->replaceConstants($pref['email_text']) : "\\1\\\\3";
}
else
{
$email_text = ($pref['email_text']) ? $this->replaceConstants($pref['email_text']) : "\\1\\2&copy;\\3";
}
$email_text = ($pref['email_text']) ? $this->replaceConstants($pref['email_text']) : LAN_EMAIL_SUBS;
$sub_blk = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\"; return true;' onmouseout='window.status=\"\";return true;'>".$email_text."</a>", $sub_blk);
}
else
{
$email_text = ($this->isutf8) ? "\\1\\\\3" : "\\1\\2&copy;\\3";
$sub_blk = preg_replace("#(^|[\s])([\w]+?://(?:[\w-%]+?)(?:\.[\w-%]+?)+.*?)(?=$|[\s()[\]<]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"\\2\" rel=\"external\">\\2</a>", $sub_blk);
$sub_blk = preg_replace("#(^|[\s])((?:www|ftp)(?:\.[\w-%]+?){2}.*?)(?=$|[\s()[\]<]|\.\s|\.$|,\s|,$)#is", "\\1<a href=\"http://\\2\" rel=\"external\">\\2</a>", $sub_blk);
$sub_blk = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\"; return true;' onmouseout='window.status=\"\";return true;'>".LAN_EMAIL_SUBS."</a>", $sub_blk);
$sub_blk = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)*[\w]+)#i", "\\1<a rel='external' href='javascript:window.location=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\";self.close();' onmouseover='window.status=\"mai\"+\"lto:\"+\"\\2\"+\"@\"+\"\\3\"; return true;' onmouseout='window.status=\"\";return true;'>".$email_text."</a>", $sub_blk);
}
}

@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_languages/English/admin/lan_prefs.php,v $
| $Revision: 1.18 $
| $Date: 2009-03-06 20:09:08 $
| $Revision: 1.19 $
| $Date: 2009-03-08 18:48:12 $
| $Author: e107coders $
+----------------------------------------------------------------------------+
*/
@ -111,7 +111,7 @@ define("PRFLAN_97", "Unique 'Plugins info' menu:");
define("PRFLAN_98", "If disabled, each plugin will display its own info in an individual menu. If enabled all info will be displayed in one menu.");
define("PRFLAN_101", "Text Rendering");
define("PRFLAN_102", "Replace clickable URLs");
define("PRFLAN_103", "If ticked, and 'Make Clickable' (above) is also ticked, posted URLs are displayed as a hyperlink using text from the textbox below. This keeps very long URLs from breaking layout.");
define("PRFLAN_103", "If ticked, and 'Make Clickable' (above) is also ticked, posted URLs or Email addresses are displayed as a hyperlink using text from the textboxes below. This keeps very long URLs/Emails from breaking layout.");
define("PRFLAN_104", "URL replacement text");
define("PRFLAN_105", "Replacement visible text for clickable URLs. Image can be used by using &lt;img&gt; tag, with full path to image");
define("PRFLAN_106", "Core preferences saved to database.");
@ -134,7 +134,7 @@ define("PRFLAN_124", "Use 'classic' nextprev look");
define("PRFLAN_125", "Turning this on will show the nextprev pages as 1 2 3 ... 21 22 23, instead of the new look with the dropdown.");
define("PRFLAN_126", "Text to display on signup page");
define("PRFLAN_127", "Make URLs clickable");
define("PRFLAN_128", "Turning this on will convert posted URLs to hyperlinks");
define("PRFLAN_128", "Turning this on will convert posted URLs or Email addresses to hyperlinks");
define("PRFLAN_129", "Disallow multiple logins");
define("PRFLAN_130", "Activating this will prevent more than one person logging in with the same username/password (login detail sharing)");
define("PRFLAN_131", "Activate use of [php] bbcode");