Gudjons Turneringer for Golfbox

Plugin Banner

Gudjons Turneringer for Golfbox

by Gudjon Gudjonsson

Download
Description

Gudjons Turneringer for Golfbox fetches a golf club’s upcoming tournaments from Golfbox and displays them in WordPress in the club’s own style, without loading the full Golfbox widget. The plugin is generic and works for any club by setting the club’s customerID.

Data is fetched server-side from the Golfbox schedule endpoint, cached with WordPress Transients, filtered and displayed. The same data source and cache are shared by all views on the page.

Main features

  • Three layouts: list (rows), table (columns) and cards (grid).
  • Field and column selection: choose which fields are shown and in what order: date, time, name, type, venue and status.
  • Theming with colors and font: set accent color, soft accent, tint color and heading font, from the settings page or per shortcode. Built on CSS variables, so your theme can override everything.
  • Density: normal or compact (great for a front-page box).
  • Filtering: by named series, free text search and/or Golfbox category IDs.
  • Deep link per tournament — out of the box each tournament links to its own page on Golfbox; optionally link to a calendar page on your own site instead.
  • Template override: developers can copy the layout files into the theme and override the markup completely, and use filters.
  • Its own settings page, shortcode and template tag. No editing of functions.php required.

Shortcode

Basic usage:

[gudjons_turneringer limit="50"]

Examples:

  • Table: [gudjons_turneringer layout="table" fields="date,time,name,venue,badge"]
  • Cards: [gudjons_turneringer layout="cards" limit="6"]
  • Front-page box: [gudjons_turneringer density="compact" limit="5" all_url="/turneringer/"]
  • Custom color: [gudjons_turneringer accent="#0a3d2a" tint="#e6f4ea"]
  • A series: [gudjons_turneringer series="torsdagsduellen"]

External services

This plugin connects to the Golfbox tournament schedule API to display your golf club’s upcoming tournaments. This is required for the plugin to function.

  • Service: Golfbox (scores.golfbox.dk), provided by Golfbox A/S.
  • What is sent and when: On front-end page views that render a tournament list, the plugin makes a server-side request to https://scores.golfbox.dk/Handlers/ScheduleHandler/GetSchedule/.... The request URL contains the club’s customerID, the season (year) and a language ID that you configure. No personal data about your site visitors is sent. Responses are cached with WordPress Transients to limit the number of requests.
  • Deep links from each tournament point to the club’s own Golfbox calendar page.
  • Golfbox terms of service: https://www.golfbox.no/
  • Golfbox privacy policy: https://www.golfbox.no/

If you do not configure a customerID, the plugin makes no external requests.

  1. Upload the plugin folder to wp-content/plugins/, or install the ZIP via Plugins > Add New > Upload.
  2. Activate Gudjons Turneringer for Golfbox under Plugins.
  3. Open Gudjons Turneringer for Golfbox in the admin menu and set at least the club’s customerID.
  4. Place [gudjons_turneringer] on a page, or use one of the variants above.
  1. List layout with date, name, meta and status.

    List layout with date, name, meta and status.

  2. Table layout with selected columns.

    Table layout with selected columns.

  3. Cards layout in a grid.

    Cards layout in a grid.

  4. The settings page with display, color and series options.

    The settings page with display, color and series options.

Where do I find the club’s customerID?

It is part of the club’s Golfbox setup, and is often visible in the URL of the club’s Golfbox calendar. Contact your club administrator or Golfbox/NGF if you are unsure.

Can I control which fields are shown?

Yes. On the settings page you can tick fields on or off, and in the shortcode you can set the order with fields="date,name,venue,badge".

Can I change colors and font?

Yes, from the settings page (color pickers and font), or per shortcode with accent, accent_soft, tint and font_heading. Everything is built on CSS variables, so your theme can also override .gudjons-turneringer-for-golfbox { --gbt-accent: ... }.

Can I override the HTML itself?

Yes. Copy one of the files in the plugin’s templates/ folder (for example list.php, table.php, cards.php) into your-theme/gudjons-turneringer-for-golfbox/ and edit it there. There are also filters such as golfbox_turneringer_entry, golfbox_turneringer_entry_fields and golfbox_turneringer_render_args.

How often is the data updated?

It is cached for the number of seconds set by “Cache time” (default 30 minutes). The cache is cleared when you save the settings.

2.2.0

  • Added: tournaments now deep-link to the tournament’s own page on Golfbox (gbtourframe.asp) out of the box, without any configuration. The Golfbox domain (.no/.dk/.se) follows the configured language ID.
  • Changed: the “Kalenderside” setting still takes priority for clubs hosting the widget on their own site, and a customized “Standard lenke” still overrides all row links.

2.1.2

  • Fixed: cards layout – the status badge could overlap the start time on multi-day tournaments; the card header now wraps cleanly.

2.1.1

  • Changed: renamed the plugin to “Gudjons Turneringer for Golfbox” and the shortcode to [gudjons_turneringer] to clearly mark it as a third-party integration (no affiliation with Golfbox).

2.1.0

  • New: three layouts – list, table and cards (layout="list|table|cards").
  • New: field and column selection (fields="...") and choices in the admin.
  • New: theming with CSS variables – accent color, soft accent, tint color and heading font (admin + shortcode).
  • New: template override from the theme, and the filters golfbox_turneringer_entry, golfbox_turneringer_entry_fields, golfbox_turneringer_render_args.
  • New: time as a selectable field.
  • Changed: variant="compact" is now density="compact" (the old variant still works).
  • Improved: full internationalization (i18n), text domain and translation template.
  • Improved: admin script and style are loaded as separate files (no inline script/style).
  • Fixed: robust date handling and an early return when customerID is not set.

2.0.0

  • List and compact view, filtering by series/text/category, deep link, caching and a settings page.
Back to top