Album software van pics.hashru.nl
Aaron van Geffen
c0d69f7205
Thumbnails are normally created on demand, e.g. when processing the format codes in a post's body text. Normally, the temporary URL is only used once to generate thumbnails ad-hoc. However, when cache is enabled, a reference to the asset may be used in a cached version of a formatted body text, skipping the normal thumbnail generation routine. When an asset is replaced, currently, all thumbnails are removed and references to them are removed from the database. In case the asset is still referenced in a cached formatted body text, this could lead to an error when requesting the thumbnail, as the thumbnail request is no longer present in the system. As we do not know what posts use particular assets at this point in the code, it is best to work around this issue by unsetting the thumbnail filenames rather than deleting the entries outright. This effectively generates them again on the next request. In the future, we should aim to keep track of what posts make use of assets, so cache may be invalidated in a more targeted way. |
||
---|---|---|
controllers | ||
models | ||
public | ||
templates | ||
.gitattributes | ||
.gitignore | ||
app.php | ||
composer.json | ||
config.php.dist | ||
import_albums.php | ||
import_postprocess.sh | ||
LICENSE.md | ||
migrate_thumbs.php | ||
README.md | ||
server | ||
TODO.md |
HashRU Pics
This is the development repository for the HashRU photo website. The CMS and its modules originate in Kabuki CMS, but have been extended and are maintained separately in this repository.
Requirements
The Kabuki codebase requires the following PHP extensions to be enabled for full operation:
- exif
- imagick (PECL)
- mysqli
Setup
Copy config.php.dist
to config.php
and set-up the constants contained in the file.
Running
For development purposes, simply run the server
script provided in the root of this repository.
This will start a PHP development server on hashru.local:8080
.
For a production environment, please set up a proper PHP-FPM environment instead.
Contributing
Pull requests are welcome over at the HashRU Gitea.
License
The HashRU Pics repository is licensed with a BSD 3-clause license, as is Kabuki CMS.