MSTW Schedules & Scoreboards 1.3 Patch

There was a bug in Schedules & Scoreboards v1.3 that generates a fatal error when you access your dashboard. (You will NOT see if you have the MSTW CSV Exporter plugin installed.) It has been patched in version 1.3 WITHOUT a version change, and in the development trunk. If you have already installed version 1.3, simply delete it and re-install it. If you want to load the patch without deleting and re-installing the entire plugin, simply update the plugin’s mstw-ss-admin.php file in the /includes directory with the same file from the development trunk or the new version 1.3. Sorry for the inconvenience.

MSTW Schedules & Scoreboard v1.3

Single Game SliderVersion 1.3 of the Schedules & Scoreboards plugin was released today. It is largely a maintenance build, but it also provides a cool new feature for users/admins who write custom CSS rules for their site, and better control of home game styling.

  • The CSS stylesheet loading logic changed, so customizations can be loaded from a file separate from the plugin’s /css/mstw-ss-styles.css stylesheet. So your site’s custom styles can be stored separately from the plugin’s stylesheet, simplifying the plugin upgrade process. Learn how to utilize this new feature here.
  • Added CSS elements for home games to all widgets & shortcodes, which provide improved ability to customize the display of home games.
  • Schedule sliders displaying only one game now “slide” correctly. Fixed bug in the related JavaScript.
  • Added four team color settings on the Edit Team admin screen, which will be used in the next release of Team Rosters. (More to follow on this one.)
  • The Settings link on the Plugins screen now links to the correct location.
  • Removed some annoying PHP notices from the CDT widget. Please let me know if you come across PHP notices or warnings in the plugin.
  • HEY, wait a minute! I thought you were working on a really cool new Team Rosters release? Yup, I sure am. I reached the point where I needed to add the team color data fields, so I fixed the other issues ‘on the list’ while I was in there. Team Rosters is moving along with lots of cool new features, not to mention maybe one bug fix :). I’m still shooting for an early summer release. Look for a progress update in the next week or two.

    Upgrading to Schedules & Scoreboards

    This article explains the steps required to upgrade from Game Locations and/or Game Schedules to the new MSTW Schedules & Scoreboards plugin, which replaces both of them. Two video tutorials on this subject (exporting to and importing from CSV files) are available to Gold Support members.

    So first, why can’t I just upgrade the plugins or install the new plugin, just like I normally do? The primary driver behind this upgrade was to support migration of data across websites, specifically the links between data tables. The secondary goal was to create a platform for better integration of MSTW features – teams, schedules, leagues and standings, coaching staffs, venues, sports – in sports site themes. Unfortunately, significant changes to the underlying data tables (the structure of the custom post types, for you techies) were necessary. Two design decisions were made to (a) combine the Locations and Schedules plugins, and (b) support the data changes via export to & import from CSV files, since this functionality would be required going forward anyway.

    The steps are a bit involved, but straightforward. These steps assume you are upgrading/migration both Game Locations and Game Schedules.

    1. Install and activate the MSTW CSV Exporter plugin.
    2. Export Game Locations – Locations, Game Schedules-Schedules, Game Schedules-Teams, and Game Schedules-Games.
    3. MSTW CSV Exporter Settings Screen

    4. Check that your CSV files look okay (probably using Excel). Examples of properly formatted CSV export files are located in the /mstw-schedules-scoreboards/csv-examples directory. Note for Mac users: files must be saved in Windows CSV format, not the native Mac CSV format.
    5. If you are upgrading the same site, deactivate the Game Locations and Game Schedules plugin.
    6. Install and activate the MSTW Schedules & Scoreboards plugin.
    7. From the admin screen, go to the Schedules & Scoreboards -> CSV Import screen.
    8. MSTW Schedules & Scoreboards CSV Import Settings Screen

    9. Import your CSV files in the following order: Venues, Teams, Schedules, Games.

    That’s it. All your data should now be in Schedules & Scoreboards. Check it out carefully in the various admin screens.

    Finally, you will now have to edit your shortcodes to those for Schedules & Scoreboards, and probably reset your permalinks.

    Note 1: When importing the teams table, there is an option to specify the new directory where you want the team logos stored. Unfortunately, WordPress stores links to images as full path names, so if you are moving the data between sites/servers you will need to translate all the image paths. You will also have to download and upload your logo files. The exporter/importer functions will not do this for you. If you are staying on the same site, the logo images can stay in place, and no changes should be necessary.

    Note 2: All the venues, schedules, teams, and games will be exported and imported. If there’s data you don’t want to migrate, you can either remove it from the Game Locations and Game Schedules plugins before exporting the data, or after exporting the data edit the CSV files and delete the data you don’t want prior to importing.

    How to change the “Item updated” message for a custom taxonomy

    This is the first in a series of posts on some more technical (read ‘developer’) issues that I have come across. I’m documenting them here primarily so I can remember them, but hopefully some other developer will find hem useful someday. I’ll focus on challenges for which I have trouble finding solutions on the Internet, not solutions that are readily available in many tutorials.

    Today I was working on a “Teams” custom taxonomy for the next MSTW Team Rosters release. This is a custom taxonomy ( think category or tag ) that links a group of “Players” ( a custom post type ) together as a team. I added a metadata field to the taxonomy in order to link the Team Rosters plugin “Teams” together with the Schedules & Scoreboards plugin’s “Teams”. The data for each “Team” – items like home venue, logos, colors – will live in the Schedules & Scoreboards data tables, but be accessible to the Team Rosters plugin. Those readers who use the MSTW plugins will learn more about this cool new feature later.

    As I completed this code, I noticed that when updating a Team, the update message looked like this:

    Item Update Message

    Hummm, what’s with this “Item” stuff? That should read “Team”. It seemed like that fix should be a simple WP filter (and it was). I do essentially the same thing for custom post types (see below).

    Game Update Message

    But this was a bit different, it was a taxonomy. After Goggling my brains out with little success (ergo, this post), I decided to dig into the WordPress core code, and found the filter I needed in /wp-admin/edit-tags.php. The filter is “term_updated_messages“, but (of course) it doesn’t work quite the same as the “post_updated_messages” used for CPTs. It’s a bit simpler, and there is no “bulk_term_updated_messages” like there is for CPTs ( “bulk_post_updated_messages” ). I assume because there is no trash can for terms ( items in a taxonomy ) like there is for posts.

    So the code is pretty simple once you find it. First add the filter.

    add_filter('term_updated_messages', 'mstw_tr_updated_term_messages');
    

    Then write the callback.

     function mstw_tr_updated_term_messages( $messages ) {
    
         //mstw_tr_team is the custom taxonomy	
         $messages['mstw_tr_team'] = array(
    		0 => '',
    		1 => __( 'Team added.', 'mstw-team-rosters' ),
    		2 => __( 'Team deleted.', 'mstw-team-rosters' ),
    		3 => __( 'Team updated.', 'mstw-team-rosters' ),
    		4 => __( 'Team not added.', 'mstw-team-rosters' ),
    		5 => __( 'Team not updated.', 'mstw-team-rosters' ),
    		6 => __( 'Teams deleted.', 'mstw-team-rosters' ),
    		);
    									
         return $messages;
    		
     } //End: mstw_tr_updated_term_messages( )
    

    And there you have it.

    Team Update Message

    I hope that helps somebody someday. I’m sure I’ll end up looking for it eventually. If you have an questions, send me an e-mail.

    New Version of MSTW Team Rosters

    Cal Bears Gallery [shortcode]I got back into the MSTW Team Rosters plugin to answer a support question yesterday, and got a bit nauseous. It’s past time for a MAJOR overhaul to fix some problems, add some features that have been requested, and improve integration with the overall MSTW Framework.

    A couple of days ago a user asked on the WordPress forums about increased responsiveness of this plugin to better support mobile applications. That would certainly be nice, and I’ve thought about that issue with the entire MSTW plugin family. Here’s my thought. Tables are provided in the HTML spec for, well, data tables. They are intended to display many columns, and many rows, like say, a roster. Sure one could create a table entire with CSS that would do a reasonable job of adjusting to small screens. But it seems to me that would lose the informational content of a table. It doesn’t seem to make sense for a roster to become two or three columns with data fields hop-scotching their way down the screen. So I’m thinking about the following for small screens. First, restrict roster tables to two or three columns; maybe a photo, name, and number. They would still be tables, but they would fit on small screens. Then make the single player profiles much more responsive. They are not tables and should display their reasonably well on small screens. As for player galleries, those *could* be more responsive, but is it worth the effort is the single player profiles work well on small screens? Who wants a gallery that’s a single column of players? Hummm ….

    One thing that will happen is the plugin’s custom post types and custom taxonomies will get new names, which will prevent collisions with sports themes and other sports plugins. This means that when you upgrade to the next release, you will have to export your existing data to CSV files and import it back into the new plugin. The MSTW CSV Exporter plugin and the Team Rosters import function will both be updated to support this migration.

    SO, now’s the time to send me your suggestions for improvements and requests for new features that would make the plugin work better for you. You can contact me via the contact form on this site or e-mail me directly. [[email protected]] No promises, but the chances are low that I’ll add exactly what you need if you don’t tell me what that is. 🙂

    3 New Video Tutorials

    Three new video tutorials for the MSTW Schedules & Scoreboards plugin are now available to Gold Support members. Styling the Scoreboard Ticker, Styling the Schedule Slider, and Styling the Schedule Table walk you through creating custom CSS for individual scoreboards and schedules shortcode displays starting from the code snippets which are available for this purpose. Here’s a quick preview:

    Schedules & Scoreboards v1.2 Now Available

    Version 1.2 of MSTW Schedules & Scoreboards introduces three new features:

    Scoreboard Ticker. The scoreboard ticker format is a slider intended for use at the top of your site’s pages.

    Scoreboard Ticker

    Scoreboard Settings. A robust set of layout and color settings is now available for both the scoreboard gallery and ticker formats. The plugin’s stylesheet may also be edited to customize these views.

    Import “human-readable” CSV files. The initial import capability was based on the MSTW CSV Exporter format for game schedules. The exporter generates UNIX timestamps for game dates and times. [Computers like that format; most humans, not so much.] The schedule importer now also recognizes game dates and times as human-readable strings, for example, “20141230 15:27“.

    The users manual is being updated, and additional Gold Support tutorials and code snippets are in the works. Please report any bugs to the WordPress.org forums or the Gold Support Forums.

    MSTW Schedules & Scoreboards v1.0 Released

    Version 1.0 of MSTW Schedules & Scoreboards replaces the MSTW Game Schedules and Game Locations plugins. It contains a ton of new features in both the front end displays and the admin screens, which you can read about What’s New in Schedules and Scoreboards man page.

    Sample Scoreboard

    The primary driver behind this upgrade was to support migration of data, specifically the links between data tables, across sites. The secondary goal was to create a platform for better integration of MSTW features – teams, schedules, leagues, coaching staffs, venues – in sports site themes. In the process, a collection of requested features have been added. The users manual is being updated and additional Gold Support tutorials and code snippets are in the works. Please report any bugs to the WordPress.org forums or the Gold Support Forums.