Blog

Version 3.20 Released

Tournamatch version 3.20 is now available.

Highlights

  • Massive rewrite of the data access layer.
  • Removed several legacy and proprietary classes from our source code

Data Access Layer Rewrite

If there was an award for “Least Sexy Update”, this release would be the Tom Brady of Tournamatch updates (Go Bucs!). Kicking off the major highlights for version 3.20 is a complete rewrite of our data access layer. Tournamatch no longer uses the proprietary MySQLi proprietary adapter classes for database access. Every call has been replaced with the native WordPress database access abstraction.

Why is this relevant? For quite a few reasons, actually. Security is the biggest reason. Every applicable query is now sanitized using the methods vetted by the WordPress community. Using the WordPress database access abstraction also causes Tournamatch queries to show up in debugging and performance analysis plugins. It supports more code features which should reduce code in the software (less is more), has caching mechanisms, and this moves us one step further to supporting multisite setups.

Legacy Code Scrub

To piggy back off of the above change, this release removed several legacy proprietary solutions for things like file uploads, script hooks, and data access. As much as we love to write code, writing proprietary code is generally a bad thing. Using native code that has been vetted by the WordPress means Tournamatch is more secure, easier to extend, and easier to develop moving forward.

Reviewing 2020

The year 2020 was like no other for a lot of us. When I look back, I can’t help but think about the World of Warcraft achievement, What a Long, Strange Trip it’s Been. This is one of my favorite WoW achievements. Each special event has to be completed for an entire year to earn it; so, you not only have to invest a lot of time, but also consistently. This year-long journey of unique challenges could also describe this past year. Whether it was adjusting to a work from home atmosphere, publishing new updates, or working in uncharted development territory; the year was a long consistent grind.

I’m quite pleased with what we were able to accomplish in 2020. We released 16 updates covering: privacy, security, better appearance for BootStrap, many new shortcodes, 6 new widgets, new team management options and tools for admins, new tournament management features, an entirely new player dashboard, completely reworked the match reporting and confirmation screens for consistency, added support for custom player profile and social icon fields, updated FontAwesome to use version 5, updated the database to support MySQL 8, and improved almost ever page with asynchronous behavior. We also hired our first (non-family) employee! And while we didn’t quite get as far as I hoped we would, we kept busy and improved the software significantly.

This year should be exciting for us. I have some ambitious goals again this year for Tournamatch. My primary focus is to replace all of our proprietary database tables with custom post types. The end result is software which may be more easily integrated with other WordPress plugins and the ability to develop new Tournamatch features more quickly. There are quite a bit of indirect advantages of this change – too many to hash out here. Almost all of our work over the last 1.5 years has centered around this ultimate change. I think we’ll get there this year. I sincerely appreciate the patience while we take care of some important backend business.

If I could tweak my achievement for 2020, I’d shorten it to just, “What a Long Trip it’s Been.” And I should emphasize that I am now completely okay with long. This past year has taught me that long is fine. Terrific. I honestly hope for many more long slow-moving years. Time goes by too quick and there isn’t enough time left in the universe for me to spend with Little Tournamatch. Twenty-twenty also marked a tragic year for my family; our second child, Jayden, was born in June and experienced several complications which ultimately led to his passing eight days after birth. Life is a precious gift and much too short.

Thank you for your support in 2020, and take care.

Admins may manually add players to teams.

Version 3.19 Released

Tournamatch version 3.19 is now available.

Highlights

  • Improved match management
  • Improved security of i18n/i10n translations
  • Added ability for an admin to add players to teams
  • Added ability for admin to add players or teams to tournaments
  • Reduced plugin size

Improved Match Management

Match management for users now requires fewer pages and clicks to save and confirm. In addition, the match report and confirm pages for ladders and tournaments are now identical. Tournaments now also have the ability to rate the opponent, report team match players, report scores, and attach files.

Improved Security for i18n/i10n

