diff options
Diffstat (limited to 'phpBB')
-rw-r--r-- | phpBB/docs/events.md | 16 | ||||
-rw-r--r-- | phpBB/includes/message_parser.php | 23 | ||||
-rw-r--r-- | phpBB/styles/prosilver/template/mcp_topic.html | 6 | ||||
-rw-r--r-- | phpBB/styles/subsilver2/template/mcp_topic.html | 2 |
4 files changed, 45 insertions, 2 deletions
diff --git a/phpBB/docs/events.md b/phpBB/docs/events.md index 9063d8e175..338bc9f1e9 100644 --- a/phpBB/docs/events.md +++ b/phpBB/docs/events.md @@ -600,6 +600,22 @@ mcp_post_additional_options * Since: 3.1.5-RC1 * Purpose: Add content within the list of post moderation actions +mcp_topic_options_after +=== +* Locations: + + styles/prosilver/template/mcp_topic.html + + styles/subsilver2/template/mcp_topic.html +* Since: 3.1.6-RC1 +* Purpose: Add some options (field, checkbox, ...) after the subject field when split a subject + +mcp_topic_options_before +=== +* Locations: + + styles/prosilver/template/mcp_topic.html + + styles/subsilver2/template/mcp_topic.html +* Since: 3.1.6-RC1 +* Purpose: Add some options (field, checkbox, ...) before the subject field when split a subject + mcp_topic_topic_title_after === * Locations: 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. diff --git a/phpBB/styles/prosilver/template/mcp_topic.html b/phpBB/styles/prosilver/template/mcp_topic.html index 25f865e054..c21b676370 100644 --- a/phpBB/styles/prosilver/template/mcp_topic.html +++ b/phpBB/styles/prosilver/template/mcp_topic.html @@ -54,10 +54,12 @@ </dl> <!-- ENDIF --> + <!-- EVENT mcp_topic_options_before --> <dl> <dt><label for="subject">{L_SPLIT_SUBJECT}{L_COLON}</label></dt> <dd><input type="text" name="subject" id="subject" size="45" maxlength="124" tabindex="2" value="{SPLIT_SUBJECT}" title="{L_SPLIT_SUBJECT}" class="inputbox" /></dd> </dl> + <!-- EVENT mcp_topic_options_after --> <dl> <dt><label>{L_SPLIT_FORUM}{L_COLON}</label></dt> <dd><select name="to_forum_id">{S_FORUM_SELECT}</select></dd> @@ -153,9 +155,9 @@ <div class="action-bar bottom"> <div class="pagination"> {TOTAL_POSTS} - <!-- IF .pagination --> + <!-- IF .pagination --> <!-- INCLUDE pagination.html --> - <!-- ELSE --> + <!-- ELSE --> • {PAGE_NUMBER} <!-- ENDIF --> </div> diff --git a/phpBB/styles/subsilver2/template/mcp_topic.html b/phpBB/styles/subsilver2/template/mcp_topic.html index 25c8181ddc..7d54510cee 100644 --- a/phpBB/styles/subsilver2/template/mcp_topic.html +++ b/phpBB/styles/subsilver2/template/mcp_topic.html @@ -10,10 +10,12 @@ <tr> <td class="row2" colspan="3" align="center"><span class="gensmall">{L_SPLIT_TOPIC_EXPLAIN}</span></td> </tr> + <!-- EVENT mcp_topic_options_before --> <tr> <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_SUBJECT}</span></td> <td class="row2" colspan="2"><input class="post" style="width: 350px" type="text" size="35" maxlength="124" name="subject" value="{SPLIT_SUBJECT}" /></td> </tr> + <!-- EVENT mcp_topic_options_after --> <tr> <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td> <td class="row2" colspan="2"><select name="to_forum_id">{S_FORUM_SELECT}</select></td> |