diff options
author | Matt Friedman <maf675@gmail.com> | 2013-12-04 16:39:10 -0800 |
---|---|---|
committer | Matt Friedman <maf675@gmail.com> | 2013-12-04 16:39:10 -0800 |
commit | a4d20d988bdaf17131124d3f2ae618cf154d946b (patch) | |
tree | f4f1bc7cfd2e3ee5e966126f4dfb298db385afc3 /phpBB/includes | |
parent | bd8c444c12f2bfeea957584559276e822807a01a (diff) | |
download | forums-a4d20d988bdaf17131124d3f2ae618cf154d946b.tar forums-a4d20d988bdaf17131124d3f2ae618cf154d946b.tar.gz forums-a4d20d988bdaf17131124d3f2ae618cf154d946b.tar.bz2 forums-a4d20d988bdaf17131124d3f2ae618cf154d946b.tar.xz forums-a4d20d988bdaf17131124d3f2ae618cf154d946b.zip |
[ticket/12060] Add acp event core.acp_bbcodes_edit_add
Modify bbcode template before we display the add/edit form
PHPBB3-12060
Diffstat (limited to 'phpBB/includes')
-rw-r--r-- | phpBB/includes/acp/acp_bbcodes.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/phpBB/includes/acp/acp_bbcodes.php b/phpBB/includes/acp/acp_bbcodes.php index 575ac84012..1f07b39600 100644 --- a/phpBB/includes/acp/acp_bbcodes.php +++ b/phpBB/includes/acp/acp_bbcodes.php @@ -96,7 +96,7 @@ class acp_bbcodes case 'edit': case 'add': - $template->assign_vars(array( + $tpl_ary = array( 'S_EDIT_BBCODE' => true, 'U_BACK' => $this->u_action, 'U_ACTION' => $this->u_action . '&action=' . (($action == 'add') ? 'create' : 'modify') . (($bbcode_id) ? "&bbcode=$bbcode_id" : ''), @@ -105,9 +105,23 @@ class acp_bbcodes 'BBCODE_MATCH' => $bbcode_match, 'BBCODE_TPL' => $bbcode_tpl, 'BBCODE_HELPLINE' => $bbcode_helpline, - 'DISPLAY_ON_POSTING' => $display_on_posting) + 'DISPLAY_ON_POSTING' => $display_on_posting, ); + /** + * Modify bbcode template before we display the add/edit form + * + * @event core.acp_bbcodes_edit_add + * @var string action Type of the action: add|edit + * @var array tpl_ary Array with bbcodes add/edit data + * @var int bbcode_id The id of the bbcode (being edited) + * @since 3.1-A3 + */ + $vars = array('action', 'tpl_ary', 'bbcode_id'); + extract($phpbb_dispatcher->trigger_event('core.acp_bbcodes_edit_add', compact($vars))); + + $template->assign_vars($tpl_ary); + $bbcode_tokens = array('TEXT', 'SIMPLETEXT', 'INTTEXT', 'IDENTIFIER', 'NUMBER', 'EMAIL', 'URL', 'LOCAL_URL', 'RELATIVE_URL', 'COLOR'); foreach ($bbcode_tokens as $token) { |