1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 03:54:10 +01:00

[feature/events] Adding ledge display_custom_bbcodes_row

Used by phpBB Gallery

PHPBB3-9550
This commit is contained in:
Joas Schilling 2012-03-16 11:21:12 +01:00
parent ddcd189006
commit 69407cae7b

View File

@ -850,7 +850,7 @@ function topic_status(&$topic_row, $replies, $unread_topic, &$folder_img, &$fold
*/
function display_custom_bbcodes()
{
global $db, $template, $user;
global $db, $template, $user, $phpbb_dispatcher;
// Start counting from 22 for the bbcode ids (every bbcode takes two ids - opening/closing)
$num_predefined_bbcodes = 22;
@ -870,13 +870,20 @@ function display_custom_bbcodes()
$row['bbcode_helpline'] = $user->lang[strtoupper($row['bbcode_helpline'])];
}
$template->assign_block_vars('custom_tags', array(
$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_HELPLINE' => $row['bbcode_helpline'],
'A_BBCODE_HELPLINE' => str_replace(array('&amp;', '&quot;', "'", '&lt;', '&gt;'), array('&', '"', "\'", '<', '>'), $row['bbcode_helpline']),
));
);
$vars = array('custom_tags', 'row');
$event = new phpbb_event_data(compact($vars));
$phpbb_dispatcher->dispatch('core.display_custom_bbcodes_row', $event);
extract($event->get_data_filtered($vars));
$template->assign_block_vars('custom_tags', $custom_tags);
$i++;
}