Giter Site home page Giter Site logo

tags's Introduction

tags

banner

Description

TAGS - The Anchor Golf Society's WordPress plugin.

Used in conjunction with the Genesis child theme genesis-tags this provides the functionality to display the events for The Anchor Golf Society.

It is dependent upon:, oik, oik-fields, oik-bob-bing-wide, oik-css, oik-dates, oik-types, oik-user and the theme relies on oik-rwd for some responsive behaviour.

Installation

  1. Upload the contents of the tags plugin to the `/wp-content/plugins/tags' directory
  2. Activate the tags plugin through the 'Plugins' menu in WordPress

Frequently Asked Questions

Screenshots

None

Upgrade Notice

0.6.2

Update for support for PHP 8.3

0.6.1

Update for support for PHP 8.1 and PHP 8.2

0.6.0

Update for support for PHP 8.1 and PHP 8.2

0.5.0

Update for Player membership (_player_mem ) virtual field.

0.4.3

Contains a fix for PHP 7.4 compatibility.

0.4.2

Upgrade for total player summary and tee time draw recommendation.

0.4.1

Upgrade for an improved solution for the Events list on the Courses tab.

0.4.0

Upgrade for NTP on 27 holes, Results entry improvement and display of Events by Course.

0.3.1

Upgrade to support competitors requiring Buggies.

0.3.0

Upgrade for enhanced Player display using [tags_achievements] and yearly results [tags_results] shortcode.

0.2.0

Upgrade for enhanced Player display - with Results and Attendance

0.1.0

Upgrade for peaceful coexistence with WordPress 5.0 and/or Gutenberg

0.0.2

Improvements for display of tabs for Events

0.0.1

17 - 21 Apr 2016 - improvements for SEO, display all events and bunging onto GitHub as GPL-3.0

0.0.0

New bespoke plugin. Originally developed to migrate content from Drupal to WordPress.

Changelog

0.6.2

  • Changed: Support PHP 8.1, PHP 8.2 and PHP 8.3 #21
  • Fixed: Unexpected links when updating Results #20
  • Tested: With WordPress 6.4.3
  • Tested: With PHP 8.3
  • Tested: With PHPUnit 9.6

0.6.1

  • Fixed: Unexpected links when updating Results #20
  • Changed: Support PHP 8.1 and PHP 8.2 #19
  • Tested: With WordPress 6.4.1
  • Tested: With PHP 8.0, PHP 8.1 and PHP 8.2
  • Tested: With PHPUnit 9.6

0.6.0

  • Changed: Support PHP 8.1 and PHP 8.2 #19
  • Tested: With WordPress 6.4-RC3
  • Tested: With PHP 8.0, PHP 8.1 and PHP 8.2
  • Tested: With PHPUnit 9.6

0.5.0

  • Changed: Display information regarding a player's membership status on the Player list for future events. #18
  • Tested: With WordPress 6.2.2

0.4.3

  • Fixed: PHP 7.4 compatibility #16

0.4.2

  • Fixed: Change _cost field to text to allow for TBC or FREE #17
  • Added: Add player grid logic below the grouping #16
  • Tested: With WordPress 6.2-RC2
  • Tested: With PHP 8.0

0.4.1

  • Fixed: Added exclude=-1 parameter for Events list on Courses tab #14

0.4.0

  • Changed: Automatically display Events for Courses #14
  • Changed: Allow for 27 holes #15
  • Fixed: Set event_date on/before the current time so it doesn't become scheduled #13
  • Tested: With WordPress 6.0.1
  • Tested: With PHP 8.0

0.3.1

  • Changed: Added Buggy option for competitors #11
  • Fixed: Avoid Warning for null result_type on the 8 new rows #12
  • Fixed: Cater for most recent update in bw_get_posts() by using exclude => -1 #12
  • Tested: With WordPress 5.8.2
  • Tested: With PHP 8.0

0.3.0

  • Changed: Implement [tags_achievements] shortcode to replace the results [bw_related] shortcode #8
  • Changed: Change orderby=result_type to orderby=ID #10
  • Added: Implement [tags_results] shortcode #9
  • Tested: With WordPress 5.8.2
  • Tested: With PHP 8.0

0.2.0

  • Added: Results and Attendance section automatically added for a Player, #8

0.1.0

  • Fixed: Determine lat and long automatically from address and post code,#5
  • Changed: Support for WordPress 5.0 and the new block editor, #6
  • Changed: Improve the initial selection of the Select the event selection list,#7
  • Tested: With WordPress 5.0.3
  • Tested: With Gutenberg 4.9.0
  • Tested: With PHP 7.2

0.0.2

  • Changed: Improve display of Events #1

0.0.1

  • Added: GPL v3
  • Changed: Improved SEO for Course post type
  • Changed: Change label for playing_status from Statuses to Playing?

0.0.0

  • Added: New plugin, November 2015, just before the AGM 2015

Further reading

If you want to read more about the oik plugins then please visit the oik plugin "the oik plugin - for often included key-information"

tags's People

Contributors

bobbingwide avatar

Watchers

 avatar  avatar

tags's Issues

Support for WordPress 5.0 and the new block editor

Change the registration of the following Custom Post Types to support editing using the new block editor.

  • course
  • trophy
  • player
  • event
  • competitor
  • result

For each post type registration add

$post_type_args['show_in_rest'] = true;

and ensure that the post type supports 'revisions' in addition to other supports values. e.g.

$post_type_args['supports'] = array( 'title', 'editor', 'author', 'revisions' );

[bw_related] shortcode not expanded on the Course tab

When viewing the latest event yesterday I noticed that the Course tab displayed the details for the course but the [bw_related] shortcode from that post's content was not expanded.

https://www.anchorgolf.com/event/25-jun-2022-the-hampshire/?oik-tab=course

Explanation

  • The shortcode is part of a Reusable block called Event history.

image

  • The shortcode is expanded when we view the Course directly.
  • But it's not expanded when the reusable block is embedded in content from [bw_pages]

The problem also occurs in the development environment.

Events: Display player name and membership on the Players tab

When it comes to knowing what to charge a player for a competition we need to know the player's status.

  • For monthly Saturday competitions Members must pay their subs and any backsubs.
  • Most other memberships type should be treated as a guest of some form.
  • Guests with bona-fide handicaps* are entitled to enter the competion on payment of an entry fee.
  • Other guests are not entitled to win the competition, but can win NTPs.

(*) Bona-fide handicaps are:

  • WHS handicap.
  • TAGS handicap, based on at least 3 individual stableford rounds played with the society
  • Handicap confirmed by another society

Requirement

  • Introduce a membership status of Competitive Guest.
  • Display information regarding a player's membership status on the Player list for future events.

The definition of a Competitive Guest is

A guest player at The Anchor Golf Society's events who is allowed to enter competitions on payment of a competition fee. Competitive Guests are those who have a bona-fide handicap, as defined above.

Note: All players should play off the lower of their TAGS or WHS handicap.

Display a player's membership status

Value Means Can enter comp? Subs required?
Player Name Member Yes Yes
Player Name (G) Ex-member / Competitive Guest Yes No
Player Name (g) Guest / One-off Guest No No
Player Name (G)(g) Both Ex-member and a guest Yes No
Player Name (S) Sabbatical Yes No

Notes:

  • The capital (G) indicates that the guest is entitled to pay the competition entry fee.
  • Lower case (g) means the guest is NOT entitled to pay the competition entry fee.
  • The last two displays should not happen.
  • For (G)(g) the player should either an Ex-member or a Guest.
  • For (S) the player should decide on whether or not to return as a member, or become an Ex-member.
  • New players, who were accepted immediately as members, but who have not played 3 comps, and have decided to not become members after all, and therefore intend to play as guests in future events, will be marked as Competitive Guests.

Proposed solution

  • Add a new virtual field called _player_mem, title Player
  • Display this field in place of the _player field, where appropriate
  • Don't display the membership status suffix for events which are in the past. This is to allow for the fact that a player's membership status changes over time.
  • This field is not associated with a post type.
  • The player membership field will reduce the membership taxonomy terms to those that are necessary for determining how to charge the player as documented in the table above.
  • It is the Committee's responsibility to determine the charges.

Course Lat and Long are not determined automatically from the post code.

The Google maps virtual field requires the latitude and longitude. This can be determined automatically from the lat and long fields.

Expected output

Lat and long set automatically from post code when Course is saved.
Google map virtual field shows something useful.

Actual output

Lat and long left blank.

Proposed solution

See solution for dws, a private repo. https://github.com/bobbingwide/dws

Note: If the WordPress SEO meta description is not set then the Google map can still go funny.

Add media queries for printing of the Players table

For every event we need an up to date list of the players so that we can

  • check who's entered the birdies competition
  • tick off the players attending the next competition
  • and make other updates - such as attending the Presentation evening

It'd be nice to be able to do this quickly and easily. It probably doesn't matter about the stuff that surrounds the players table.

Add [tags_results] shortcode to display summary results - Winner and Runner up for each event in the year

I started developing the [tags_results] shortcode a long time ago but didn't implement it because I found another method.

Requirements

[tags_results year=2021]

Date Event Winner Runner up
24 Apr Dummer Bob Unwin 36pts Martin Hawker 35pts
24 May South Winchester Gary Wicks 33 pts on countback Mick Yates 33 pts on countback
etc...
  • Show Event date, Event Title / course, Winner and score, Runner up and score in a table.
  • Order by date ascending
  • Show Event date, event title, Winner and score and Runner up and score in a table.
  • Use year= parameter to choose the year.
  • Find a way of avoiding team comps or prizeless comps. eg exclude= parameter

Proposed solution

  • Re-use the [results] shortcode to display the results for 2020 and 2021.

Nice to have:

  • Implement as a block

TAGS Admin > Competitors and Results not showing last value added on redisplay

I've noticed this a few times this year. When entering the results the last entry is not redisplayed. This has led me to create multiple entries for the same result. Normally a birdie.

PS. I also note that it doesn't work for Competitors.

Workaround

  • Refresh the display before continuing to enter additional results

Improve display of Player to show Results and Attendance history

The Player post currently displays any description and [bw_fields].
We would also like:
Roll of Honour: where the result was Winner, Runner up, Third
Then NTPs and other awards.
Can we get away with [bw_related post_type=result] ?

Plus Event history showing the Competitions the player was registered for.
For past comps this needs to be ordered by Event date desc.

Fatal error when packaging the genesis-tags theme

When running oik-tip to package the genesis-tags theme the 'batch' logic in tags.php kicked in and failed with the following message.

Fatal error: Uncaught Error: Call to undefined function 
oik_batch_load_cli_functions() in 
C:\apache\htdocs\tags\wp-content\plugins\tags\tags.php:48

The logic to attempt to call oik_batch_run_me() is no longer necessary.

Improve initial Event selection on TAGS admin pages

For Competitors the Select the event selection list should default to the current/next event.
For Results the Select the event selection list should default to the previous/current event.

Also, fix any deprecated messages due to renaming of include files in oik.

Improve display of Events which aren't actually competitions

When an event is not a competition then we don't expect to display content in the Results tab.

We may however display the Players for such things as AGM.

Rather than have an event_category we can determine what to display based on the related content.

Also, change some of the fields adding an option #theme_null => false which will prevent the label from being displayed when the field value is null.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.