Template:Snooker player points/doc

Usage
This template produces the wikicode for a player entry on the Snooker ranking points articles e.g. provisional Snooker world rankings. The template is specifically designed for this article. The template produces wikicode that calculates ranking points for the player.

The parameters are:

position (the new position in the rankings - this will need to be input after the table is sorted) first (first name of the player as written) last (last name of the player as written) note (note link for the player) playerlink (the name of the player article if there is one; even if the name and article name are the same, it is still necessary to include this to link to the article) country (the player's nationality code e.g. SCO for Scotland) start (the player's official rank at the start of the season—necessary so that a player's climb and descent in the rankings can be tracked over the course of the season)

livepoints The livepoints parameter takes the points from the season that is being dropped i.e. the 2011/12 season points are dropped throughout 2013/2014. This parameter takes the tournament points using Template:Snooker season points. By setting the current season, season & cutoff parameters in Template:Snooker season points the template will determine which points need to be dropped.

lastseason (last season takes the previous season's points using Template:Snooker season points).

The points for the current season are taken using individual parameters: currentseason (the current season in xxxx/xxxx format) season (the season of displayed tournament in xxxx/xxxx format) cutoff (the next cut-off point i.e. 1,2,3,4,5,6,7) ptc1, ptc2, ptc3, ptc4, ptc5, ptc6, ptc7, ptc8, ptc9, ptc10, ptc11, ptc12, aptc1, aptc2, aptc3, aptc4, eptc1, eptc2, eptc3, eptc4, eptc5, eptc6, eptc7, eptc8, ptcgf(the Player Tour Championship events) ao (Australian Open) bc (Bahrain Championship) bo (British Open) cc (China Championship) 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)

Background highlighting can be specified by adding "bg" to the end of the tournament code (ptcbg) in the case of the Players Tour Championship. E.g. wcbg is the parameter for highlighting the world championship cell in the table.

Example:

}}

produces wikicode for a table entry:

New tournaments and seasons
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.

This template works in conjunction with Snooker season points in automating the totals at each cut-off point for each season. This template only 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 for updating Snooker season points are outlined at that template. For this template, each new tournament needs to be allocated a new tournament code (for both the points and the background shading), and need to be added to this template in each section that has tournament codes. 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 follow the instructions at Snooker season points.

Further cut-off points
The template currently accommodates up to twelve cut-off points (including the total). It is possible that extra cut-off points will be added to the calendar at some point. It is relatively straightforward to added new cut-off points, requiring both this template and Snooker season points to be updated.

In the case of cut-off point 13 the following code would need to be copied into the bottom of the template:



To add a cut-off point 14, the same code can be used with a few alterations:
 * 1) In the first 'if' line change 1|13 to 1|14
 * 2) In the second line change >= 13 to >= 14
 * 3) In the second line again change 1|13 to 1|14
 * 4) In the second line change cutoff=13 to cutoff=14
 * 5) At the end of the second line change again change 1|13 to 1|14

Once you have completed the update on this template then follow the instructions at Snooker season points.