aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
authorDavid M <davidmj@users.sourceforge.net>2006-08-01 05:06:33 +0000
committerDavid M <davidmj@users.sourceforge.net>2006-08-01 05:06:33 +0000
commit541dbf8af07874e9507249a7e62cc3c32475d475 (patch)
treeb6186a4c274f124e9025e0e3aa7fa179fcf8d87f /phpBB/includes
parent3c69c8f00a70ceeebabcd1cec79b6077ad785062 (diff)
downloadforums-541dbf8af07874e9507249a7e62cc3c32475d475.tar
forums-541dbf8af07874e9507249a7e62cc3c32475d475.tar.gz
forums-541dbf8af07874e9507249a7e62cc3c32475d475.tar.bz2
forums-541dbf8af07874e9507249a7e62cc3c32475d475.tar.xz
forums-541dbf8af07874e9507249a7e62cc3c32475d475.zip
- BBCode helpline is now customizable
git-svn-id: file:///svn/phpbb/trunk@6223 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/acp/acp_bbcodes.php8
-rw-r--r--phpBB/includes/functions_display.php9
2 files changed, 11 insertions, 6 deletions
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'], '<a href="#down">', '</a>'),
'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++;