aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes
diff options
context:
space:
mode:
Diffstat (limited to 'phpBB/includes')
-rw-r--r--phpBB/includes/message_parser.php23
-rw-r--r--phpBB/includes/ucp/ucp_activate.php13
2 files changed, 35 insertions, 1 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index 5afbe5062e..c50212e8ff 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -1349,6 +1349,29 @@ class parse_message extends bbcode_firstpass
$return_message = &$this->message;
}
+ $text = $this->message;
+ $uid = $this->bbcode_uid;
+
+ /**
+ * Event to modify the text before it is parsed
+ *
+ * @event core.modify_format_display_text_before
+ * @var string text The message text to parse
+ * @var string uid The bbcode uid
+ * @var bool allow_bbcode Do we allow bbcodes
+ * @var bool allow_magic_url Do we allow magic urls
+ * @var bool allow_smilies Do we allow smilies
+ * @var bool update_this_message Do we update the internal message
+ * with the parsed result
+ * @since 3.1.6-RC1
+ */
+ $vars = array('text', 'uid', 'allow_bbcode', 'allow_magic_url', 'allow_smilies', 'update_this_message');
+ extract($phpbb_dispatcher->trigger_event('core.modify_format_display_text_before', compact($vars)));
+
+ $this->message = $text;
+ $this->bbcode_uid = $uid;
+ unset($text, $uid);
+
// NOTE: message_status is unreliable for detecting unparsed text because some callers
// change $this->message without resetting $this->message_status to 'plain' so we
// inspect the message instead
diff --git a/phpBB/includes/ucp/ucp_activate.php b/phpBB/includes/ucp/ucp_activate.php
index f535073434..5bfb688d3a 100644
--- a/phpBB/includes/ucp/ucp_activate.php
+++ b/phpBB/includes/ucp/ucp_activate.php
@@ -30,7 +30,7 @@ class ucp_activate
function main($id, $mode)
{
global $config, $phpbb_root_path, $phpEx, $request;
- global $db, $user, $auth, $template, $phpbb_container, $phpbb_log;
+ global $db, $user, $auth, $template, $phpbb_container, $phpbb_log, $phpbb_dispatcher;
$user_id = $request->variable('u', 0);
$key = $request->variable('k', '');
@@ -150,6 +150,17 @@ class ucp_activate
}
}
+ /**
+ * This event can be used to modify data after user account's activation
+ *
+ * @event core.ucp_activate_after
+ * @var array user_row Array with some user data
+ * @var string message Language string of the message that will be displayed to the user
+ * @since 3.1.6-RC1
+ */
+ $vars = array('user_row', 'message');
+ extract($phpbb_dispatcher->trigger_event('core.ucp_activate_after', compact($vars)));
+
meta_refresh(3, append_sid("{$phpbb_root_path}index.$phpEx"));
trigger_error($user->lang[$message]);
}