-
New Feature
-
Resolution: Fixed
-
Minor
-
3.1.0-b3
-
None
An event should be triggered before a post/topic is created allowing extensions to do additional error checking and validation.
In posting.php at line 1115 the following could be added:
/**
|
* This event is used for performing additional checks before a post/topic is created.
|
*
|
* The only action that should be altered is $error array.
|
*
|
* @event core.submit_post_end
|
* @var string mode The current editing mode
|
* @var array post_data The data submitted
|
* @var array error The array of errors
|
* @since 3.1.0-b4
|
*/
|
$vars = array(
|
'mode',
|
'post_data',
|
'error',
|
);
|
extract($phpbb_dispatcher->trigger_event('core.submit_post_data_error_check', compact($vars)));
|
|
// Store message, sync counters
|
if (!sizeof($error) && $submit) ....
|
Any additional variables you think is important could be added, but for most extensions just being able to change the error variable based on the data submitted should be enough.