mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-11 11:13:59 +02:00
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 ...
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
Reference in New Issue
Block a user