aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/viewonline.php
diff options
context:
space:
mode:
authorMatt Friedman <maf675@gmail.com>2014-09-09 09:14:32 -0700
committerMatt Friedman <maf675@gmail.com>2014-09-09 09:14:32 -0700
commitc56c0fce0dae103cc12f6786f20bedde24600bf0 (patch)
treeb698de14583cea89ebdc47d1bd42bd35aa6d51d7 /phpBB/viewonline.php
parentc6fc455432a9f8df5849176c6d72b03144f319e4 (diff)
downloadforums-c56c0fce0dae103cc12f6786f20bedde24600bf0.tar
forums-c56c0fce0dae103cc12f6786f20bedde24600bf0.tar.gz
forums-c56c0fce0dae103cc12f6786f20bedde24600bf0.tar.bz2
forums-c56c0fce0dae103cc12f6786f20bedde24600bf0.tar.xz
forums-c56c0fce0dae103cc12f6786f20bedde24600bf0.zip
[ticket/13051] Add a new core event to handle the template array
PHPBB3-13051
Diffstat (limited to 'phpBB/viewonline.php')
-rw-r--r--phpBB/viewonline.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/phpBB/viewonline.php b/phpBB/viewonline.php
index a03a81a15e..a0ba0f88d5 100644
--- a/phpBB/viewonline.php
+++ b/phpBB/viewonline.php
@@ -372,7 +372,7 @@ while ($row = $db->sql_fetchrow($result))
$vars = array('on_page', 'row', 'location', 'location_url', 'forum_data');
extract($phpbb_dispatcher->trigger_event('core.viewonline_overwrite_location', compact($vars)));
- $template->assign_block_vars('user_row', array(
+ $template_row = array(
'USERNAME' => $row['username'],
'USERNAME_COLOUR' => $row['user_colour'],
'USERNAME_FULL' => $username_full,
@@ -389,7 +389,22 @@ while ($row = $db->sql_fetchrow($result))
'S_USER_HIDDEN' => $s_user_hidden,
'S_GUEST' => ($row['user_id'] == ANONYMOUS) ? true : false,
'S_USER_TYPE' => $row['user_type'],
- ));
+ );
+
+ /**
+ * Modify viewonline template data before it is displayed in the list
+ *
+ * @event core.viewonline_modify_display
+ * @var array on_page File name and query string
+ * @var array row Array with the users sql row
+ * @var array forum_data Array with forum data
+ * @var array template_row Array with template variables for the user row
+ * @since 3.1.0-RC4
+ */
+ $vars = array('on_page', 'row', 'forum_data', 'template_row');
+ extract($phpbb_dispatcher->trigger_event('core.viewonline_modify_display', compact($vars)));
+
+ $template->assign_block_vars('user_row', $template_row);
}
$db->sql_freeresult($result);
unset($prev_id, $prev_ip);