aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/functions_display.php
diff options
context:
space:
mode:
authorrxu <rxu@mail.ru>2014-06-07 17:55:38 +0800
committerrxu <rxu@mail.ru>2014-06-08 16:32:28 +0800
commitd5865e316c01cf6331a86b2d77dab5380c317cb8 (patch)
treead8bd26801a6c7e35d1ce6aa7ce028da2a2890e4 /phpBB/includes/functions_display.php
parentfc4275ab2b414e184007a8791c7ee09537d5a827 (diff)
downloadforums-d5865e316c01cf6331a86b2d77dab5380c317cb8.tar
forums-d5865e316c01cf6331a86b2d77dab5380c317cb8.tar.gz
forums-d5865e316c01cf6331a86b2d77dab5380c317cb8.tar.bz2
forums-d5865e316c01cf6331a86b2d77dab5380c317cb8.tar.xz
forums-d5865e316c01cf6331a86b2d77dab5380c317cb8.zip
[ticket/12669] Add core event to the function display_forums()
Add core event to the function display_forums() in includes/functions_display.php to allow assigning additional template data for every forum, f.e. additional forumrow subloops. PHPBB3-12669
Diffstat (limited to 'phpBB/includes/functions_display.php')
-rw-r--r--phpBB/includes/functions_display.php22
1 files changed, 22 insertions, 0 deletions
diff --git a/phpBB/includes/functions_display.php b/phpBB/includes/functions_display.php
index ea5ff08c01..5d3bd1fab6 100644
--- a/phpBB/includes/functions_display.php
+++ b/phpBB/includes/functions_display.php
@@ -589,6 +589,28 @@ function display_forums($root_data = '', $display_moderators = true, $return_mod
);
}
+ /**
+ * Modify and/or assign additional template data for the forum
+ * after forumrow loop has been assigned. This can be used
+ * to create additional forumrow subloops in extensions.
+ *
+ * This event is triggered once per forum
+ *
+ * @event core.display_forums_add_template_data
+ * @var array forum_row Template data of the forum
+ * @var array row The data of the forum
+ * @var array subforums_list The data of subforums
+ * @var bool catless The flag indicating whether a forum has a parent category
+ * @since 3.1.0-b5
+ */
+ $vars = array(
+ 'forum_row',
+ 'row',
+ 'subforums_list',
+ 'catless',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.display_forums_add_template_data', compact($vars)));
+
$last_catless = $catless;
}