diff --git a/phpBB/adm/style/acp_bbcodes.html b/phpBB/adm/style/acp_bbcodes.html index 0714b6f106..76952bd340 100644 --- a/phpBB/adm/style/acp_bbcodes.html +++ b/phpBB/adm/style/acp_bbcodes.html @@ -30,6 +30,15 @@ +
+ {L_BBCODE_HELPLINE} +

{L_BBCODE_HELPLINE_EXPLAIN}

+
+
+
+
+
+
{L_SETTINGS}
diff --git a/phpBB/adm/style/acp_users.html b/phpBB/adm/style/acp_users.html index 25ff88bd34..3b6d6388de 100644 --- a/phpBB/adm/style/acp_users.html +++ b/phpBB/adm/style/acp_users.html @@ -561,6 +561,7 @@ f_help = "{LA_BBCODE_F_HELP}"; e_help = "{LA_BBCODE_E_HELP}"; d_help = "{LA_BBCODE_D_HELP}"; + cb_{custom_tags.BBCODE_ID}_help = "{custom_tags.BBCODE_HELPLINE}"; //--> @@ -601,7 +602,7 @@

- + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" /> diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index cdb6fce1f8..82c6ed778b 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -33,12 +33,12 @@ class acp_bbcodes switch ($action) { case 'add': - $bbcode_match = $bbcode_tpl = ''; + $bbcode_match = $bbcode_tpl = $bbcode_helpline = ''; $display_on_posting = 0; break; case 'edit': - $sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting + $sql = 'SELECT bbcode_match, bbcode_tpl, display_on_posting, bbcode_helpline, bbcode_helpline FROM ' . BBCODES_TABLE . ' WHERE bbcode_id = ' . $bbcode_id; $result = $db->sql_query($sql); @@ -53,6 +53,7 @@ class acp_bbcodes $bbcode_match = $row['bbcode_match']; $bbcode_tpl = htmlspecialchars($row['bbcode_tpl']); $display_on_posting = $row['display_on_posting']; + $bbcode_helpline = html_entity_decode($row['bbcode_helpline']); break; case 'modify': @@ -75,6 +76,7 @@ class acp_bbcodes $bbcode_match = request_var('bbcode_match', ''); $bbcode_tpl = html_entity_decode(request_var('bbcode_tpl', '')); + $bbcode_helpline = htmlspecialchars(request_var('bbcode_helpline', '')); break; } @@ -92,6 +94,7 @@ class acp_bbcodes 'L_BBCODE_USAGE_EXPLAIN'=> sprintf($user->lang['BBCODE_USAGE_EXPLAIN'], '', ''), 'BBCODE_MATCH' => $bbcode_match, 'BBCODE_TPL' => $bbcode_tpl, + 'BBCODE_HELPLINE' => $bbcode_helpline, 'DISPLAY_ON_POSTING' => $display_on_posting) ); @@ -135,6 +138,7 @@ class acp_bbcodes 'bbcode_match' => $bbcode_match, 'bbcode_tpl' => $bbcode_tpl, 'display_on_posting' => $display_on_posting, + 'bbcode_helpline' => $bbcode_helpline, 'first_pass_match' => $data['first_pass_match'], 'first_pass_replace' => $data['first_pass_replace'], 'second_pass_match' => $data['second_pass_match'], diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php index 720b7eb8b6..5048489c56 100644 --- a/phpBB/includes/functions_display.php +++ b/phpBB/includes/functions_display.php @@ -934,7 +934,7 @@ function display_custom_bbcodes() /* * @todo while adjusting custom bbcodes, think about caching this query as well as correct ordering */ - $sql = 'SELECT bbcode_id, bbcode_tag + $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline FROM ' . BBCODES_TABLE . ' WHERE display_on_posting = 1'; $result = $db->sql_query($sql); @@ -943,9 +943,10 @@ function display_custom_bbcodes() while ($row = $db->sql_fetchrow($result)) { $template->assign_block_vars('custom_tags', array( - 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'", - 'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), - 'BBCODE_TAG' => $row['bbcode_tag']) + 'BBCODE_NAME' => "'[{$row['bbcode_tag']}]', '[/" . str_replace('=', '', $row['bbcode_tag']) . "]'", + 'BBCODE_ID' => $num_predefined_bbcodes + ($i * 2), + 'BBCODE_TAG' => $row['bbcode_tag'], + 'BBCODE_HELPLINE' => $row['bbcode_helpline']) ); $i++; diff --git a/phpBB/install/schemas/firebird_schema.sql b/phpBB/install/schemas/firebird_schema.sql index 71dd488963..942d802318 100644 --- a/phpBB/install/schemas/firebird_schema.sql +++ b/phpBB/install/schemas/firebird_schema.sql @@ -172,6 +172,7 @@ END;; CREATE TABLE phpbb_bbcodes ( bbcode_id INTEGER DEFAULT 0 NOT NULL, bbcode_tag VARCHAR(16) DEFAULT '' NOT NULL, + bbcode_helpline VARCHAR(255) DEFAULT '' NOT NULL, display_on_posting INTEGER DEFAULT 0 NOT NULL, bbcode_match VARCHAR(255) DEFAULT '' NOT NULL, bbcode_tpl BLOB SUB_TYPE TEXT DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/mssql_schema.sql b/phpBB/install/schemas/mssql_schema.sql index d04383fc37..a6d1b7bfa7 100644 --- a/phpBB/install/schemas/mssql_schema.sql +++ b/phpBB/install/schemas/mssql_schema.sql @@ -172,6 +172,7 @@ GO CREATE TABLE [phpbb_bbcodes] ( [bbcode_id] [int] DEFAULT (0) NOT NULL , [bbcode_tag] [varchar] (16) DEFAULT ('') NOT NULL , + [bbcode_helpline] [varchar] (255) DEFAULT ('') NOT NULL, [display_on_posting] [int] DEFAULT (0) NOT NULL , [bbcode_match] [varchar] (255) DEFAULT ('') NOT NULL , [bbcode_tpl] [text] DEFAULT ('') NOT NULL , diff --git a/phpBB/install/schemas/mysql_schema.sql b/phpBB/install/schemas/mysql_schema.sql index 26878630a0..79640beacf 100644 --- a/phpBB/install/schemas/mysql_schema.sql +++ b/phpBB/install/schemas/mysql_schema.sql @@ -106,6 +106,7 @@ CREATE TABLE phpbb_banlist ( CREATE TABLE phpbb_bbcodes ( bbcode_id tinyint(3) DEFAULT '0' NOT NULL, bbcode_tag varchar(16) DEFAULT '' NOT NULL, + bbcode_helpline varchar(255) DEFAULT '' NOT NULL, display_on_posting tinyint(1) UNSIGNED DEFAULT '0' NOT NULL, bbcode_match varchar(255) DEFAULT '' NOT NULL, bbcode_tpl mediumtext DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/oracle_schema.sql b/phpBB/install/schemas/oracle_schema.sql index 6b33854153..e4e28db8a7 100644 --- a/phpBB/install/schemas/oracle_schema.sql +++ b/phpBB/install/schemas/oracle_schema.sql @@ -227,6 +227,7 @@ END; CREATE TABLE phpbb_bbcodes ( bbcode_id number(3) DEFAULT '0' NOT NULL, bbcode_tag varchar2(16) DEFAULT '' NOT NULL, + bbcode_helpline varchar2(255) DEFAULT '' NOT NULL, display_on_posting number(1) DEFAULT '0' NOT NULL, bbcode_match varchar2(255) DEFAULT '' NOT NULL, bbcode_tpl clob DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/postgres_schema.sql b/phpBB/install/schemas/postgres_schema.sql index 34bccc6ee3..8f4a5ecffd 100644 --- a/phpBB/install/schemas/postgres_schema.sql +++ b/phpBB/install/schemas/postgres_schema.sql @@ -186,6 +186,7 @@ CREATE TABLE phpbb_banlist ( CREATE TABLE phpbb_bbcodes ( bbcode_id INT2 DEFAULT '0' NOT NULL, bbcode_tag varchar(16) DEFAULT '' NOT NULL, + bbcode_helpline varchar(255) DEFAULT '' NOT NULL, display_on_posting INT2 DEFAULT '0' NOT NULL CHECK (display_on_posting >= 0), bbcode_match varchar(255) DEFAULT '' NOT NULL, bbcode_tpl TEXT DEFAULT '' NOT NULL, diff --git a/phpBB/install/schemas/sqlite_schema.sql b/phpBB/install/schemas/sqlite_schema.sql index a7695e4dad..816ee95cfa 100644 --- a/phpBB/install/schemas/sqlite_schema.sql +++ b/phpBB/install/schemas/sqlite_schema.sql @@ -108,6 +108,7 @@ CREATE TABLE phpbb_banlist ( CREATE TABLE phpbb_bbcodes ( bbcode_id tinyint(3) NOT NULL DEFAULT '0', bbcode_tag varchar(16) NOT NULL DEFAULT '', + bbcode_helpline varchar(255) DEFAULT '' NOT NULL, display_on_posting tinyint(1) NOT NULL DEFAULT '0', bbcode_match varchar(255) NOT NULL DEFAULT '', bbcode_tpl mediumtext(16777215) NOT NULL DEFAULT '', diff --git a/phpBB/language/en/acp/posting.php b/phpBB/language/en/acp/posting.php index 1258e43eb3..10f4b756c4 100644 --- a/phpBB/language/en/acp/posting.php +++ b/phpBB/language/en/acp/posting.php @@ -38,6 +38,9 @@ $lang = array_merge($lang, array( 'BBCODE_EDITED' => 'BBCode edited successfully', 'BBCODE_INVALID_TAG_NAME' => 'The BBCode tag name that you selected is invalid', 'BBCODE_NOT_EXIST' => 'The BBCode you selected does not exist', + 'BBCODE_HELPLINE' => 'Helpline', + 'BBCODE_HELPLINE_EXPLAIN' => 'This field contains the mouseover text of the BBCode', + 'BBCODE_HELPLINE_TEXT' => 'Helpline text', 'BBCODE_TAG' => 'Tag', 'BBCODE_USAGE' => 'BBCode usage', 'BBCODE_USAGE_EXAMPLE' => '[colour={COLOR}]{TEXT}[/colour]

