From 6206d4aa4ea08df513154d8b87d35785f69a9f2a Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Mon, 3 Jun 2013 12:35:57 +0200 Subject: [PATCH] [ticket/8319] Add explanation for RELATIVE_URL and update LOCAL_URL The explanation now states that links are prefixed with the board URL. PHPBB3-8319 --- phpBB/includes/acp/acp_bbcodes.php | 4 ++-- phpBB/language/en/acp/posting.php | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 02ec8af5b9..ead716b300 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -113,8 +113,8 @@ class acp_bbcodes { $template->assign_block_vars('token', array( 'TOKEN' => '{' . $token . '}', - 'EXPLAIN' => $token_explain) - ); + 'EXPLAIN' => ($token === 'LOCAL_URL') ? sprintf($token_explain, generate_board_url() . '/') : $token_explain, + )); } return; diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 9719287c2a..9232be661b 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -83,7 +83,8 @@ $lang = array_merge($lang, array( 'NUMBER' => 'Any series of digits', 'EMAIL' => 'A valid e-mail address', 'URL' => 'A valid URL using any protocol (http, ftp, etc… cannot be used for javascript exploits). If none is given, “http://” is prefixed to the string.', - 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol.', + 'LOCAL_URL' => 'A local URL. The URL must be relative to the topic page and cannot contain a server name or protocol, as links are prefixed with “%s”', + 'RELATIVE_URL' => 'A relative URL. You can use this to match parts of a URL, but be careful: a full URL is a valid relative URL. When you want to use relative URLs of your board, use the LOCAL_URL token.', 'COLOR' => 'A HTML colour, can be either in the numeric form #FF1234 or a CSS colour keyword such as fuchsia or InactiveBorder' ) ));