Time for another phpBB hook, this time the aim is to remove the messages which irritate some people when a post has been made and instead redirect the user immediately to the default choice. A few considerations had to be made with this, firstly the administration panel is off limits as this uses messages for success and failure in some places. Secondly any page which goes back to itself by default is made confusing if there isn’t a confirmation, so these aren’t automatically redirected; a good example of this being the UCP preferences.
This change exploits phpBB’s hook system which allows us to execute custom code in certain phpBB functions/methods without modifying any files. To do this we need to create a new file in our phpBB installation in the
includes/hooks/ directory, the file name must begin with
hook_ and end with your PHP extension (usually
.php.) So, basically you need to drop the below file into your
includes/hooks/ directory and purge the board cache, job done!