aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2013-12-20 16:11:02 +0100
committerJoas Schilling <nickvergessen@gmx.de>2013-12-20 16:11:02 +0100
commit558f3cd21cb925395003ebd1a7a226d240f9fccb (patch)
treedbb78a977381ec8723f3a8114bc53ce80d3957a0 /phpBB/includes/functions_display.php
parente3e34add7f725457b2a6e4809bbfdd6fa576203d (diff)
parent121f2394ff92c7497f2f2a11913d02570695e8e4 (diff)
downloadforums-558f3cd21cb925395003ebd1a7a226d240f9fccb.tar
forums-558f3cd21cb925395003ebd1a7a226d240f9fccb.tar.gz
forums-558f3cd21cb925395003ebd1a7a226d240f9fccb.tar.bz2
forums-558f3cd21cb925395003ebd1a7a226d240f9fccb.tar.xz
forums-558f3cd21cb925395003ebd1a7a226d240f9fccb.zip
Merge remote-tracking branch 'vsephpbb/ticket/12060' into develop
* vsephpbb/ticket/12060: (37 commits) [ticket/12060] A little less verbose cleanup of event docblocks [ticket/12060] Further clarifying new event docblocks as much as possible [ticket/12060] More fixes to dockblock for acp_bbcodes_modify_create event [ticket/12060] Remove whitespaces [ticket/12060] Fix docblock for acp_bbcodes_modify_create event [ticket/12060] Rename event in message parser to modify_format_display_text_after [ticket/12060] Add num_predefined_bbcodes to display_custom_bbcodes_modify_sql [ticket/12060] Further clarify/fix a var in acp_bbcodes_modify_create event doc block [ticket/12060] Use separate template event for acp user signature posting buttons [ticket/12060] Rename event from append to after in acp_bbcodes.html [ticket/12060] Correctly label alpha versions in event docblocks [ticket/12060] Fix u_action comments in docblocks [ticket/12060] Change @since in event docblocks [ticket/12060] Update the docblock comments in acp core events [ticket/12060] Refactor u_action in the events that use it [ticket/12060] Use $sql_ary instead of $sql [ticket/12060] Update docblock for core event due to addition of another var [ticket/12060] Remove re-tabbing of html from subsilver2 files [ticket/12060] Add $update_this_message var to the core event [ticket/12060] Adjust last item in array to use a comma instead of closing parenthesis ...
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php29
1 files changed, 22 insertions, 7 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index 0ff842ea6a..e663ac90c5 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -919,7 +919,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
/**
* Assign/Build custom bbcodes for display in screens supporting using of bbcodes
-* The custom bbcodes buttons will be placed within the template block 'custom_codes'
+* The custom bbcodes buttons will be placed within the template block 'custom_tags'
*/
function display_custom_bbcodes()
{
@@ -928,11 +928,26 @@ function display_custom_bbcodes()
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
$num_predefined_bbcodes = 22;
- $sql = 'SELECT bbcode_id, bbcode_tag, bbcode_helpline
- FROM ' . BBCODES_TABLE . '
- WHERE display_on_posting = 1
- ORDER BY bbcode_tag';
- $result = $db->sql_query($sql);
+ $sql_ary = array(
+ 'SELECT' => 'b.bbcode_id, b.bbcode_tag, b.bbcode_helpline',
+ 'FROM' => array(BBCODES_TABLE => 'b'),
+ 'WHERE' => 'b.display_on_posting = 1',
+ 'ORDER_BY' => 'b.bbcode_tag',
+ );
+
+ /**
+ * Event to modify the SQL query before custom bbcode data is queried
+ *
+ * @event core.display_custom_bbcodes_modify_sql
+ * @var array sql_ary The SQL array to get the bbcode data
+ * @var int num_predefined_bbcodes The number of predefined core bbcodes
+ * (multiplied by factor of 2)
+ * @since 3.1.0-a3
+ */
+ $vars = array('sql_ary', 'num_predefined_bbcodes');
+ extract($phpbb_dispatcher->trigger_event('core.display_custom_bbcodes_modify_sql', compact($vars)));
+
+ $result = $db->sql_query($db->sql_build_query('SELECT', $sql_ary));
$i = 0;
while ($row = $db->sql_fetchrow($result))
@@ -952,7 +967,7 @@ function display_custom_bbcodes()
);
/**
- * Modify the template data block of a bbcode
+ * Event to modify the template data block of a custom bbcode
*
* This event is triggered once per bbcode
*