British Go Association
Published on British Go Association (http://britgo.org)

Home > Content > BGA Website Management

BGA Website Management

1. Introduction

This document describes the various activities that are needed to maintain the BGA website in full error-free operation. It is not intended to be generally publicly available, but should be for the webmaster and everybody who had management access to the website.

The following people have contributed to the creation of this document: Tony Atkins, Brian Brunswick and Jon Diamond

2. Hosting

2.1 Hosting

This web site is hosted by Bytemark [1], on their normal commercial terms. The site started in 1998, but was revamped in spring 2008 to operate using Drupal.

We have a complete virtual server running Debian Linux "Lenny". The web server is Apache with many pages in PHP5. Databases are in MySQL. Some support software is in Perl other software In Python.

2.2 User accounts and Permissions

A limited number of people have full user access to our server. Each of these have a separate account, with all having the same group (users), to allow updating of the required directories, i.e. essentially those for our website.

All registered users have access to group "users". Common files are owned by this group, with directories set to 02775 permission to propagate the group ownership to files and directories contained therein. The standard umask is 002, permitting group write.

Some of these accounts allow admin access to the server.

For security reasons users are expected to connect to the server using SSH.

Users are encouraged to generate and install a SSH key to avoid password access (this is actually more secure as it identifies the user uniquely). See "ssh-keygen" and "ssh-copy-id" if running Linux or UNIX-style systems.

2.3 FTP accounts and permissions

This facility was used when hosting was provided by Pair. There are no such requirements currently.

Authorised users are expected to move to SFTP in due course if needed.

2.4 Configuration Details

2.4.1 Linux

Implementation is standard as provided by Bytemark.

To set up additional domains and/or subdomains, edit the files in /root/BytemarkDNS/data following the comments therein and run the script /root/BytemarkDNS/upload.

2.4.2 Apache

The configuration file for each server is in /etc/apache2/sites-available. When editing is complete, the file should be symbolically linked into /etc/apache2/sites-enabled and the server restarted.

There are a number of Drupal-based websites set up in /var/www:

  • bgasite

    www.britgo.org, www.britgo.org.uk, www.baduk.org.uk

  • bgasite_old

    old.britgo.org - our old website (as of November 2010, Drupal 5)

  • bgasite_testing

    test.britgo.org - testing version for CiviCRM

In addition the following website directories also exist in /var/www:

  • challenge

    ukgochallenge.org website

  • onlineleague

    league.britgo.org

2.5 General Maintenance activities

2.5.1 Backup

Backup currently uses Backup2l to copy system configuration, web and database files to a separate Bytemark server.

To recover data, the server can be NFS-mounted and the data retrieved.

2.6 Email

Email addresses for other than the archived mailing lists are all specified as aliases in the file /etc/aliases.

The 3 archived mailing lists, "gotalk", "bga-policy" and "youth-go" are managed using "mailman". For more details, see the index [2].

3. Drupal

3.1 Drupal

Drupal [3] is a free and open source modular framework and content management system (CMS) written in the programming language PHP using MySQL as the database management system. Drupal, like many modern CMSs, makes it easier to create and organise content, allows easy site searching, provides menus and book facilities, an RSS feed and manages site contributors.

3.2 Configuration

Drupal version 6.19 was installed in December 2010.

3.3 Maintenance activities

The Status Page [4] need regular monitoring as does the Log page [5].

Modules may need updating to fix bugs etc.

The website admin page [6] contains links to common activities.

3.4 Site Style

The site style is garlandbga, which is a modification of the standard garland.

3.5 Blocks

The following blocks are used within the site. Most of these are standard Drupal ones that are configured through Drupal->Administer->Site Building->Blocks.

The only one that is expected to be updated on any regular basis is the BGA Current Information with the Front Page right (News Type block) being changed occasionally. These are both only displayed on the Front Page.

  1. Header
    • Search box
  2. Left hand column
    • Navigation
      The menu system (see below)
    • Active forums
      Shown only for logged in users
    • Secondary links
      Not used anymore
      Join the BGA, Contact Us, Site Index
    • Current Information
      Front page only
      Contains the latest information about BGJ, Newsletter and Council dates Please don't change the title of the Future Go Events in the UK (Tournament Calendar) page otherwise this won't work.
      If you're wondering I cribbed the basic code from somewhere else...
    • Online League
      Certain news pages only
      Shows the feed from the League minisite. This block is available because this feed is selected in the RSS News Aggregator
    • Last site update
      Not used any longer
    • Site Index
      Used on Site Index pages only
    • CiviCRM ones
      Used on CiviCRM pages only
  3. Right hand column
    • Book Navigation
      Only on book pages
      Shows an internal book index and is excluded for the first page for each book
    • News Type
      Front page only
      Is a Block generated from a View. The remaining non-news items are in the Header/Footer sections of the View. You can edit it directly from the Front Page by hovering over the colun and clicking on the [Edit] button
    • Forthcoming tournaments key
      Only on /tournament/index page
      It's created like this to make it easier to maintain the Forthcoming Tournaments page
    • Historic tournaments key
      Only on /tournaments/history* pages

Note: The weights are chosen so that they display in the order chosen.

3.6 Menus

The Menu system is in three parts - the Primary Links are those displayed at the top of all pages, the Secondary Links no longer used are those displayed under the Navigation links, which are the main items requiring some maintenance.

Entries are created in the Navigation links in two ways - either by selecting a Menu item within the Page/Story/Book entry or by creating a New (custom) Menu Item on the Drupal->Administer->Site Building->Menu page.

You can create two references to the same page from within the menu system, but it's recommended that in this case both should be custom items, to avoid future confusion.

The policy for menu items, no matter which way they are created, is:

  • The menu hierarchy should only be more than 3 levels in exceptional circumstances
  • The item path must always be a named URL for at least the top level and preferably for the second level (requires allocation of a URL when creating the Page/Story)

Note carefully that the weights are chosen so that they display in the correct order, not the alphabetical one.

3.7 Views

The Drupal Views system is used to create the News and Site Update pages (Drupal->Administer->Site Building->Views). In February 2011 Review and Club List Views were added.

These should be mostly self-explanatory when you examine them, but the following should be noted:

  • Table Views are normally used, but not for the Newsletter View (views/newsletter) and a few others
  • Pager mode is used, with typically 20 nodes per page
  • Menus are used for the News and Site Update, but provided as a Tab and therefore not in the normal menu system
    This has the unfortunate side-effect of removing the location information from the page header
  • There are two top-level Tab menus, defined by the URL structure, i.e. views/? and updates/?. Creating something xxx/? would create another top-level Tab
  • All current views have a filter of Node:published=Yes. This is strongly recommended
  • The News views use only Story, Poll or Image items. The Site Update views don't use Book Pages, Forums or Blog entries.

3.8 User Management

Users should be added as necessary and given only the permissions required to do their jobs: website contributor, website editor or admin plus the CiviCRM ones are the only classes currently.

Club editor was added in February 2011 to allow club secretaries to edit only the Club list pages (content type=club). If the secretary wants to edit their own web pages, then they also need to be at least a Web contributor.

3.9 Content Types

A new content type Club has been created to support the easy entry and maintenance of the data for our Clubs list, map and BGJ entries. This is like a page, but with some additional fields.

Note: The list of regions is held as a text drop-down list. So changing the name of a region requires you to go through every club in the region to change their entry and creating a revision entry for those clubs. Moral: don't even think of changing a region name!

4. MySQL

what needs to be said?

5. Other activities

There are a number of other maintenance activities, some involving bespoke scripts, that are involved in keeping the website up to date. Most of these are accessible from the Website admin page [6].

5.1 Forwarding Lists and Aliases

Other than the lists managed by mailman (gotalk, youth-go and bga-policy), the lists and aliases apart from club-contacts@britgo.org are managed entirely by editing /etc/aliases. Each line in the file consists of the required alias, a colon, and one or more targets. The targets may be other aliases defined elsewhere in the file.

Changes to the file are effective immediately.

council-private

This list consists of all Council members, and no others. It is used for most email discussion within Council (especially for the rare occasions where something needs to remain confidential.) It has the following aliases:

president, treasurer, secretary, council-* (for other members)

council-discussion

This list is a generally low traffic list used for things which would benefit from wider discussion, e.g. drafts of publicity material, new policy ideas, etc. As at April 2010 it consists of the following aliases:

council-private, journal, mem, newsletter, vp-atkins, vp-wendes, auditor

club-contacts

This is generated automatically every hour from http://britgo.org/clubs/emailonly, so is an up to date list of all the club contacts.

5.2 Mailing Lists

The following mailing lists are maintained:

bga-policy

This is open to BGA members, but is moderated by the BGA and requests for membership of the list are sent to the list manager - president @ britgo.org.

gotalk

youth-go

Shodan Challenge lists:

  • scers @ britgo.org - goes to all participants
  • shodan-challengers @ britgo.org - goes to all challengers
  • shodan-mentors @ britgo.org - goes to all mentors

5.3 Leagues

to be written - John

5.4 Changing Officers

Whenever the Officers change, normally after the AGM, the following changes need to be applied:

  • the Officials page [7] (you may need to add a Person first if they haven't been an Official before),
  • the historic list of Officers [8],
  • for a Treasurer change: Levy Form (2 versions - RTF [9] and PDF [10] )
  • the two Council mailing lists.

For a Membership Secretary change also:

  • Joining page [11] and attached PDF Membership form
  • Schools Membership [12] and attached PDF Membership Form

5.5 Change in Membership Rates

  • Joining page [11] and attached PDF
  • Payment page [13]
  • Membership Form [14]
  • Schools Membership page [12] and attached PDF
  • Schools Membership [15]
  • Paypal buttons need to be modified too - this requires logging in to the BGA Paypal account and then also downloading them into the Payment page [13] - modifying <table> stuff to <br>

5.6 Change in the levy rates

http:/www.britgo.org/event/levy/form [16]

5.7 Organisation Structure pages

Three new Drupal Content Types have been created to handle this maintenance activity:

  • Person

    This holds the basic information about a person:

    • Name
    • Phone - two possible
    • Email only shown in edit mode, so the real one must be entered
    • Address
    • Photo = the file name used in /files/photos (this needs to be in the format surnameinitial.jpg e.g. diamondj.jpg - this is most important as it's used in sorting People into surname order!). Even if there isn't an actual file the expected file name should still be entered.
    • Profile
    • Active - Used for selective Views - if not Active then the person does not appear in the normal People's list
    • Grade - Dan certificate
  • Committee

    This defines the overall Committee structure. There are two specific ones which are not normally seen, but are used to make the Views structure work: COUNCIL and OTHER which contains the names of those with Honorary positions plus the Auditor.

    • Title = name
    • Chairman
    • Body = Description
  • Position
    • Role = Officials title
      Note: President, Secretary and Treasurer have a space in front to ensure they sort in the correct order on the Council page)
    • Committee
    • Person
    • Job Description

Views

There are three Views listed - Positions [17], People [18] and Contact Us Page [19], but there are several display pages defined within Positions to create the various displays required. These all have URLs starting position/ to ensure that all the Menu tab items at the top of the displays contain all the relevant pages.

Council and Contact pages are a little more complicated, as they contain Attachments displaying second and subsequent bits (for the COUNCIL and OTHER committees and non-President contacts), to ensure that the whole structure is shown.

The Photos field is used to sort displays into person name order, so appears in a number of displays although the field itself is not displayed.

Note: All Views have been created with specific roles allowing access, so that some are restricted to certain people. Those that aren't restricted have access allowed from Anonymous and Authorised users, i.e. effectively everybody.

6. Ratings Updates

The BGA rating system is controlled by code and files held on the BGA website in public_html/rating/graph

It runs every night to process the info from EGD and produce various web pages, messages and files of output.

The following needs updating as a result of moving to Bytemark and changing the system in February 2011 - John

6.1 General

The contents of the rating/graph directory are:

all.hst                       graph.php                  results_pages.txt
alleuro.html                  hisgor.zip                 tlist.html
archive                       index.php                  tournament_names.txt
calibration.txt               name_changes.txt           update.pl
calibration_backup.txt        percentiles.html           update.pl.2008
certificates.txt              percentiles.pl             update.pl.2009a
championship_qualifiers.html  player_names.txt           update.pl.old
club_names.txt                possible_certificates.php  update_cal.pl
comparison.html               possible_promotions.txt    update_tlist.pl
data                          qualifiers.html
exclusions.txt                readme.txt

Some of those are old versions of code, etc

The main program is update.pl but also update_cal.pl and update_tlist.pl are used. The later two seldom need changing. It is update.pl that does the bulk of the work and is the thing that needs changing from time to time. It was written by Tim Hunt, but I have changed some bits of it from time to time.

Beware that I (Tony Atkins) usually change the sources I keep and then upload, so any changes should be notified back to me.

Some of the things in the directory are subdirectories:

data contains .txt files for the playerids of each player. archive contains dated comparison.html files for the grader's reference (comparison between BGA and EGF grades etc).

The .pl programs are automatically run each night, but can be manually run using ./xxxxx.pl from within the rating/graph directory. Login to the maproom user using PuTTY or equivalent and cd into public_html/rating/graph

If you can file transfer directly into the directory then do so, but if your free FTP program will not allow this (due to permissions problems in the Pair setup) then file transfer in to directory tournament_results and use mv -i filename ../public_html/rating/graph/filename to move the file across.

6.2 Update.pl

There are certain things that need changing from time to time, for example the name of the EGD file (when they change it), and the qualification year (eg 2010). All the constants such as the year number and filenames are defined at the beginning and are easy to find. Note that the dates used start at month 0 so 2 is March and 3 is April. The qualification year is currently set to 1st April 2010 to 30th March 2011. This will need resetting April next year to set the new candidates qualifiers in file qualifiers.html.

It creates 2 web pages: the main rating list page, the qualifiers page.

Various messages can be sent upon each run. The code has been set to supress these (using boolean $supress). Some may still be issued in some failure conditions. When the code ran monthly it was no problem to generate messages, but with a run every night too many messages are produced if not supressed.

The EGD file is transfered in and unzipped for processing. It overwrites the previous version in the directory.

6.3 Results Pages

Each event has a 8 character code made the type, startdate and a unique suffix. The results_pages.txt file needs updating after each event to point to the results page on the BGA web site. If no BGA page is available the EGF page can be used. Other country and tournament pages are unreliable and often disappear so for most foreign events it is best just to point to the tournaments entry in the EGD database using the key.

This file needs to end up in rating/graph once amended. It will be picked up on the next run (eg overnight).

Then on the rating page there will be a link on the last played date for each person, and on each person's page to all the rated events they have played.

6.4 Certificates

When a person is awarded a dan certificate their entry should be updated or created in certificates.txt. This is used when looking for promotions to recommend to the secretary in possible_promotions.php (by way of the equivalent possible_certificates.txt file).

6.5 Exclusions

To exclude someone from the ratings file eg deceased players there is a list held in the update.pl code:

my %exclude = ( '10537659','10537659','13074061','13074061','10613801','10613801');

This was originally intended to be held in a file of exclusions.txt, but due to a bug in perl on Pair's system the implemented code never worked.

The number is the EGD playerid.

6.6 Club Codes

EGD uses 4-char club codes and formerly 3-char ones. Our code converts those to real names using club_names.txt

Check the rating list for new codes appearing unconverted (most club names are longer than 3 or 4 characters so they are easy to spot) or get an update from Geoff Kaniuk.

6.7 Update_cal.pl

This program updates the calibration reports for Geoff.

6.8 Update_tlist.pl

This program runs first to see if the EGD data has changed since the last run and aborts the rating run if no change is detected.

6.9 Regular maintenance:

  • club_names.txt when codes change
  • certificates.txt when diplomas issued
  • results_pages.txt after each tournament is rated
  • update.pl annually with qualification year
  • update.pl exclusions when death

6.10 GoDraw Player Names

Geoff Kaniuk also gets his list of players/clubs/grades from the rating update for use in GoDraw. The update_players_list.pl script runs at the nightly ratings update. The script and its associated workhorse 'playerlist.c' resides in .../godrawsys.

7. Outstanding Items

7.1 To be done

Convert the following pages to the current style:

  • League (maybe)
  • Site Index (partially done)

7.2 Requests

  • iCal/Caldav interface for Tournament (and other?) events - from Andrew Thurman

Source URL: http://britgo.org/node/2754

Links:
[1] http://www.bytemark.co.uk
[2] http://lists.britgo.org/listinfo
[3] http://www.drupal.org
[4] http://www.britgo.org/admin/reports/status
[5] http://www.britgo.org/admin/reports/dblog
[6] http://britgo.org/website/admin
[7] http://britgo.org/positions/officials
[8] http://britgo.org/history/officers
[9] http://britgo.org/files/levyform_2012.rtf
[10] http://britgo.org/files/levyform_2012.pdf
[11] http://britgo.org/join
[12] http://britgo.org/membership/schap.html
[13] http://britgo.org/join/pay
[14] http://britgo.org/join/form
[15] http://britgo.org/membership/schaponly.html
[16] http://britgo.org/event/levy/form
[17] http://britgo.org/admin/build/views/edit/Positions
[18] http://britgo.org/admin/build/views/edit/People
[19] http://britgo.org/admin/build/views/edit/Contact_Us_Page