Football Pool

Beschrijving

This plugin adds a fantasy sports pool to your blog. Visitors of your website can predict outcomes of matches and earn extra points with bonus questions. Every player can view scores and charts of the other pool contenders.

Deze plugin installeert enkele aangepaste tabellen in je database en de wedstrijden voor het UEFA 2022 kampioenschap zijn als voorbeeld bijgevoegd. Maar je kan de wedstrijden eenvoudig aanpassen naar de competitie of sport die je wil gebruiken in je pool. Let op: het deactiveren van de plugin kan ook alle gegevens verwijderen die in de database is ingevoerd, dus controleer de instelling ‘Gegevens opslaan bij deactiveren’ bij de plugin instellingen pagina, als je je gegevens niet kwijt wil raken (is standaard ingeschakeld sinds versie 2.3.1).

Ik heb de pool ooit geprogrammeerd als losse PHP site voor het Europees kampioenschap van 2000 en heb sindsdien de code meerdere malen herschreven voor elk Europees of wereldkampioenschap daarna. Elk jaar voegde ik nieuwe mogelijkheden toe. Tot ik in 2012 besloot om de code om te zetten in een WordPress plugin. Ik hoop dat je de plugin leuk vindt.

Een speciale dank gaat uit naar alle gebruikers van de plugin die wat geld hebben gedoneerd! En ook naar alle vertalers die tijd hebben gevonden om de vele teksten in de plugin te vertalen. En dank aan alle gebruikers die fouten hebben gemeld en zo hebben geholpen om de plugin beter te maken.

Kenmerken

  • Spelers kunnen wedstrijduitslagen voorspellen.
  • Automatische berekening van de poolstand. Of definieer je eigen aangepaste stand voor een deel van de wedstrijden.
  • Je kan bonusvragen gebruiken voor extra plezier en uitdaging (enkele antwoorden en meerkeuze).
  • Voeg je eigen teams en wedstrijddata toe om de plugin te gebruiken voor een (nationale) competitie.
  • Importeer of exporteer het wedstrijdschema.
  • Automatische berekening van de stand in de competitie.
  • Aanpasbare score-opties.
  • Gebruik de ingebouwde pagina’s en/of shortcodes om de pool aan je site toe te voegen.
  • Gebruik veschillende pools voor je spelers (optioneel).
  • Gebruikers hebben grafieken waarin hun scores in de loop van de tijd worden uitgezet. En ze kunnen zichzelf vergelijken met andere spelers. (Alleen beschikbaar als de Highcharts kaart API afzonderlijk wordt gedownload, zie Help voor details).
  • Widgets en shortcodes om informatie uit de pool of de competitie te tonen in je site.
  • Extra infopagina’s voor stadions of teams.
  • Voeg je eigen functionaliteit toe via filters en acties (zie de hulppagina in het beheer of dit bericht op het forum voor enkele voorbeelden).
  • WP-CLI support for calculating the user ranking (much faster than a calculation via the admin).
  • WPI-CLI ondersteuning voor het importeren van wedstrijdresultaten via een csv-bestand.

Documentation
The plugin has a help file in the admin that contains a lot of information. But if you like a step by step tutorial, I can recommend the following: Janek from WP Simple Hacks website made a very nice guide about my plugin. It even has a video where he explains how to set up the plugin.

Overige zaken

  • De plugin vereist WordPress 4.8 of hoger, PHP 7.4 of hoger en jQuery 1.4.3 of hoger.
  • Als je gebruik wilt maken van de grafieken, download dan de Highcharts API van http://www.highcharts.com/download (zie “Installatie” of de Helppagina in het WordPress beheer voor details).

Als je fouten vindt, neem dan contact op met me via het ondersteuning forum. Als je de plugin leuk vindt, laat dan een waardering achter op de plugin pagina op WordPress.org.

Vertalingen

If someone wants to help translate the plugin in another language, or help keeping the existing translations up-to-date, please visit the plugin’s page on translate.wordpress.org. Please read the information on the website carefully if you want your translation work to be reviewed and approved: After your contribution.

A big shout-out to all the translation contributors and editors that helped translating the plugin so far. Thank you!

The FAQ contains information on how to use a custom translation. I will keep including the pot language file in the plugin as a starting point for custom translations.

Shortcodes

De plugin heeft de volgende shortcodes. Bekijk de helppagina in de admin voor extra informatie.

  • fp-predictions
  • fp-predictionform
  • fp-matches
  • fp-match-scores
  • fp-question-scores
  • fp-next-matches
  • fp-last-matches
  • fp-user-score
  • fp-user-ranking
  • fp-ranking
  • fp-countdown
  • fp-group
  • fp-link
  • fp-register
  • fp-totopoints
  • fp-fullpoints
  • fp-goalpoints
  • fp-diffpoints
  • fp-jokermultiplier
  • fp-plugin-option
  • fp-league-info
  • fp-chart-settings/fp-stats-settings
  • fp-user-list
  • fp-money-in-the-pot
  • fp-last-calc-date
  • fp-next-match-form

Niet-geschikte plugins & thema’s

