More info about the photos subsystem.
1 parent 2ed75f5 commit abfb97d3641a039f96982173c065442c7984c18f
@Kimberlee I. Model Kimberlee I. Model authored on 20 Jan
Showing 2 changed files
View
55
docs/photos.md 0 → 100644
# Photos
The photos subsystem organizes photos for viewing on my website.
It adds a roll of photos as a page on the website.
A roll is a list of photos, and each photo can be tagged with photo tags, for like searchability and stuff.
 
## New Page Types
 
### Roll Page
The roll page displays a roll of images to select them for viewing.
It has the following elements
 
- Roll Title
- Author Name
- Description
- Photos, each with a photograph, description, and some photo tags
 
I may also enable tagging rolls by the post tags and displaying rolls in post lists.
 
URL Format: /roll/{roll-url}[&pwd={roll-password}]
 
### Photo Page
The photo page displays a single photo, its tags and its description, and maybe some similarly tagged photos.
 
The photo has a caption, to describe the image, and a narrative which contextualizes the image.
The caption goes in the `alt=""` or `<figcaption>` tag, while the narritive may be shown below the image.
 
URL Format: /photo/{roll-url}-{photo-sequence}.{ext}[&pwd={roll-password}]
 
### Photo Tag Search
The photo tag page lists images tagged with a particular tag or set of tags.
 
URL Format: /photosearch#t0={tagname}&t1={tagname}...
 
### Management
There will be a management interface to list all rolls, and to make a new or edit a roll.
Also a management interface to edit a photo tag.
 
## Metadata & Visibility
Photo visibility is an important thing, and I'll put in two mechanisms for visibility.
A roll has a visibility affecting the entire roll, and a photo tag has a visibility affecting the visibility of all photos tagged with it.
 
The roll visibility has the following levels
 
1. Private: never veiwable by anyone besides the author
2. Password: visible to anyone with the password
3. Hidden: visible to anyone with its URL, but not navigable or searchable
4. Public: Navigable and searchable
 
The tag visibility has the following levels
 
1. Searchable: visible in the tag search, even if the roll is private
2. Linkable: accessible via a direct link, even on a private roll. The roll's password field will be used to randomize the link in order to avoid guessing.
3. Normal: visibility reverts to that of the photo's roll
4. Private: inaccessible even if the roll is public
View
26
src/main/sql/photos.sql
-- Copyright 2024 Kimberlee Model
-- Copyright 2024-2025 Kimberlee Model
--
-- Licensed under the Apache License, Version 2.0 (the "License");
-- you may not use this file except in compliance with the License.
-- You may obtain a copy of the License at
 
CREATE TABLE rolls
(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
author INTEGER,`
urlfragment VARCHAR(160) NOT NULL UNIQUE,
author INTEGER,
name VARCHAR(512),
upload TIMESTAMP NOT NULL,
description VARCHAR(2048),
visibility INTEGER NOT NULL,
password VARCHAR(70) NOT NULL,
FOREIGN KEY(author) REFERENCES authors(id)
);
 
CREATE TABLE photos
id INTEGER PRIMARY KEY AUTO_INCREMENT,
sequence INTEGER NOT NULL,
roll INTEGER NOT NULL,
fullsize LONGBLOB,
thumbnail BLOB,
description VARCHAR(2048),
FOREIGN KEY roll REFERENCES rolls(id)
caption VARCHAR(1024),
narrative VARCHAR(2048),
upload TIMESTAMP NOT NULL,
mimetype VARCHAR(160) NOT NULL,
extension CHAR(5) NOT NULL,
FOREIGN KEY(roll) REFERENCES rolls(id)
);
 
CREATE TABLE phototags
(
id INTEGER PRIMARY KEY AUTO_INCREMENT,
name VARCHAR(512) NOT NULL,
description VARCHAR(2048),
visibility INTEGER NOT NULL,
url VARCHAR(160),
description VARCHAR(4096),
visibility INTEGER NOT NULL
);
 
CREATE TABLE photodescribes
(