All i18n translations have been properly escaped in version 3.19. This security vulnerability is only relevant if you use a Tournamatch language translation file written by another [nefarious] user.

Admin Team Management

This update includes a new ability for admins to manually add players to teams. To do this, you must be logged in as admin and view the team profile page for whichever team you wish to modify. The input box to enter a player name is located below the team roster table.

Admin Tournament Registration

Another new admin feature in this update is the ability for admins to manually add players or teams to an event. This may be done via the backend Tournament Administration screen. Click on the users icon on the line corresponding to the tournament for which you wish to add competitors.

Reduced Plugin Size

One of the primary focuses this year was to remove all third-party source code dependencies. We finally achieved this milestone in version 3.19.0. As a result, the plugin size is approximately 58% smaller than before. This change isn’t just about download size. Removing third party code libraries means less exposure to potential code vulnerabilities in packages not maintained by the WordPress community.

Add players to a tournament in bulk via email.

Version 3.18 Released

Tournamatch version 3.18 is now available.

Highlights

  • New admin bulk registration
  • New leave ladder option for users
  • Edit profile password fields
  • FontAwesome upgraded to 5
  • Numerous bug fixes

New Admin Bulk Registration

You may now populate tournaments in bulk from a list of email addresses using the new admin bulk registration feature. This is a tremendously helpful feature for admins running fully-managed events. We should have a comprehensive guide for setting up this type of solution in the days to come.

New Leave Ladder Option for Users

When enabled, users may now leave a ladder. A user would previously have to request an admin to remove them from a ladder. Keep in mind that this will erase any ladder standings data associated with this user. Allowing users to leave may result in standings reset abuse; however, we added this feature anyways at the request of many customers. The option is disabled by default.

Edit Profile Password Fields

Users now never need to touch the WordPress user dashboard. One of the best parts about WordPress is how easy it is to completely transform the appearance of a website using templates. Unfortunately, templates don’t typically touch the WordPress Dashboard section. Before version 3.18, a user would previously have to leave the “styled” website and visit the user dashboard to reset his or her password. This is no longer necessary because edit profile screen now also includes the edit password field.

FontAwesome Upgraded to 5

Front end screens now use FontAwesome 5. FontAwesome 5 supports thousands more icons than version 4, including countless brand icons. This change should be mostly transparent to your community. The biggest immediate advantage is that site admins now have more branded icons for custom player profile icons.

Bug Fixes

A big part of this release was focused on bug fixing. Tournamatch should work as expected – better than it ever has! Please open a support ticket or shoot us an email if you ever run into any issues.

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.

Player Profile Social Icons

In the version 3.16 update, we introduced the ability to filter social icons in player profiles. Social icons are the linkable icons that appear in the screenshot below:

Steam icon available after snippet.

By default, Tournamatch supports Facebook, Homepage, Twitch, Twitter, and YouTube. These social icon fields appear as configurable options to your users when he or she edits their player profile:

You may modify the social icons available to your users by adding extending Tournamatch with custom code which filters the default list. Filtering this list is easy, and you should read how to extend a plugin in WordPress if you have never done so before.

A social icon in Tournamatch requires three fields: display_name, icon, and input_type. The display_name is the pretty name displayed to the user when editing his or her profile, the icon field is the name of the FontAwesome icon which will be displayed linkable in the public profile, and the input_type is text. You can look up any applicable social media icon on this page under the brand section.

In the screenshot below, the sample code adds the social media icons Instagram and Steam to the default list. Pay special attention to the function array_merge. Using this adds your icons to the list of defaults already given.

Custom Player Profile Social Icons Code

Add a filter for ‘trn_player_social_icon_fields’ to modify the social icons displayed to the user.

How to Extend a Plugin in WordPress with a Filter Hook