Van de volgende plugins is gemeld dat ze niet kunnen worden gebruikt in combinatie met de Football Pool plugin. Als je een oplossing weet en/of je bent de maker van de plugin, dan kan je contact met mij opnemen via wordpressfootballpool [at] gmail [dot] com. Als je een probleem hebt met een plugin die niet in de lijst staat, laat dit dan weten.

Basically, every caching solution should be tested with care.

  • DB Cache Reloaded Fix (v2.3)
  • Cimy User Extra Fields (v2.6.1) wanneer gebruik wordt gemaakt van de optie voor e-mailbevestiging
  • Easy Timer (voor football pool versie 2.3.8 en lager)
  • Theme Gadgetry (ThemeFuse framework)
  • memcached

Sommige thema’s verhinderen de plugin om haar inhoud te tonen in de pagina. Zie deze post op het forum voor een tip om dit te verhelpen.

Schermafdrukken

  • Predict matches via a form in your WordPress site
  • Scoregrafieken van meerdere spelers
  • Match predictions and scores per user
  • Poulestand
  • User ranking
  • Football Pool is packed with several widgets
  • Admin Screen: plugin options
  • Beheerscherm: wijzig de uitslagen
  • Admin Screen: add a shortcode via the classic editor

Installatie

Om je eigen, aangepaste vertalingen te gebruiken kan je in de FAQ meer informatie vinden over het vertalen van de plugin.

  1. Upload football-pool.zip in de plugin admin (Plugins » Toevoegen » Upload Plugin) of unzip het bestand en upload de folder football-pool naar de /wp-content/plugins/ folder op je server.
  2. Activeer de plugin via het Plugin's paneel in WordPress.
  3. Beheer de instellingen van de plugin via het adminmenu.
  4. Optioneel: voeg de pagina’s van de pool toe aan je menu, of gebruik een andere methode om naar de pagina’s te linken.
  5. Optioneel: voeg “Football pool” widgets toe aan je sidebar.
  6. Optioneel: voeg bonusvragen toe.
  7. Optioneel: ‘upgrade’ je bestaande gebruikers naar spelers in de pool.
  8. If you want to use the charts feature please download the Highcharts API (http://www.highcharts.com/) and put the highcharts.js file in the following path: /wp-content/plugins/highcharts-js/highcharts.js. Make sure you use the classic js file including the styling. If you use the theme-less version, then you’ll also need to include the highcharts.css code in your theme.

Wanneer de pool is opgezet, hoef je alleen nog de spelers die zich inschrijven bij te houden, de correcte eindstanden van de wedstrijden in te vullen en de antwoorden voor de bonusvragen (als je deze gebruikt) te geven.

FAQ

Wauw, er zijn veel opties. Moet ik die allemaal aanpassen?

Dat mag, maar het is niet noodzakelijk. Met de standaardinstellingen van de plugin zou alles prima moeten werken. Maar je kan wat spelen met de opties voor je met de pool start.

De scoreberekening toont een verwachte tijd van enkele uren. Waarom?

De berekening van de totale tijd die nog nodig is, is gebaseerd op de tijd van een enkele stap en deze wordt vermenigvuldigd met het totaal aantal stappen dat nog nodig is om de berekening te voltooien. Als de stapgroottes (die in het wp-config bestand kunnen worden ingesteld) van de eerste berekeningen veel groter zijn dan de berekeningen die volgen, dan zal in het begin de totale tijd waarschijnlijk te hoog worden aangegeven.

Or maybe you just have a huge database of users, rankings and matches. If that is the case, then the calculation could be right and the total time for the calculation just takes ages to complete. As a reference, I tested with 2000 users, 50 matches, a couple of bonus questions and 3 custom rankings on my laptop and that calculation took approx. 45 minutes to complete with default step sizes. And when doing that same calculation on the command line using WP CLI, it took less than 10 minutes to complete.

Heb je ook een thema dat ik kan gebruiken bij de plugin?

Nee. Ik ben geen designer, dus ik heb het talent niet om er een te maken.

Ik heb de plugin geïnstalleerd, maar er zijn geen wedstrijden. Wat is er gebeurd?

Sinds versie 2.0.0 worden er geen wedstrijden meer toegevoegd bij de installatie. Maar er is wel een voorbeeld beschikbaar als csv-bestand. Ga naar de Wedstrijden-beheerpagina en doe een import van een wedstrijdschema (“Bulkaanpassing van wedstrijdschema”) als je dit voorbeeld wilt gebruiken.

Heb ik de “Voorspellingen” pagina nodig?

Ja en nee. De plugin heeft deze pagina nodig voor het tonen van de voorspellingen. Verwijder de pagina dus niet. Maar je kan de pagina natuurlijk wel uit je menu verwijderen (Admin » Weergave » Menu’s).
Sommige thema’s of WordPress-instellingen plaatsen automatisch alle pagina’s op het hoogste niveau in het menu. Bekijk de informatie van de thema-maker hoe je een afwijkend menu maakt, of hoe je pagina’s kan uitsluiten uit het menu.

Ik wil de plugin gebruiken voor een nationale competitie. Is dat mogelijk?

Ja. Er zijn 2 manieren om dit te doen:
1. Upload een wedstrijdschema in beheer. Zorg ervoor dat je het vereiste bestandsformat begrijpt: je kan een voorbeeld vinden in de /data/schedules map van de plugin.
2. Gebruik de beheer schermen om alle teams, poules, wedstrijdtypes, wedstrijden, etc. toe te voegen.

En kies een thema, of maak er zelf een, die past bij je competitie of site.

De grafieken zijn weg! Wat is er gebeurd?

Ik heb de benodigde bibliotheek moeten verwijderen uit de plugin vanwege de WordPress licensierichtlijnen voor plugins. Als je de grafieken wil gebruiken, kijk dan op de helppagina in de WordPress admin voor aanwijzingen om de benodigde bibliotheek te installeren.

Ik zie mijn sitegebruikers niet als spelers in de pool.

Ga naar het WordPress Beheer » Football Pool » Spelers scherm en controleer of deze spelers zijn toegevoegd aan een pool (als je gebruik maakt van pools). Spelers die zich nieuw registreren, worden automatisch toegevoegd, maar reeds bestaande gebruikers in de site moeten worden geüpdatet in het beheerscherm. Om ze speler in de voetbalpool te maken, voeg je ze toe aan een pool en klik je op Opslaan. Als je een pool verwijderd, dan moeten de spelers in die pool in een andere pool worden geplaatst.
Als je geen pools gebruikt, zorg er dan voor dat de spelers niet zijn verwijderd uit de voetbalpool in het Spelers-scherm.

Is er een vertaling beschikbaar?

See this page for the available language packs.

If you want to make your own translation, please visit the translate.wordpress.org site and view the possibilities for your language. You can also use an editor like Poedit (http://www.poedit.net/) to create the translations and upload the results to the aforementioned website. Make sure you reach out to a PTE for your language to get your translations approved. Or if there is none, then you can apply for the job yourself. Also see the first steps page for more information on the general translation process within the WordPress universe.

If you have a custom translation, you can put the translation files in the wp-content/uploads/football-pool/languages dir (create it, if it doesn’t exist yet) and use this extension plugin to load it.

The default content for the rules page is in the rules-page-content-*locale*.txt file (e.g. rules-page-content-nl_NL.txt) and is not handled by the polyglot. If you’ve made your own translation and mail it to me, I’ll add it to the plugin and give you the credits.

Ik installeerde de plugin, maar het ziet er niet uit zoals in de screenshots.

That’s correct. The plugin has some basic styling to position or size elements, but it will not change your entire blog or automagically fit perfect in your website. You will have to adjust the styling yourself to make it look good in your site. Change your theme to overwrite/change the style of the plugin, or use a plugin to add extra custom stylesheets. Please do not change the CSS in the plugin folder; if you ever update the plugin, all your hard work will be gone.

Beoordelingen

24 november 2023 1 reactie
Its a nice plugin but I have an issue. The team flags are too large and out of place when viewed in the matches page.. pls how to do I fix this
13 mei 2023
Great plugin with a lof of features for match predictions. The creator is also very helpful for his users.
11 januari 2023
So easy to use and implement. Antoine is amazing and supportive. Favorite plugin for Wordpress!
29 december 2022
Awesome plugin with super awesome support.Complemento impresionante con soporte súper increíble.
26 november 2022
Awesome plugin with super awesome support.
Lees alle 78 beoordelingen

Bijdragers & ontwikkelaars

“Football Pool” is open source software. De volgende personen hebben bijgedragen aan deze plugin.

Bijdragers

“Football Pool” is vertaald in 12 talen. Dank voor de vertalers voor hun bijdragen.

Vertaal “Football Pool” naar jouw taal.

Interesse in ontwikkeling?

Bekijk de code, haal de SVN repository op, of abonneer je op het ontwikkellog via RSS.

Changelog

2.11.5

  • Update: Added the UEFA EURO 2024 championship schedule.
  • Bug fix: Shortcode [fp-countdown] now exits gracefully when it is set to countdown to a match, but no first or next match is found. Thanks Frans Jansen for reporting this error.

2.11.4

  • New: [fp-next-match-form] shortcode to show a form of only the next match(es).
  • Tweak: Small change in the test data CLI method.
  • Tweak: Bumped the jQuery version for the TinyMCE dialog to 3.7.1.
  • Bug fix: Removed a XSS vulnerability from some shortcodes (low priority).

2.11.3

  • Updated: Removed admin icon from plugin assets and added SVG base64 URI in menu definition.
  • Tweak: Removed deprecated warning for dynamic property in Football_Pool_Pool class.
  • Tweak: Some refactoring of code.
  • Tweak: Stop loading of plugin when doing cron actions (only needed if I ever decide to add cron actions).
  • Bug fix: In some edge cases the setting “Fix incomplete predictions” could cause points to be awarded when both scores for a match are missing. Thanks fimo66 and Markus Höcker for reporting the bug.

2.11.2

  • Tweak: Some refactoring of code.
  • Updated: Changed the required PHP version to 7.4.
  • Bug fix: League dropdown in the user admin caused a fatal error in certain cases. Thanks Ron Robinson for reporting the issue.

2.11.1

  • Bug fix: fp-matches caused a fatal error for empty parameters. Thanks @wongjowo for reporting the issue.

2.11.0

  • New: Audit log in the admin for the administrator to view all saves that users did in their predictions.
  • New: Added cache group to WP object cache calls to be able to exclude it from persistent caching plugins.
  • New: Option to consider a null value for an incomplete prediction (e.g. only home score entered) as valid and default the missing value to 0.
  • New: Shortcode [fp-last-matches] that displays the last started matches before a certain date. Similar parameters as [fp-next-matches].
  • New: Added parameters to the [fp-user-list] to limit the output with the ‘num’ parameter and to display only the latest registrations (based on and ordered by the WP_User’s user_registered field) with the ‘latest’ parameter.
  • New: Added ‘is_favorite’ parameter to teams. This parameter is used to add an extra CSS class to matches.
  • Updated: AJAX saves on the frontend are now disabled by default and I made it a setting in the options screen (but it can also still be changed via the FOOTBALLPOOL_FRONTEND_AJAX constant in the wp-config).
  • Updated: Changed the required PHP version to 7.3.
  • Updated: Removed deprecated code for loading custom MO files. This should be done via the ‘override_load_textdomain’ filter. See FAQ for more info.
  • Updated: Removed league ID from the sorting of the ranking.
  • Tweak: Added different admin screen option ‘items per page’ settings for bonus questions and user answers.
  • Tweak: Removed the old wp_enqueue_media check for WP versions lower than 3.5 (this is no longer needed).
  • Tweak: Fixed some deprecated warnings (tested in PHP 8.1).
  • Tweak: Toast on the prediction form now has a default z-index of 10.
  • Tweak: Minor changes to the bonus question CSS.
  • Bug fix: The countdown shortcode for the first match removed one element of the matches array and this caused trouble for other elements in the plugin that use the same array reference. Thanks @angelo079 for reporting and @shuhads for helping to sort this out.
  • Bug fix: Removed duplicate calculation buttons when removing multiple match types at once.
  • Bug fix: Fixed the Bonus question pie chart. Thanks @fimo66 for reporting the issue.

2.10.3

  • Updated: Changed the match schedule because some matches had the wrong UTC time (last games of the group phase and in the final rounds).

2.10.2

  • Updated: Changed the match schedule because the first couple of lines had the wrong year.

2.10.1

  • Updated: Changed the match schedule because FIFA changed the Qatar vs. Ecuador match date.
  • New: Added a setting to also show the actual result on the prediction form.
  • New: Added a setting to be able to disable the ‘unsaved changes check’ on the prediction form.
  • New: Shortcode [fp-user-score] now also supports the “use_querystring” parameter.
  • New: Added a setting to disable the automatic selection of the logged on user for the compare function in the charts.

2.10.0

  • New: Multiple joker support (for the entire pool or per match type). I also renamed the Joker to ‘multiplier’.
  • New: Multiplier, bonus question answers and match predictions are now automatically saved via AJAX calls on the front-end (on change). AJAX saves can be disabled via the FOOTBALLPOOL_FRONTEND_AJAX constant in the wp-config if you do not like the new asynchronous method.
  • New: The default delimiter for CSV files (match import) is changed to a comma. If you want to keep using the old delimiter (semicolon), you can override this setting in the wp-config (see help page for details).
  • New: If you want to use an alternative date format in a matches CSV file, you can now define constant FOOTBALLPOOL_CSV_DATE_FORMAT in your wp-config file. The constant uses the date format convention of PHP’s DateTime object and applies to both import and export files.
  • New: CLI command ‘football-pool test-data’ that creates test users in your database with random predictions (for testing purposes).
  • New: Added support for the WP Personal Data Exporter tool. Users can request to export their personal data which now will also include their Football Pool data (league name, match predictions and bonus question answers).
  • New: Added support for the WP Personal Data Eraser tool. When the option is set to true (defaults to false) the plugin will also erase predictions and question answers for a user when using WP’s Personal Data Eraser tool.
  • Tweak: Renamed the [fp-scores] shortcode to [fp-match-scores]. Old name is deprecated and will remain available for a couple of versions before I will remove it.
  • New: [fp-match-scores] shortcode can now also show the row total via the ‘show_total’ parameter.
  • New: [fp-match-scores] shortcode can now also output the user’s prediction per match (instead of or next to the points).
  • New: [fp-question-scores] to show a matrix of users and the scores they got on questions (uses same principles as the [fp-match-scores] shortcode for matches).
  • New: [fp-last-calc-date] to show the date and time of the last ranking calculation.
  • New: Two new admin roles (match editor and question editor).
  • New: Bonus question output now also has a filter that can be used in an extension. Also, the code for user view and prediction page is combined into one output function (to get the same HTML structure for the question blocks).
  • New: Bonus question statistics view now also has a template that can be overwritten with a filter.
  • New: Added ‘joker_used’ indicator to the score history tables.
  • New: Added constant FOOTBALLPOOL_TOP_PLAYERS that you can set in the wp-config if you want to show a different number of players in the default statistics page (default is 5).
  • Tweak: Bumped the jQuery version for the TinyMCE dialog to 3.6.0.
  • Tweak: Some small additions to the help page.
  • Tweak: Updated the icon font that comes with the plugin (also some class names have changed).
  • Tweak: Optimized the ranking query for big data sets when selecting ranking for a small league (sub set of users).
  • Tweak: Changed all colors in the admin to match the new admin WP 5.7 color palette.
  • Tweak: Added floating ‘back to top’ button to all admin pages and a scroll progressbar.
  • Tweak: Minor changes to the match table CSS.
  • Tweak: Clean up of bonus question CSS.
  • Tweak: Added maxWidth and maxHeight to the ColorBox modal that is used for displaying team photos on the front-end.
  • Tweak: Question’s answer-before-date is now also localized on the front-end.
  • Tweak: Score calculation now throws a fatal error when the default ranking is missing in the database.
  • Tweak: Increased the max int sizes for the counter columns in the scorehistory tables.
  • Bug fix: Fixed a compatibility problem with the Max Mega Menu plugin (thanks Holger for reporting this).
  • Bug fix: User profile page showed the wrong active league for the user.
  • Bug fix: Match types could be deleted when there were still matches linked to it. This resulted in orphaned matches in the database. Thanks Andreas Neubrech for reporting this.
  • Bug fix: When a logged in user, but not a player in the pool, visited the stats page, then an empty page was shown, instead of the top X players.
  • Bug fix: When a logged in user, but not a player in the pool, visited the user page, an incorrect page was shown.
  • Bug fix: When score date is automatically filled by the plugin, then the question was not included in the calcution when immediately starting the calculation. Thanks fimo66 for reporting this.
  • Bug fix: Fixed some translations. Thanks digiblogger for reporting this.
  • Clean-up: I removed all old translation files from the package. Contents of the translation files were imported to the WordPress translation website and can be maintained from there. The POT-file is still available as start point for custom translations, or you can download a PO language file from the translation website.
  • Clean-up: I removed the logout widget from the plugin since WordPress comes with its own widget.

2.9.7

  • Updated: Prepared the widgets for the new Widget blocks admin that will be introduced in WP 5.8.
  • Tweak: Changed the moment when the admin menu gets initiated.
  • Bug fix: When a joker is used and activated, the joker icon should be disabled on the form. This did not work when using the date descending sort for matches or when the ‘only open matches’ plugin was activated (thanks Roy te Lindert for reporting).
  • Bug fix: In some cases the v2.9.0 db update script was not executed (thanks @potjekak for reporting).

2.9.6

  • Bug fix: Flex layout for bonus questions was broken on the user page with a combination of certain settings and linked questions (thanks Frans Jansen for reporting).
  • Bug fix: Score date input for bonus questions showed the current date when you saved the form with an empty score date (thanks fimo66 for reporting).
  • Tweak: Changed the group standing rules to make it easier to override the sorting manually, because the rules of the UEFA for the UEFA 2020 championship did not match the general rules in the code (thanks af3 for reporting).

2.9.5

  • Updated: EURO 2020 schedule.

2.9.4

  • Bug fix: Football Pool widgets couldn’t be saved anymore (thanks to dar26ber and Ernst for reporting).

2.9.3

  • Tweak: Database optimization for scorehistory table. Retrieving data from the table is now much faster, which should improve the performance of the ranking page, widget and shortcode.
  • Tweak: Renamed some indices in the database for more consistency.
  • Bug fix: Shoutbox widget not showing an input for new messages for logged in users.
  • Bug fix: Plugin labelled some dates in format “Y-m-d H:i:s” as invalid for the import. Check was updated to also support this format (thanks to Kristin for supplying the data that helped me detect this problem).
  • Bug fix: Setting the matches sort method to an option with match type first in the plugin options caused a database query to fail. Result was an empty prediction form (thanks to Kristin and sopanstha for identifying and helping to solve this problem).
  • Bug fix: Teams class did not declare the comments property.

2.9.2

  • Bug fix: Fixed error in the calculation step ‘compute_ranking’. Larger data sets gave a problem in the AJAX JSON handling.
  • Bug fix: TinyMCE dialog for adding shortcodes showed only one user-defined ranking in the ranking selector.
  • Bug fix: Fixed display of form with shortcode [fp-predictionform] with the use of the match type parameter.
  • Tweak: Refactored some code.

2.9.1

  • Changed PHP version requirement to PHP 5.6 or higher.
  • Tweak: Added “open” or “closed” CSS class to bonus questions to indicate their status.
  • Bug fix: The check for joker saves was not working correctly when using invisible match types or the [fp-predictionform] shortcode with only a subset of matches.
  • Bug fix: League detection bug in Football_Pool_Pool class constructor.

2.9.0

  • New: Added sorting method options for bonus questions.
  • Tweak: Updated styling for bonus questions and we now show the admin answer next to the user answer.
  • Tweak: Updated the standard styling for the prediction table (classic layout only) a bit to make sure all elements are visible. Still needs to be changed to match your theme’s layout.
  • Bug fix: Option “user_page_show_predictions_only” did not work for bonus questions (‘Undefined index: answer’).
  • Bug fix: Option “user_page_show_correct_question_answer” did not work for linked bonus questions.
  • Bug fix: ‘Undefined index: league_id’ warning on the ranking page when switching between leagues enabled and leagues disabled without doing a recalculation.
  • Bug fix: Fixed the “An active PHP session was detected” warning in the Site Health scan (thanks fimo66 for reporting).
  • Bug fix: User predictions table showed a zero in the score column for users that did not have a prediction when option “Always show predictions” is enabled (should be left blank).
  • Bug fix: CLI command ‘import’ failed with an error in test mode when a match id was not found.

2.8.1

  • New: Changed the icons for the link to statistics and joker in the new layout.
  • Tweak: Changed the display of the text ‘points’ to a translated singular or plural form.
  • Tweak: New installs will have html5 number inputs enabled by default (new layout has enough room for the spinners).
  • Tweak: Changed the images for the flags in the example schedule.
  • Bug fix: WP updated its jQuery version which caused an error in the image selection button in the admin (thanks Nico for reporting this).
  • Bug fix: New layout for matches missed a link to match statistics when you click on the result (thanks Nico for reporting this).
  • Bug fix: Removed duplicate id warning when using date inputs in the admin.

2.8.0

  • New: Database upgrade to support emoji characters (utf8mb4).
  • New: Match table layout (flexbox) for better mobile device support. Existing installs can switch to the new layout in the plugin options. New installs will default to this new layout.
  • New: CLI command to import match results from the command line: $ wp football-pool import.
  • Tweak: Refactored some styling and class names. Please check and update your custom styling for matches and questions.
  • Tweak: Plugin now saves new matches and questions with the current time if the entered datetime is not valid (instead of a non-valid datetime).
  • Tweak: Various small optimizations in the admin.
  • Tweak: Changed the base CSS styling of the charts (flexbox layout).

2.7.2

  • Bug fix: Changed visibility of admin functions in v2.7.1 caused problems in some extension plugins.

2.7.1

  • Only matches and bonus questions with play/score dates in the past will be added in the ranking calculation.
  • Minimal WordPress version is now 4.7.0 (released December 2016).
  • Updated all bundled javascript libs to a newer version.
  • Added a filter to the matches admin page to show only matches in a chosen match type.
  • Added a search to the bonus questions admin page to search for questions, user answers and user names.
  • Added a basic search to other admin pages.
  • New shortcode [fp-money-in-the-pot] for calculating and displaying the total stakes.
  • Bug fix: Names for teams, stadiums and groups are back in the window title for the respective pages (in WP 4.4.0 the filter changed).
  • Bug fix: Doing a calculation in the admin with invalid charts setting (enabled, but without the API) caused an error in the JSON response for the popup.
  • Bug fix: Undefined variable in the teams admin page and match type admin page.

2.7.0

  • Added an alternative (simplified) calculation method. This calculation drastically reduces the calculation time needed on installs with large user bases, but with the downside that no historic data is saved. So, charts are not supported with this setting enabled and also the date parameter for ranking and score functions will be ignored.
  • EURO2020 Update: included match schedule for the UEFA EURO2020 championship and a new favicon.
  • Some small optimizations in the standard calculation method.
  • Dropped PHP version 5.2 support. Changed PHP version requirement to PHP 5.3 or higher.
  • Removed calls to deprecated (as of PHP 7.2) create_function and now use lambda style anonymous functions instead.
  • Added shortcode [fp-user-list] for listing the users in the pool.
  • Added do_action for item deletes in admin to be able to hook into this in extension plugins.
  • Joker can now be toggled on an off by users in the prediction sheet by clicking on the joker (still needs a save from the user to save final state).
  • Added option to also show correct answer from admin with the questions on the User page.
  • Added two constants for the match date and time formats: FOOTBALLPOOL_MATCH_DATE_FORMAT and FOOTBALLPOOL_MATCH_DAY_FORMAT. Both can be overridden in the wp-config if you want to change the formats.
  • Changed visibility of $page_param parameter in Pagination class. If you use or have a custom pagination extension, please update your code to set the parameter using the set_page_param() method.
  • Bug fix: In some MySQL installs the ranking page always returned zeroes for all users in combination with a strict datestring setting in MySQL (thanks @topplayer for pointing out the problem to me).
  • Bug fix: Hide admin bar option was not always behaving as intended (thanks Danstano for reporting the problem).
  • Bug fix: In some scenarios not all linked questions were shown with the correct match (thanks Daniel for reporting this).
  • Bug fix: Fixed link to linked match in main bonus question admin screen.
  • Bug fix: When selecting users with the same name on the statistics page, the charts showed weird results. Not sure if this can happen in a real-life scenario, but it happened with my test data 😉
  • Bug fix: Ranking did not display users that registered after the last calculation (thanks Patrick for reporting this).
  • Bug fix: Missed some translations in the Pagination class (thanks fegs1204 for reporting this).
  • Bug fix: Fixed the styling for the pagination buttons on the admin pages.
  • Bug fix: Set screen options in the admin was not working (thanks tmg513 for reporting).
  • Bug fix: When using invisible match types, the prediction form enabled user’s to set a joker. This joker was not saved, but being able to set it, is not supposed to happen (thanks reinispro for reporting).
  • Bug fix: ‘Undefined index’ notice in matches array when using linked questions on a match in an invisible match type.
  • Bug fix: The update script for v2.6.1 was not initiated in Football_Pool::activate.

2.6.7

  • Russia 2018 Update: included match schedule for the FIFA 2018 World Cup and a new favicon.
  • [fp-ranking] shortcode: added parameter ‘user’ for league parameter to show the ranking for the league of the logged in user.
  • [fp-user-ranking] shortcode: added parameter ‘league_rank’ to show the rank in the league of the selected user.
  • Created SCSS files for the stylesheets.
  • Removed Spanish (es_ES) language files as there is a language pack available on http://translate.wordpress.org
  • Question date now follows WP display settings for date and time. With an option to overwrite this format with the constant FOOTBALLPOOL_QUESTIONDATETIME_FORMAT in the wp-config file.
  • Bug fix: Added extra check for default league to the plugin’s User admin page (thanks kerovsky for reporting this).
  • Bug fix: Added extra check in match import for invalid stadium and match type (thanks Laurent for reporting this).
  • Bug fix: Default league image was not displayed correctly.
  • Bug fix: Prediction form shortcode only checked for logged in users, not if they are a player in the pool (thanks ARTEFACTOCO for reporting this).
  • Bug fix: Team class did not declare variable $page.

2.6.6

  • Added some more formats for the countdown widget and shortcode. Also a free format is supported. See the help page about the shortcode for more info.
  • Added filter to match-sorting method so it can be overwritten in an extension plugin.
  • Added xssafe to league names in User admin.
  • Added extra checks and trim on all values to csv import function.
  • Bug fix: Fix for “[] operator not supported for strings” error in certain PHP versions when importing csv files in matches admin (thanks Patrick for reporting).
  • Bug fix: Prediction stop date option values (for matches and questions) didn’t save after 2.6.5 update (thanks jerofdz for reporting).
  • Bug fix: Suppress notice from Statistics page class in some themes.

2.6.5

  • Removed some possible XSS vulnerabilities from the plugin (thank you for your help, Ricardo Sanchez).
  • Rewrote the option array definition in the admin because that was a complete mess.
  • Upgraded jQuery version in tinymce-dialog.php.
  • Some small changes in the tinymce javascript files.
  • Changed EOL of tinymce-dialog.functions.php so it is the same as all other files.
  • Show item ID for items in default view list in admin screens.
  • Added “Chosen” jQuery lib to admin to enhance some select boxes.
  • Removed the “ZeroClipboard” lib from timezone-test.php because that uses Flash (blegh) and replaced it with clipboard.js.
  • Moved some libs in the assets folder to a new location.
  • Added some extra styling on the “prediction saved” notification because this is hidden in some themes.
  • Added ‘use_querystring’ parameter to the fp-predictions and fp-scores shortcode so they can be used on a page where parameters are passed via the querystring (and thus making these shortcodes more usable in a dynamic context).
  • Time and date formats in plugin used WordPress settings, but because I didn’t use the WP function date_i18n() on the matches page, any other extension that hooked into this function (e.g. wpjalali) couldn’t change the formats (thank you R.Ahmadi for notifying me and for testing).

2.6.4

  • Added a file extension check to the csv upload in the admin (only csv and txt files are allowed).

2.6.3

  • Fixed some bugs in the TinyMCE plugin and split the dialog file into JS, CSS and functions.php.

2.6.2

  • Bug fix: Updated the TinyMCE plugin (for adding shortcodes to the editor). Old one gave problems in recent WP versions.
  • Bug fix: In installs where the translation for “Save Changes” in the plugin’s translation files is different from the global WordPress translation file, the saving in the User admin did not work (thanks Soroush for reporting).
  • Bug fix: Added cache clear to Leagues and User Defined Ranking admin after save or delete (thanks Stefan for reporting).
  • Bug fix: Dashboard widget image was stored with a full URL on activation. If the scheme is switched after activation this image will cause a mixed content (insecure image) warning (thanks Stefan for reporting).
  • Bug fix: Removed the incomplete ‘show number of predictions’ feature from the ranking shortcode (thanks Chris for reporting).

2.6.1

  • Removed Dutch language files as there is a language pack available on http://translate.wordpress.org
  • Added extra filters to the score calculation class for extra flexibility.
  • Added filters in the User admin to be able to extend the user view.
  • Changed database field length for match type name, league name, ranking name, stadium name and group name to 100 chars.
  • Changed the match predictions view to work with templates so it can be changed via hooks.
  • Bug fix: Undefined index warnings on the user page when match types are hidden (thanks rick for reporting).
  • Bug fix: Set screen options in the admin contained a bug in the hook callback (thanks tmg513 for reporting).
  • Bug fix: “undefined variable: default_league” notice when saving a user in the admin with leagues off.
  • Bug fix: Fixed a bug in the max points calculation in the charts.
  • Bug fix: Undefined index ‘last score’ in ranking when there are no results in the ranking.
  • Bug fix: The html for the calculation box caused some display trouble when bootstrap CSS is also loaded. Changed the class names and ID for the progress bar elements (thanks Dennis for reporting).

2.6.0

  • New: WP-CLI support for score calculation. See help page in the admin for more information.
  • New: HTML templates for the group table. The templates can be changed via hooks. See help for details.
  • New: shortcode [fp-scores] for displaying the scores for every user for one or more matches.
  • New: new options for the user page (only show matches with predictions, only show finished matches and show actual results below prediction).
  • Updated fp-league-info shortcode so it now also displays data when the pool hasn’t started yet (there is no data in the score table).
  • Added user ID to calc_score so it can be used in the filters.
  • List email addresses in admin now takes search filter into account when displaying the addresses.
  • If FOOTBALLPOOL_ALL_WP_USERS constant is defined in wp-config the plugin will show names of users that are no (longer a) valid user in the plugin (e.g. when displaying a name in the shoutbox) instead of ‘unknown’.
  • Updated some translations.
  • Changed visibility of methods in the charts class to be able to extend this class in extension plugins.
  • Updated the bulk matches upload code with some extra checks on the csv file.
  • Bug fix: bulk matches upload page exited with an error notice if one of the folders didn’t exist (thanks Kadri-Ann for reporting the bug).
  • Bug fix: countdown widget and countdown shortcode gave an error when texts were used with single quotes in them (thanks florent71 for reporting the bug).
  • Bug fix: ranking didn’t show ‘currentuser’ CSS class for logged on user (thanks saschapi for reporting the bug).
  • Bug fix: changing the constant FOOTBALLPOOL_CSV_DELIMITER caused a problem in the column count of the import function.

2.5.4

  • Updated German translation (thanks aileesh).
  • Updated English schedule because it contained a small error in the final (thanks benster1970 for reporting this).
  • Prepare plugin for new plugin translation system (http://translate.wordpress.org).
  • Added match ID to calc_score function so it can be used in the filters.
  • Bug fix: On the stadium page the “Matches” title was printed below the matches.

2.5.3

  • Important: Location of team images, stadiums and flags has changed in since version 2.5.2. Backup your files before updating.
  • Updated schedules as these were not in UTC time.
  • Added filters for the chart data. When you change the score calculation you now also have the ability to update the charts to match your changes.
  • Bug fix: ranking widget and shortcode didn’t use the max users setting (thanks Gerrit for reporting the bug).

2.5.2

  • Important: Moved location of team images, stadiums and flags outside of plugin dir so your own images won’t be overwritten on future updates. Plugin creates a football-pool dir in the WP upload dir for all your files.
  • Added select from media lib for the league image.
  • Newly added users to your pool are now immediately included in the ranking even though you didn’t do a calculation yet.
  • I disabled the loading of avatars because these can slow down the ranking display tremendously (WP runs a couple of database queries for every user to get the avatar). If you extended the plugin to show the avatars in your ranking, you can enable the loading again by setting the FOOTBALLPOOL_NO_AVATAR constant to false in your wp-config.php. Note: my setting only affects the plugin, not the rest of your blog.
  • Added an upgrade warning in the WP plugin upgrade screen (for future upgrades).
  • Added ability to cancel the calculation process. Old ranking will stay active if a calculation is cancelled.
  • Some code cleanup in the admin.js file.
  • Removed some default styling from the pool.css file.
  • Removed some old match schedules.
  • Removed some unused images from the default install.
  • Updated the favicons (logo for the UEFA Championship 2016) and placed them in a different location.

2.5.1

  • Fixed unknown constant notice.
  • Bug fix: When no calculation is needed, no message was shown (thanks Reinis for reporting the bug).
  • Bug fix: When a calculation is completed with no matches or questions, the session was not cleared correctly. And any calculation that was performed after this, stayed in the same ‘no calc’ state (thanks Reinis for reporting the bug).

2.5.0

  • Complete rewrite of the score calculation. The calculation is split into smaller steps and stores intermediate results and data in a session. There is less chance of time outs during the calculation and it’s easier to tweak the individual calculation step sizes. New calculation version allows you to easily overwrite the default scoring for matches with the hooks ‘footballpool_score_calc_function_pre’ and ‘footballpool_score_calc_function_post’. In previous versions the ranking table displayed incorrect data when a calculation was in progress; this is fixed now. Only full calculations are possible in the new version (single ranking calculations and smart calculations no longer exist).
  • Added pagination to bonusquestion user answers admin page because this was causing trouble on installs with a lot of users.
  • Added user …