[font={TEXT1}]{TEXT2}[/font]', diff --git a/phpBB/styles/subSilver/template/posting_body.html b/phpBB/styles/subSilver/template/posting_body.html index 42a63f16df..e0c700d860 100644 --- a/phpBB/styles/subSilver/template/posting_body.html +++ b/phpBB/styles/subSilver/template/posting_body.html @@ -30,6 +30,8 @@ s_help = "{LA_BBCODE_S_HELP}"; f_help = "{LA_BBCODE_F_HELP}"; e_help = "{LA_BBCODE_E_HELP}"; d_help = "{LA_BBCODE_D_HELP}"; +cb_{custom_tags.BBCODE_ID}_help = "{custom_tags.BBCODE_HELPLINE}"; + function checkForm() { @@ -262,7 +264,7 @@ function checkForm() - + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" /> diff --git a/phpBB/styles/subSilver/template/ucp_profile_signature.html b/phpBB/styles/subSilver/template/ucp_profile_signature.html index 63bd604a44..4cacc5ae81 100644 --- a/phpBB/styles/subSilver/template/ucp_profile_signature.html +++ b/phpBB/styles/subSilver/template/ucp_profile_signature.html @@ -26,6 +26,7 @@ s_help = "{LA_BBCODE_S_HELP}"; f_help = "{LA_BBCODE_F_HELP}"; e_help = "{LA_BBCODE_E_HELP}"; d_help = "{LA_BBCODE_D_HELP}"; +cb_{custom_tags.BBCODE_ID}_help = "{custom_tags.BBCODE_HELPLINE}"; //--> @@ -75,7 +76,7 @@ d_help = "{LA_BBCODE_D_HELP}"; - + onmouseover="helpline('cb_{custom_tags.BBCODE_ID}')" />