aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/functions.php16
-rw-r--r--phpBB/includes/mcp/mcp_forum.php24
-rw-r--r--phpBB/includes/ucp/ucp_register.php10
3 files changed, 49 insertions, 1 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php
index 82aa91429c..fff55d993e 100644
--- a/phpBB/includes/functions.php
+++ b/phpBB/includes/functions.php
@@ -4823,7 +4823,7 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
{
global $user, $config, $cache, $phpbb_root_path, $phpEx;
global $request;
- global $phpbb_container;
+ global $phpbb_container, $phpbb_dispatcher;
if (!$config['allow_avatar'] && !$ignore_config)
{
@@ -4884,6 +4884,20 @@ function phpbb_get_avatar($row, $alt, $ignore_config = false, $lazy = false)
'alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
}
+ /**
+ * Event to modify HTML <img> tag of avatar
+ *
+ * @event core.get_avatar_after
+ * @var array row Row cleaned by \phpbb\avatar\manager::clean_row
+ * @var string alt Optional language string for alt tag within image, can be a language key or text
+ * @var bool ignore_config Ignores the config-setting, to be still able to view the avatar in the UCP
+ * @var array avatar_data The HTML attributes for avatar <img> tag
+ * @var string html The HTML <img> tag of generated avatar
+ * @since 3.1.6-RC1
+ */
+ $vars = array('row', 'alt', 'ignore_config', 'avatar_data', 'html');
+ extract($phpbb_dispatcher->trigger_event('core.get_avatar_after', compact($vars)));
+
return $html;
}
diff --git a/phpBB/includes/mcp/mcp_forum.php b/phpBB/includes/mcp/mcp_forum.php
index c18ca1aa1d..157134b09e 100644
--- a/phpBB/includes/mcp/mcp_forum.php
+++ b/phpBB/includes/mcp/mcp_forum.php
@@ -77,6 +77,30 @@ function mcp_forum_view($id, $mode, $action, $forum_info)
break;
}
+ /**
+ * Get some data in order to execute other actions.
+ *
+ * @event core.mcp_forum_view_before
+ * @var string action The action
+ * @var array forum_info Array with forum infos
+ * @var int start Start value
+ * @var array topic_id_list Array of topics ids
+ * @var array post_id_list Array of posts ids
+ * @var array source_topic_ids Array of source topics ids
+ * @var int to_topic_id Array of destination topics ids
+ * @since 3.1.6-RC1
+ */
+ $vars = array(
+ 'action',
+ 'forum_info',
+ 'start',
+ 'topic_id_list',
+ 'post_id_list',
+ 'source_topic_ids',
+ 'to_topic_id',
+ );
+ extract($phpbb_dispatcher->trigger_event('core.mcp_forum_view_before', compact($vars)));
+
$pagination = $phpbb_container->get('pagination');
$selected_ids = '';
diff --git a/phpBB/includes/ucp/ucp_register.php b/phpBB/includes/ucp/ucp_register.php
index 0ee45b0706..3426af95d0 100644
--- a/phpBB/includes/ucp/ucp_register.php
+++ b/phpBB/includes/ucp/ucp_register.php
@@ -176,6 +176,16 @@ class ucp_register
}
unset($lang_row);
+ /**
+ * Allows to modify the agreements.
+ *
+ * To assign data to the template, use $template->assign_vars()
+ *
+ * @event core.ucp_register_agreement
+ * @since 3.1.6-RC1
+ */
+ $phpbb_dispatcher->dispatch('core.ucp_register_agreement');
+
$this->tpl_name = 'ucp_agreement';
return;
}