User Tools

Site Tools


nupusi:singapore:development

singapore - Development

The information in this file is for people who wish to contribute to singapore, modify it or understand how it works.

CSV database format

If you choose to use metadata files then each gallery must contain a CSV (comma separated values) file called metadata.csv containing the information about images in the gallery and the gallery itself. CSV files can be edited manually (in a text editor such as Notepad) or using a spreadsheet application (such as MS Excel). Care must be taken when using Excel to save using commas as the separator character and not tabs or semi-colons.

The first line of each file stores human-readable descriptions of the fields and is ignored by singapore. The second line stores information about this gallery:

  field 0
     the filename of the image used to represent the gallery in the gallery list
  field 1
     (not used)
  field 2
     the owner of the gallery
  field 3
     space-separated list of usergroups
  field 4 
     gallery permission flags
  field 5
     space-separated list of categories the gallery belongs in (not used)
  field 6
     gallery name/title
  field 7
     artist name (optional)
  field 8
     artist email (optional)
  field 9
     copyright holder (optional)
  field 10
     description of the gallery (optional)
  field 11
     short summary of the gallery (optional)
  field 12
     human-readable date (optional)
  field 13 onwards
     (not used)

Image data

Each of the following lines (3 - …) represents an image in the gallery. The format is as follows:

  field 0
     the filename of the image
  field 1
     the filename of the thumbnail image
  field 2
     the owner of the image
  field 3
     space-separated list of usergroups
  field 4 
     image permission flags
  field 5
     space-separated list of categories the image belongs in (not used)
  field 6
     image name/title
  field 7
     artist name (optional)
  field 8
     artist email (optional)
  field 9
     copyright holder (optional)
  field 10
     description of the image (optional)
  field 11
     location that the image was taken/made/represents (optional)
  field 12
     date taken/made (optional)
  field 13
     make and model of camera used (optional)
  field 14
     make and model of lens used (optional) 
  field 15
     make and type of film used (optional)
  field 16
     darkroom manipulation (optional)
  field 17
     digital manipulation (optional)

SQL database format

sg_galleries

Field Type NULL Default Description
id varchar(250) No
lang varchar(16) No
filename varchar(200) Yes NULL the filename of the image used to represent the gallery in the gallery list
owner varchar(32) Yes NULL the owner of the gallery
groups varchar(64) Yes NULL space-separated list of usergroups
permissions int(10) Yes NULL gallery permission flags
categories varchar(255) Yes NULL space-separated list of categories the gallery belongs in (not used)
name varchar(255) Yes NULL gallery name/title
artist varchar(255) Yes NULL artist name (optional)
email varchar(255) Yes NULL artist email (optional)
copyright varchar(255) Yes NULL copyright holder (optional)
description text Yes NULL description of the gallery (optional)
summary text Yes NULL short summary of the gallery (optional)
date varchar(255) Yes NULL human-readable date (optional)
hits smallint(5) Yes NULL
lasthit int(10) Yes NULL

sg_images

Field Type NULL Default Description
galleryid varchar(250) No
filename varchar(200) No the filename of the image
lang varchar(16) No
thumbnail varchar(255) Yes NULL the filename of the thumbnail image
owner varchar(32) Yes NULL the owner of the image
groups varchar(64) Yes NULL space-separated list of usergroups
permissions int(11) Yes NULL image permission flags
categories varchar(64) Yes NULL space-separated list of categories the image belongs in (not used)
name varchar(255) Yes NULL image name/title
artist varchar(255) Yes NULL artist name (optional)
email varchar(255) Yes NULL artist email (optional)
copyright varchar(255) Yes NULL copyright holder (optional)
description text Yes NULL description of the image (optional)
width smallint(5) Yes NULL
height smallint(5) Yes NULL
type tinyint(3) Yes NULL
location varchar(255) Yes NULL location that the image was taken/made/represents (optional)
date varchar(255) Yes NULL date taken/made (optional)
camera varchar(255) Yes NULL make and model of camera used (optional)
lens varchar(255) Yes NULL make and model of lens used (optional)
film varchar(255) Yes NULL make and type of film used (optional)
darkroom text Yes NULL darkroom manipulation (optional)
digital text Yes NULL digital manipulation (optional)
hits smallint(5) Yes NULL
lasthit int(10) Yes NULL

sg_users

Field Type NULL Default Description
username varchar(32) No
userpass varchar(32) No
permissions int(10) Yes NULL
groups varchar(64) Yes NULL
email varchar(255) Yes NULL
fullname varchar(255) Yes NULL
description varchar(255) Yes NULL
stats varchar(255) Yes NULL
nupusi/singapore/development.txt · Last modified: 2008/12/06 13:57 (external edit)