=== LeagueManager === Contributors: Kolja Schleich, LaMonte Forthun Donate link: Tags: league management, sport, widget, basketball, football, hockey, league, soccer, volleyball, gymnastics, tennis, baseball, rugby Requires at least: 4.7 Tested up to: 4.7.5 Stable tag: 4.2-RC1.3.2 License: GPL3 Plugin to manage and present Sports Leagues == Description == This Plugin is designed to manage sports leagues and display them on your blog. **Features** * easy adding of teams and matches * fancy slideshows of previous or next matches in combination with the [Fancy Slideshow Plugin](https://wordpress.org/plugins/sponsors-slideshow-widget/)) * numerous point-rules implemented to also support special rules (e.g. Hockey, Pool, Baseball, Cornhole) * weekly-based ordering of matches with bulk editing mechanism * automatic or manual saving of standings table * automatic or drag & drop ranking of teams * link posts with specific match for match reports * unlimited number of widgets * modular setup for easy implementation of sport types * separate capability to control access and compatibility with Role Manager * dynamic match statistics * Championship mode with preliminary and k/o rounds **Translations** * German * Dutch * Swedish * Polish * Spanish * French by Mamadou Dogue * Czech * Italian * Arabian * Hebrew by Bar Shai == Installation == To install the plugin to the following steps 1. Unzip the zip-file and upload the content to your Wordpress Plugin directory. 2. Activiate the plugin via the admin plugin page. == Frequently Asked Questions == **I want to implement player registration. Is that possible?** Yes it is, however not with this plugin, but with [ProjectManager](http://wordpress.org/extend/plugins/projectmanager/). It is designed to manage any recurrent datasets, such as player profiles. It is also possible to set a hook in the user profile. Any user with the capability *project_user_profile* is able to use this feature. You would also need the [Role Manager](http://www.im-web-gefunden.de/wordpress-plugins/role-manager/) for access control. Further the plugin has a template engine implemented that makes it easy to design your own templates. **How can I display the widget statically** Put the following code where you want to display the widget `` Replace *league_ID* with the ID of the league you want to display. This will display the widget in a list with css class *leaguemanager_widget*. == Screenshots == 1. Main page for selected League 2. League Preferences 3. Adding of up to 15 matches simultaneously for one date 4. Easy insertion of tags via TinyMCE Button 5. Widget control panel 6. Example of 'Last 5' (shows 'Last 3') Functionality 7. Match Report == Credits == The LeagueManaager icons were designed by Yusuke Kamiyamane (http://p.yusukekamiyamane.com/) == Changelog == * TO-DO - There are a few fixes left with LeagueManager's Championship mode. As the plugins documentation mentions, it was written for soccer (football) and has some limitations. It's being worked on and will be updated gradually with some new features and fixes. = 4.2-RC1.3.2 = * BUGFIX: fixed computation of match results for volleyball if team wins all sets, e.g. 2:0 thereby making the last set obsolete = 4.2-RC1.3.1 = * BUGFIX: fixed a potential php version-dependent error by accessing an array immediately after a function call = 4.2-RC1.3 = * NOTICE: The TinyMCE button seems to be broken in Wordpress 4.8. I will do my best to fix it as soon as possible * NEW: show league ID in index table * BUGFIX: fixed display of multiple standings/matches/crosstable of different leagues * BUGFIX: fixed global settings access = 4.2-RC1.2 = * BUGFIX: end($lague->seasons)['name'] seems to throw an error in some PHP versions * BUGFIX: fixed manual team ranking = 4.2-RC1.1 = * BUGFIX: fixed an empty "Can't use method return value in write context" issue with PHP < 5.5 = 4.2-RC1 = This is release contains major restructuring on the technical level to improve performance and security. * NEW: Major restructuring of plugin code * NEW: mobile responsive admin panel * NEW: wordpress style template tags system * NEW: moved match statistics administration to ProjectManager * NEW: better connection with ProjectManager for managing team roster & profiles and match statistics * NEW: match status including postponed, forfeit, scheduled, done, cancelled * NEW: better ranking including tiebreak by head-to-head matches * NEW: Generalization of sports modules for easier implementation of new sport types * NEW: team pagination in teams list and table * NEW: export and import of media files in zip format * NEW: dropdown selection for group in match adding panel * UPDATED: updated translation template and translation files using custom perl scripts * BUGFIX: bugfixed championship mode. This is still limited to soccer cups (e.g. world cup). Not working with new european championship mode!! * BUGFIX: standings not updated * BUGFIX: several bugfixes related to groups * BUGFIX: some bugfixes regarding team import * BUGFIX: matches pagination not working in admin interface * BUGFIX: league settings issue due to caching * BUGFIX: edit match day used match limit * REMOVED: removed tiebreakers.php as methods have been moved or removed * REMOVED: removed tiebreakers.php winPercentage() as win percentage is computed in Team Object and used in League::rankTeams() and the function is nonsense (same as headToHeadTwoTeams()) * MOVED: moved tiebreakers.php headToHeadTwoTeams() into League Object = 4.1.1 = * BUGFIX: fixed problem that matches per page was not set correctly with league mysql cache * BUGFIX: fixed issue with negative offsets for matches = 4.1 = * BUGFIX: fixed double logos in widget * BUGFIX: fixed issue with negtive offset error when multiple leagues are on same page * BUGFIX: fixed some issues with cache system * BUGFIX: fixed issue with fatal error on plugin activation * BUGFIX: fixed error in Fancy Slideshows filter = 4.0.9 = * NEW: show standingstable for home/away matches and after each match day * NEW: functions get_next_matches() and get_last_matches() (functions.php) to get next or last matches for specific team * NEW: added hebrew translation by Bar Shai * BUGFIX: fixed match_day option in [matches] shortcode when using multiple shortcodes on same page * BUGFIX: fixed calculation of apparatus points for gymnastics * BUGFIX: improved page loading times by caching MySQL query results and prevent unneccessary queries * BUGFIX: fix in matches pagination * BUGFIX: several small fixes = 4.0.8 = * NEW: options to set various logo sizes and cropping options * NEW: button to regenerate all thumbnails * NEW: button to scan for and delete unused logo files * NEW: set relegation teams for up and down * NEW: use last5 standings template in championship mode * UPDATE: some style updates * BUGFIX: fixed standings table colors in widget * BUGFIX: fixed soccer team ranking * BUGFIX: fixed pool team ranking * BUGFIX: fixed an AJAX issue = 4.0.7 = * NEW: show team logos in final matches and final results tree in championship mode including marking home team in bold * BUGFIX: some additional fixes for championship mode * BUGIFX: fixed logo size in widget * BUGFIX: some small fixed to prevent notices in championship mode = 4.0.6 = * NEW: new shortcode [league id=ID] to display all contents of a league, i.e. standings, crosstable, matchlist and teamlist with fancy jQuery UI Tabs * BUGFIX: several fixes for championship mode * UPDATE: updated some german translations for championship mode = 4.0.5 = * NEW: added logos to crosstable * SECURITY: fixed SQL injection and XSS vulnerabilities reported by islamoc (https://wordpress.org/support/topic/responding-to-security-problems-and-credit). I am pretty sure the SQL injection vulnerability had been already fixed before * BUGFIX: some style fixes = 4.0.4 = * BUGFIX: only automatically calculated final results scores if none are provided by the user * BUGFIX: fixed problem with Yoast SEO due to loading scriptaculous drag&drop * BUGFIX: fixed some issues with matches shortcode * BUGFIF: some style fixes = 4.0.3 = * BUGFIX: fixed some issues in matches shortcode = 4.0.2 = * NEW: don't automatically calculate results for basketball if a final score is submitted * BUGFIX: added again logo copying upgrade routine to copy logos to new upload folder structure * BUGFIX: fixed [leaguearchive league_id=X] bug * UPDATE: updated French translation = 4.0.1 = * BUGFIX: fixed problem with logo upload = 4.0 = * NEW: fancy slideshows of matches using the [Fancy Slideshows Plugin](https://wordpress.org/plugins/sponsors-slideshow-widget/) * NEW: point rule for volleyball giving 3 points for wins and 2 points for 3:2 wins and 1 point for 3:2 loss * NEW: improved security for data export * NEW: some new fancy styles using jQuery UI tabs * NEW: jQuery UI sortable standings table if team ranking is manual * NEW: accordion styled list of teams * NEW: updated teams and matches single view with fancy new style * NEW: documentation on data import file structures * NEW: gymnastics sport - support for score points of each apparatus and automatic apparatus points and score points calculation upon updating competition results * BUGFIX: fixed some issues in data import and export * BUGFIX: fixed some smaller issues * BUGFIX: fixed a small issue in plugin activation with notifications giving unexpected output * BUGFIX: fixed activation issue for missing roles * BUGFIX: fixed issue with team export and import * BUGFIX: fixed logo URLs upon export/import = 3.9.8 = * BUGFIX: fixed an issue with deleting logos used also by other teams = 3.9.7 = * BUGFIX: fixed an important issue with editing seasons = 3.9.6 = * some fixes = 3.9.5 = * NEW: load custom sport files from stylesheet directory in subdirectory sports * BUGFIX: fixed problem saving match report = 3.9.4 = * BUGFIX: fixed an issue with saving match results * BUGFIX: some small fixes = 3.9.3 = * NEW: show multiple leagues on the same page * NEW: global options to set support news widget options in dashboard * BUGFIX: limit in matches shortcode * BUGFIX: get next and previous matches in widget on a scale of minutes instead of 1 day = 3.9.2 = * BUGFIX: fixed some poor file location calling * BUGFIX: fixed TinyMCE window width = 3.9.1.9 = * BUGFIX: fixed issue with wrong next match in last-5 standings table = 3.9.1.8 = * NEW: matches pagination * NEW: team filter for matches in admin panel * BUGFIX: fixed home_only argument in matches shortcode * BUGFIX: fixed some styling issues = 3.9.1.7 = * UPDATED: updated french translation * BUGFIX: fixed setting getting stuck on user-defined point rule * BUGFIX: fixed an SQL query error in getMatches() = 3.9.1.6 = * BUGFIX: fixed team selection in matches template * BUGFIX: fixed getting league by name = 3.9.1.5 = * SECURITY: major change in retrieving teams (getTeams() in core.php) and matches (getMatches() in core.php) to avoid sql injections * SECURITY: fixed multiple possible sql injection vulnerabilities * BUGFIX: add stripslashes * BUGFIX: correctly load stylesheet and javascript scripts * BUGFIX: limit the number of matches to add to 50 (to avoid problems with memory limit) * BUGFIX: fixed some possible security issues * BUGFIX: fixed several small issues * BUGFIX: fixed issues with match statistics * BUGFIX: fixed some small issues with undefined variable notices in different sports = 3.9.1.4 = * BUGFIX: ordering of teams by rank = 3.9.1.3 = * SECURITY: fixed security issues = 3.9.1.2 = = 3.9.1.1 = * NEW: load custom templates from child themes * BUGFIX: some fixes in championship mode = 3.9.1 = * NEW: new template to show individual racer standings table * CHANGE: changed fields for racing results (points and time) * BUGFIX: fixed ajax in widget to navigate through next and last matches * BUGFIX: fixed bridge to projectmanager for compatibility with latest version * BUGFIX: several small fixes for racing mode * BUGFIX: added missing template matches-by_matchday.php to svn repository = 3.9.0.9 = * BUGFIX: fixed last-5 standings table to reflect scores of matches with overtime or penalty * BUGFIX: some small fixes = 3.9.0.8 = * BUGFIX: fixed issue with zero scores not displaying in tennis sports * BUGFIX: several small fixes = 3.9.0.7 = * NEW: new match_day values in [matches] shortcode: "next" to show matches of upcoming match day, "last" for last match day, "current" or "latest" for match day closest to current date * NEW: new template to display matches separated by match day. Use "template=by_matchday" in the shortcode to load template matches-by_matchday.php * NEW: show logo in matches tables * NEW: show home team in standings table and home team matches in bold in admin interface * NEW: added paramters $match->homeScore and $match->awayScore holding the match score depending if game has been finished after regular time, overtime or penalty. This can be used in the templates loaded by the [matches] or [match] shortcodes * NEW: don't show match day selection if specific match day is selected. Using "next", "last", "current" or "latest" will still show match day selection dropdown * NEW: new shortcode options for [matches] shortcode: "show_match_day_selection" and "show_team_selection" to force showing or hiding match day or team selection dropdown menus, respectively * BUGFIX: fixed problem with zeros in matches with empty scores * BUGFIX: fixed datepicker in match adding/editing page = 3.9.0.6 = * BUGFIX: Manual ranking of teams * BUGFIX: fixed several small bugs * BUGFIX: AJAX in widget = 3.9.0.5 = * BUGFIX: small fixes = 3.9.0.4 = * BUGFIX: fix colorpicker in global settings page * BUGFIX: fix default match day to -1 (all matches) in matches shortcode = 3.9.0.3 = * BUGFIX: fix match day issue in shortcode = 3.9.0.2 = * BUGFIX: show all matches in admin panel due to problems * BUGFIX: team edit save button not showing = 3.9.0.1 = * UPDATE: show first matches of first match day by default = 3.9 = * BUGFIX: fixed TinyMCE for Wordpress >= 3.9 preserving backwards compatibility * BUGFIX: removed broken sortable standings table * UPDATE: saving standings manually using POST button * BUGFIX: setting point-rule * BUGFIX: fixed several XSS Vulnerabilities * BUGFIX: fixed match day match editing = 3.8.9 = * UPDATE: Numerous files have been worked on to remove PHP Strict Mode warnings. These warnings didn't affect LeagueManager use, but if your WordPress installation had debugging mode turned on there were many, many warnings being thrown at you. There are no doubt more that will need to be fixed, but a conservative guess is that over 100 fixes have been applied. * BUGFIX: Fixed the error with the Widget not changing * BUGFIX: Permissions error on documenation page * UPDATE: Added completed games to soccer ranking * UPDATE: Numerous areas with deprecated code * UPDATE: Started to get into the sport files to get a consistent look to the output, centering headings over input fields, centering input fields in the space allocated and centering the text in the input fields. * UPDATE: Started work on the Championship mode, fixed a few none working areas, much work left to do, let me know if you've got suggestions... * ADDED: Ability to allow for matches between groups (out of group/division games) * BUGFIX: Fixed issue with sport files throwing error regarding a not-found function (I hope! I can't duplicate it, let me know if there are still issues) * UPDATE: Removed all traces of dropdowns for date, replaced with Datepicker * UPDATE: Fixed a number of areas to keep the user in the same group when adding or updating teams or matches. If you are working in one group and add a team the group knows where you came from and when you click submit you go back to the group you started from (your welcome!) = 3.8.8.5 = * BUGFIX: Fix standings numbers * BUGFIX: Fix widget issues after adding groups * ADDED: US Football Sport file = 3.8.8.4 = * BUGFIX: Wrong numbers on standing positions = 3.8.8.3 = * BUGFIX: Permission error * UPDATE: Changed some internal code from 'leagues' to 'leaguemanager' * ADDED: Dashboard Widget = 3.8.8.2 = * ADDED: Code for Widget to show/hide logos and limit to group * BUGFIX: "Clas=" in a number of sport files, changed to "Class=" * ADDED: JQuery tooltip for 'Last 5' to show date, score and teams of a game in the standings * ADDED: Ability to change color of Widget title in 'style.css' * ADDED: Limited code to set up out of group matches * Code clean up, removed extra whitespace in a number of files, replaced deprecated _c tag with _x or _e. = 3.8.8.1 = * TEST: Test version to add 'Last 5' function to standings. Only update to this version if you're willing to test. use this shortcode to test: [standings league_id=1 template=last5] or [standings league_id=1 group=A template=last5 logo=true] (group and logo are optional) If you test and find that the icons at the end of each line in the standings are moving to a second line it means you don't have enough room on your template for five past results. You can then change to a lesser number in the template, named 'standings-last5.php' in the 'admin/templates' folder. Go to 43: