Jump to content

Template:Snooker season points/doc

From Wikipedia, the free encyclopedia

Usage[edit]

An additive function that takes the points for the tournaments in a season and sums them. By including the cutoff parameter, the points valid at each cutoff point will be summed, and will return a value for all cutoff points in the form X1/X2/X3/X4/X5/X6/X7/X8/X9/X10. Including the parameter option and setting it to expand will generate the table entry wikicode for the tournament points in the provisional ranking chart.

The parameters are:

currentseason (the current snooker season i.e. 2013/2014)
season (the season the points come from)
cutoff (the cutoff point i.e. 1, 2, 3...)
ao (Australian Open)
bc (Bahrain Championship)
bo (British Open)
cc (China Championship)
cl (Championship League)
co (China Open)
eno (English Open)
eum (European Masters)
euo (European Open)
gm (German Masters)
go (Gibraltar Open)
gp (Grand Prix)
ic (International Championship)
io (Indian Open)
nio (Northern Ireland Open)
nit (Northern Ireland Trophy)
pc (Players Championship)
phc (Paul Hunter Classic)
rm (Riga Masters)
sm (Shanghai Masters)
sco (Scottish Open)
sso (Snooker Shoot-out)
tc (Tour Championship)
tm (Turkish Masters)
uk (UK Championship)
wc (World Championship)
weo (Welsh Open)
wgp (World Grand Prix)
woo (World Open)
wps (WST Pro Series)
wuc (Wuxi Classic)

ptc1, ptc2, ptc3, ptc4, ptc5, ptc6, ptc7, ptc8, ptc9, ptc10, ptc11, ptc12 (Players Tour Championship)
aptc1, aptc2, aptc3, aptc4 (Asian Players Tour Championship)
eptc1, eptc2, eptc3, eptc4, eptc5, eptc6, eptc7, eptc8 (European Players Tour Championship)
ptcgf (PTC grand final)

option (set to expand to generate the table code for each player)

Highlighting can be included in the wikicode by including a highlighting parameter. Each tournament parameter has an accompanying highlighting parameter which is the same as its name with "bg" appended to the end i.e. nitbg, ukbg. The highlighting parameter for the PTC entry is ptcbg.

Example:

{{Snooker season points |currentseason=2010/2011 |season=2010/2011 |sm=7000 | woo=3500 | uk=2850 |weo=3200 |co=1900 |wc=6400}} returns 24850

{{Snooker season points |currentseason=2010/2011 |season=2010/2011 |cutoff=2 |sm=7000 | woo=3500 | uk=2850 |weo=3200 |co=1900 |wc=6400}} returns 10500/13350/16550/24850

{{Snooker season points |option=expand |currentseason=2010/2011 |season=2010/2011 |cutoff=2 |sm=7000 | woo=3500 |uk=2850 |ukbg=#ffffaa |weo=3200 |webg=#ffffaa |co=1900 |cobg=#ffffaa |wc=6400 |wcbg=#ffffaa}} returns:
style="background:" | 0 | style="background:" | 7000 || style="background:" | 3500 || style="background:#ffffaa" | 2850 || style="background:" | || style="background:" | 3200 || style="background:#ffffaa" | 1900 || style="background:#ffffaa" | 6400

Updating the template[edit]

This template works in conjunction with {{Snooker player points}} in automating the totals at each cut-off point for each season. That template needs to be updated each time a new tournament is added to the calendar, while {{Snooker season points}} needs to be updated for every season and for each new tournament. The instructions here just detail what needs to be done to this template, and the update instructions for {{Snooker player points}} can be found there.

If you have any problems updating the template post a request on the talk page, and consider following the link at the top of the talk page to the snooker project to notify them of the issue.

New tournaments[edit]

For this template, each new tournament needs to be allocated a new tournament code (for both the points and the background shading). It is best to keep it systematic e.g. all the main tournament codes ordered alphabetically and then all the ptc codes, and then the background codes. However, do not remove codes for defunct tournaments, since this template is used by the older season articles. You can't go wrong if you just stick them in where the other codes are. Once you have completed the update on this template then make sure new tournament codes are added to {{Snooker player points}}.

New seasons[edit]

This template has a "helper" template for each new season that calculates the point totals at each cut-off point. Each season needs its own dedicated template (i.e. {{Snooker season points/2010/2011}}) since tournaments may be added or removed from the calendar, and the cut-off points may vary from season to season. Here are some pointers:

  1. The table point headings may need to be altered to accommodate any changes to the calendar.
  2. Current season – This calculates the point totals from the current season at each cut-off point; this requires a sum for each cut-off point. It will vary from season to season depending on the tournaments for that season and when the cut-off points are.
  3. Last season – This is straightforward, and should sum all the points from the previous season.
  4. Previous season – This calculates the point totals from two seasons ago at each cut-off point; this requires a sum for each cut-off point dependent on when the points are dropped. It will vary from season to season depending on the tournaments for that season and when the cut-off points are.

Further cut-off points[edit]

It is possible that extra cut-off points will be added to the calendar at some point. It is relatively straightforward to add new cut-off points, requiring both the season helper template and {{Snooker player points}} to be updated. The main {{Snooker season points}} will not be affected unless new tournament codes also need to be added.

See also[edit]

Templates
Lists