=== ChessPairings — Tournament Showcase ===
Contributors: stefanoloberti
Tags: chess, tournament, pairings, standings, club
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Display chess tournaments managed on my.chesspairings.org directly on your WordPress site: standings, pairings, registered players, calendar.

== Description ==

ChessPairings — Tournament Showcase is a "showcase" plugin that integrates tournaments managed on the SaaS platform [my.chesspairings.org](https://my.chesspairings.org/) into your WordPress site.

The plugin **does not manage** tournaments inside WordPress: pairing generation, result entry, player management, Telegram notifications, auto-publishing to chess-results.com and everything else stays on my.chesspairings.org. The plugin simply **displays** your tournament data on your WP site, using native HTML that inherits your theme's styles.

**What you can do with the plugin:**

* Show standings with tiebreaks
* Show pairings by round
* Show the registered players list (or teams + roster for team tournaments)
* Show the tournament announcement / regulations
* Add a "Register" button linking to the online registration form
* Publish a calendar of your tournaments or the community calendar (by federation)
* List all your tournaments with cards — status, dates, registration button
* Display a full tournament page with tabs (info / registered / pairings / standings)

**Advantages over an iframe or a screenshot:**

* Native HTML that inherits the theme's styles (fonts, colors, spacing)
* SEO-friendly (indexable content, not in an iframe)
* Mobile responsive by default
* Automatic caching to avoid overloading the API (configurable 30–300s)

**ChessPairings account:** the plugin requires a free account on [my.chesspairings.org](https://my.chesspairings.org/) and a free API key generated from your profile. The SaaS platform is completely free.

**Languages:** the plugin is translated in 7 languages: English, Italian, Spanish, French, German, Russian, Czech.

== Installation ==

1. Upload the `chesspairings` folder to `wp-content/plugins/` (or install the zip from the WordPress admin panel).
2. Activate the plugin from the **Plugins** menu.
3. Go to **Settings → ChessPairings**.
4. Generate an API key from your my.chesspairings.org profile (**API** tab → **Generate token**).
5. Paste the token in the settings page and click **Verify connection**.
6. Add a shortcode to any page or post:

   `[chesspairings_torneo id="123"]`

== Available Shortcodes ==

**Individual tournaments:**

* `[chesspairings_torneo id="N"]` — full tournament page with tabs
* `[chesspairings_classifica id="N"]` — standings only
* `[chesspairings_abbinamenti id="N" turno="ultimo"]` — pairings for a round
* `[chesspairings_iscritti id="N"]` — registered players list
* `[chesspairings_bando id="N"]` — tournament announcement
* `[chesspairings_iscriviti id="N"]` — registration button
* `[chesspairings_tornei]` — tournament listing with cards (status, dates, registration)
* `[chesspairings_calendario tipo="miei"]` — tournament calendar (miei | community)

**Team tournaments:**

* `[chesspairings_torneo_squadre id="N"]` — full team tournament page
* `[chesspairings_classifica_squadre id="N"]` — team standings
* `[chesspairings_abbinamenti_squadre id="N" turno="ultimo"]` — team pairings
* `[chesspairings_squadre id="N"]` — teams + roster

All shortcodes are also available as the Gutenberg block "**ChessPairings Tournament**".

== Frequently Asked Questions ==

= Do I need a ChessPairings account? =

Yes, it's free. Register on [my.chesspairings.org](https://my.chesspairings.org/), create your tournaments there, then install the plugin to display them on your WP site.

= Can I customize the look of the tables? =

Yes, in two ways:
1. The plugin uses CSS variables that auto-adapt to the theme. You can override them with custom CSS.
2. Every template is override-able from the theme: copy a file from `chesspairings/templates/` to `your-theme/chesspairings/` and modify it.

= How heavy is the API load per page view? =

Responses are cached for 60s by default (configurable 30–300s). So even with 100 visits per minute, the API receives ~1 call per minute per shortcode.

= Can I show private tournaments? =

Yes, as long as the tournament belongs to the API key owner. Visibility (public/private) only controls whether it appears in the community calendar.

= What happens if my.chesspairings.org is temporarily unreachable? =

The plugin shows an inline error message in the shortcode area. The rest of your WP site is unaffected.

= Does the plugin send data to my visitors? =

No. The plugin calls the API server-side from WordPress — no client-side JS fetch. No cookies, no trackers.

== Screenshots ==

1. Settings page with connection verification
2. Standings example with tiebreaks
3. Pairings example for a round
4. Full tournament page with tabs
5. Community calendar

== Changelog ==

= 0.1.0 =
* First release: 12 shortcodes + Gutenberg block + overridable templates + 7 languages.

== Upgrade Notice ==

= 0.1.0 =
First release.
