Monthly Archives - September 2020

How to Filter Email Messages

Tournamatch sends out dozens of email notifications for activities and events. Competitors receive an email notification when a match report needs to be confirmed, when a tournament starts, for team membership requests, and many more. In some cases, you may wish to limit the emails sent to users. This article demonstrates a short snippet of code to filter out email messages sent by Tournamatch.

Depending on your use case for Tournamatch, you may wish to prevent certain emails from hitting a users inbox. For example, suppose you want to run everything manually or you don’t want users to attempt to confirm matches. Or maybe you want to send out a different tournament announcement email when your event starts. By applying a filter to the hook trn_core_email_message, you may remove any message from the list of messages supported. Here’s a sample snippet below using the Code Snippets plugin we reviewed in our How to Extend a Plugin in WordPress with a Filter Hook blog:

Filter email messages to users.
Filter email messages to users.

Once this code is saved and activated, email messages for ‘tournament_started’ and ‘tournament_match_set’ will no longer go out to competitors. Check out our email messages filter documentation for a complete list of all email messages currently supported. Using this feature requires at least version 3.17 of Tournamatch.

Version 3.17 Released

Tournamatch version 3.17 is now available.

Highlights

  • Clone ladder and tournament events
  • Host Tournamatch as a child page
  • Full Admin i18n
  • New options and filters

Clone Ladder and Tournament Events

Creators of multi-region events rejoice! You can clone an existing ladder or tournament which will create a new event with an edited titled and the exact same settings as the event cloned. The icon to accomplish this is located in the all ladder/all tournament screen.

Clone ladder or tournament link.

Clone ladder or tournament link.

Host Tournamatch as a Child page

Hosting Tournamatch in a child directory (child page) is now possible and works as expected. There is no additional setting to use this feature. Tournamatch now correctly determines the correct URL path and behaves as expected. Hooray for ‘just works’!

Full Admin i18n

The administrative section in Tournamatch is now fully internationalization (i18n) compatible. An updated .pot file has also been included for your localization (l10n) pleasure.

New Options and Filters

There is a new option to disable the extra double elimination match for tournaments in version 3.17. When the winner of the winner’s side faces off against the top seeded player from the loser’s bracket, a win for the first seed ends the tournament. If the first seed loses, then an extra match is necessary to determine the winner because this is that competitors first loss. This new option will disable that match for those that wish to do so.

In addition, you may also now filter the email messages Tournamatch sends to users and admins. A complete list of messages may be found here and steps to add a filter are here.