Extending a plugin in WordPress may seem foreign if you have never done so; however, it is actually a simple task for most filter hooks. What is a filter hook? A filter hook is just the technical way of saying, “Here is some content we will display to the user or save to the database.” The most important thing to consider when writing your own filter hook is where you add this code. If you add this code in the wrong place, an update to WordPress or the plugin you are extending may overwrite your edit. You should strive to keep your website as up-to-date as possible, and having an update overwrite your changes generally discourages updates. Three safe ways to extend a plugin in WordPress with a filter hook include using another plugin such as Code Snippets, by creating a custom plugin, or by creating a child theme. I recommend going the first route which is detailed below.

Using a Filter Hook Plugin

The easiest way to extend a plugin is by using another plugin such as Code Snippets. This is the easiest method because it doesn’t require you to modify any code on the back end, use file transfer, or code editors. Code Snippets provides a simple GUI interface in your WordPress admin for managing action hooks, filter hooks, and custom shortcodes.

Using the player social icons filter we introduced in the Version 3.16 update as an example, here is how you would add a Steam icon to the existing set using Code Snippets:

1. Download and activate Code Snippets.
2. Paste the code into the box as pictured in the screenshot below.
3. Click save.

How to Extend a Plugin with Code Snippets

How to Extend a Plugin with Code Snippets

With this complete, players will now also see a steam icon in their player profile and a future WordPress or Tournamatch update shouldn’t affect your change.

Steam icon available after snippet.

Steam icon available after snippet.

Version 3.16 Released

Tournamatch version 3.16 is now available.

Highlights

  • Custom player profile social icon fields.
  • Custom player profile text fields.
  • Online Statistics Widget
  • More Asynchronous behavior
  • Match table CSS

Custom Player and Player Social icon fields

What a long overdue but excited to finally have feature. In 3.16, it’s now possible to extend the available player profile fields your users may input for both the social icons and the text-displayed items. You can do this by hooking into two new WordPress filters. Using these two new filters allows you to make these customizations *without* losing your changes on subsequent updates. The plan is to expand upon this filter in the future with additional functionality, but the basics for simple text or social icons is set and shouldn’t change. We updated our documentation
to demonstrate how to extend both filters, so check it out.

Online Statistics Widget

New Online Statistics Widget

New Online Statistics Widget

A new widget which displays online user and visitor activity is now available. This neat little widget displays data about recently registered users, guest and registered user visitor information, and which users are currently online.

More Asynchronous Behavior

We continued our initiative to rewrite as many pages as possible to behave asynchronously. In this update, player profile, team profile, and competitor check were all updated. The end goal here is to reduce the amount of front end code and front end logic (outside of JavaScript) which will make it easier to template everything.

Match table CSS

Player and team profile match history now also includes table row CSS for wins and losses you may style. Using WordPress -> Customize Appearance -> Additional CSS, you can color the rows to indicate win, losses, and draws.

Use CSS to color wins, losses, or ties on player and team profile pages.

Use CSS to color wins, losses, or ties on player and team profile pages.

Click activate in the WordPress plugins section.

How to install Tournamatch via WordPress

One of the easiest ways to install Tournamatch is to use the WordPress dashboard. Using this feature requires that file uploads are enabled on your web host and also that the plugin you want to upload is less than the file upload limit. Tournamatch is only about 1.5 mb and the default for most hosts is 2 mb; so, you should be able to install Tournamatch from the dashboard. After downloading the plugin and logging in to your admin, follow the steps below to install:

Navigate to plugins and click Add New.

Click the Add New button to install a new plugin.

Click the Add New button to install a new plugin.

Click Upload Plugin.

Click the upload plugin button to install a new plugin.

Click the upload plugin button to install a new plugin.

Click Choose File to select the file you downloaded, and then click Install Now.

Browse for to select the file and then click Install Now.

Browse for to select the file and then click Install Now.

Once uploaded, you still need to activate the plugin. Navigate to the list of plugins, find Tournamatch in the list, and click the Activate link.
Click activate in the WordPress plugins section.