Skip to content

Census EditCensuses.php

James Cobban edited this page Jan 21, 2024 · 2 revisions

Up: Census Implementation

Source Code

This script displays a table of information about each of the instances of class Census defined for a particular country. You get to this page from genCountry.php which is the page which displays a summary of available resources for a particular country.

Parameters (passed by method=get):

Name Description
cc ISO 3166-1 2-character country code. If this is omitted the information for Canada, code 'CA', is displayed.
offset In case there are so many instances of class Census defined for the country than can be displayed this specifies the starting offset within the set of Censuses. The default is 0 to start from the beginning of the table.
limit The maximum number of Censuses to display at a time. The default is 20.
lang IETF BCP 47 localization identifier including the language. The default is non-country-specific English, code 'en'.

The same script is invoked to update the table using method="post". In this case the parameters passed are:

Name Description
cc ISO 3166-1 2-character country code. If this is omitted the information for Canada, code 'CA', is displayed.
offset In case there are so many instances of class Census defined for the country than can be displayed this specifies the starting offset within the set of Censuses. The default is 0 to start from the beginning of the table.
limit The maximum number of Censuses to display at a time. The default is 20.
lang IETF BCP 47 localization identifier including the language. The default is non-country-specific English, code 'en'.
censusid## the primary key of the instance of class Census. This is usually the ISO 3166 identifier of the domain, which may either be a country or a top-level subdivision of a federal state. For example 'CA1871' or 'USNY1925'. In this and the following fields ## represents the decimal row number which associates all of the input fields from a row of the display.
name## The possibly updated display name of the census.
linesperpage## The number of lines per page in the census of individuals.
grouplines## An indicator of how frequently a thick border is inserted in the display to make it more readable. If the original entry form included such thick borders then that is what should be entered here.
lastunderline## On some censuses the form was designed in such a way that grouplines was not an integral divisor of linesperpage and the form designer suppressed the last thick border for aesthetic reasons.
idsr## This is the primary key of the instance of class Source which is used in citations to this instance of class Census.
TableName## This is the name of the SQL table that contains transcriptions of the records in this census.
TemplateName## This is the base name of the HTML template that is used by CensusForm.php to present a page of the transcription of this census. The actual template is selected by appending 'Display' or 'Update' depending upon whether the current user is authorized to alter the transcription, and the IETF BCP 47 localization identifier.
collective## This is 'Y' if the instance of class Census is a "virtual" census used to logically collect independently administered enumerations of sub-national states. For example the 1861 Census of the provinces of British North America comprises the Censuses of the Censuses of Nova Scotia, New Brunswick, Prince Edward Island, Canada East (Quebec), and Canada West (Ontario). This could also be used to group together the independent State Censuses collected in 1925 by Iowa, Kansas, New York, North Dakota, Rhode Island, and South Dakota.
partof## This is the inverse of the previous field. It indicates for a Census of a sub-national state that it is part of a collective "virtual" instance of class Census.
provinces## This is a string concatenation of the identifiers of the sub-national states organized within a federal Census.

The information displayed and how it is displayed is controlled by a template which is selected based upon the country code and locale and whether or not the user is signed on as a user who has permission to update the Censuses table or is a casual visitor who can only display the database. An example is the display for an authorized user to the US censuses. The script looks for a template which matches both on the capability of the current user and the locale code "EditCensuses$action$lang.html".

Censuses Table Update

Next: genCensuses.php

Clone this wiki locally