diff options
author | Matt Friedman <maf675@gmail.com> | 2013-12-04 16:42:07 -0800 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2013-12-04 16:42:07 -0800 |
commit | 79b8ecad4ddf1b023b9100afa623e8c0f8981e79 (patch) | |
tree | 80b6659481b3866d5d0a4eca5ca0b6c539ad7649 /phpBB/includes | |
parent | 226376c573d5e5923bb325e5e5af2ca1d2239f4d (diff) | |
download | forums-79b8ecad4ddf1b023b9100afa623e8c0f8981e79.tar forums-79b8ecad4ddf1b023b9100afa623e8c0f8981e79.tar.gz forums-79b8ecad4ddf1b023b9100afa623e8c0f8981e79.tar.bz2 forums-79b8ecad4ddf1b023b9100afa623e8c0f8981e79.tar.xz forums-79b8ecad4ddf1b023b9100afa623e8c0f8981e79.zip |
[ticket/12060] Add acp event core.acp_bbcodes_display_form
Modify bbcode template data before we display the form
PHPBB3-12060
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 43787922f6..2a71fbf779 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -334,15 +334,33 @@ class acp_bbcodes break; } - $template->assign_vars(array( - 'U_ACTION' => $this->u_action . '&action=add') + $this_u_action = $this->u_action; + + $template_data = array( + 'U_ACTION' => $this->u_action . '&action=add', ); $sql = 'SELECT * FROM ' . BBCODES_TABLE . ' ORDER BY bbcode_tag'; + + /** + * Modify bbcode template data before we display the form + * + * @event core.acp_bbcodes_display_form + * @var string action Type of the action: modify|create + * @var string sql SQL statement to get bbcode data + * @var array template_data Array with form template data + * @var object this_u_action $this->u_action object + * @since 3.1-A3 + */ + $vars = array('action', 'sql', 'template_data', 'this_u_action'); + extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_display_form', compact($vars))); + $result = $db->sql_query($sql); + $template->assign_vars($template_data); + while ($row = $db->sql_fetchrow($result)) { $template->assign_block_vars('bbcodes', array( |