diff options
author | Marc Alexander <admin@m-a-styles.de> | 2015-08-22 08:49:21 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2015-08-22 08:49:21 +0200 |
commit | 2d24b9b61f16803371f36f7dbedc1e847d087383 (patch) | |
tree | d27c435d1b04017556770cf0f3493109d52fbfd0 | |
parent | ccd1e1eebb328172976f997646b88c7968f85b69 (diff) | |
parent | 9e467a4e4a9a39b941b340481e7c0ff4d6dc7a9a (diff) | |
download | forums-2d24b9b61f16803371f36f7dbedc1e847d087383.tar forums-2d24b9b61f16803371f36f7dbedc1e847d087383.tar.gz forums-2d24b9b61f16803371f36f7dbedc1e847d087383.tar.bz2 forums-2d24b9b61f16803371f36f7dbedc1e847d087383.tar.xz forums-2d24b9b61f16803371f36f7dbedc1e847d087383.zip |
Merge pull request #3813 from rxu/ticket/14072
[ticket/14072] Add core event to the function format_display()
-rw-r--r-- | phpBB/includes/message_parser.php | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php index 8b3d8d9fd5..e63f6b822b 100644 --- a/phpBB/includes/message_parser.php +++ b/phpBB/includes/message_parser.php @@ -1301,6 +1301,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); + if ($this->message_status == 'plain') { // Force updating message - of course. |