2014-04-26 21:43:13 +00:00
|
|
|
```
|
2020-03-21 22:47:34 +00:00
|
|
|
_________.__ .__ .__ ________
|
|
|
|
/ _____/| |__ |__| _____ _____ |__| ____ \_____ \
|
|
|
|
\_____ \ | | \ | | / \ / \ | |_/ __ \ / ____/
|
|
|
|
/ \| Y \| || Y Y \| Y Y \| |\ ___/ / \
|
|
|
|
/_______ /|___| /|__||__|_| /|__|_| /|__| \___ >\_______ \
|
|
|
|
\/ \/ \/ \/ \/ \/
|
|
|
|
|
2014-04-26 21:43:13 +00:00
|
|
|
```
|
2012-02-12 19:40:38 +00:00
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
# Shimmie
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2020-02-14 11:31:13 +00:00
|
|
|
[![Unit Tests](https://github.com/shish/shimmie2/workflows/Unit%20Tests/badge.svg)](https://github.com/shish/shimmie2/actions)
|
|
|
|
[![Code Quality](https://scrutinizer-ci.com/g/shish/shimmie2/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=master)
|
2016-06-19 16:41:40 +00:00
|
|
|
[![Code Coverage](https://scrutinizer-ci.com/g/shish/shimmie2/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=master)
|
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
This is the main branch of Shimmie, if you know anything at all about running
|
|
|
|
websites, this is the version to use.
|
2014-04-26 21:47:14 +00:00
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
Alternatively if you want a version that will never have significant changes,
|
|
|
|
check out one of the versioned branches.
|
2007-04-16 11:58:25 +00:00
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
# Requirements
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2019-10-01 10:06:40 +00:00
|
|
|
- These are generally based on "whatever is in Debian Stable", because that's
|
|
|
|
conservative without being TOO painfully out of date, and is a nice target
|
|
|
|
for the unit test Docker build.
|
|
|
|
- A database: PostgreSQL 11+ / MariaDB 10.3+ / SQLite 3.27+
|
|
|
|
- [Stable PHP](https://en.wikipedia.org/wiki/PHP#Release_history) (7.3+ as of writing)
|
2014-04-26 21:43:13 +00:00
|
|
|
- GD or ImageMagick
|
2007-04-16 11:58:25 +00:00
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
# Installation
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2016-06-19 03:51:48 +00:00
|
|
|
1. Download the latest release under [Releases](https://github.com/shish/shimmie2/releases).
|
2016-06-19 16:41:40 +00:00
|
|
|
2. Unzip shimmie into a folder on the web host
|
|
|
|
3. Create a blank database
|
2016-06-19 03:51:48 +00:00
|
|
|
4. Visit the folder with a web browser
|
|
|
|
5. Enter the location of the database
|
|
|
|
6. Click "install". Hopefully you'll end up at the welcome screen; if
|
2007-04-16 11:58:25 +00:00
|
|
|
not, you should be given instructions on how to fix any errors~
|
|
|
|
|
2016-05-19 14:15:02 +00:00
|
|
|
# Installation (Development)
|
|
|
|
|
2019-10-01 09:51:13 +00:00
|
|
|
1. Download shimmie via the "Download Zip" button on the [master](https://github.com/shish/shimmie2/tree/master) branch.
|
2016-06-19 03:55:32 +00:00
|
|
|
2. Unzip shimmie into a folder on the web host
|
|
|
|
3. Install [Composer](https://getcomposer.org/). (If you don't already have it)
|
2017-03-10 15:49:58 +00:00
|
|
|
4. Run `composer install` in the shimmie folder.
|
|
|
|
5. Follow instructions noted in "Installation" starting from step 3.
|
2016-05-19 14:15:02 +00:00
|
|
|
|
2018-11-10 11:19:56 +00:00
|
|
|
# Docker
|
2020-03-22 15:23:23 +00:00
|
|
|
If you just want to run shimmie inside docker, there's a pre-built image
|
|
|
|
in dockerhub - `shish2k/shimmie2` - which can be used like:
|
2018-11-10 11:19:56 +00:00
|
|
|
```
|
2020-03-22 15:23:23 +00:00
|
|
|
docker run -p 8000 -v /my/hard/drive:/app/data shish2k/shimmie2
|
2018-11-10 11:19:56 +00:00
|
|
|
```
|
|
|
|
|
2020-03-22 15:23:23 +00:00
|
|
|
If you want to build your own image from source:
|
2018-11-10 11:19:56 +00:00
|
|
|
```
|
2020-03-22 15:23:23 +00:00
|
|
|
docker build -t shimmie .
|
2018-11-10 11:19:56 +00:00
|
|
|
```
|
|
|
|
|
2020-03-22 15:23:23 +00:00
|
|
|
There are various options settable with environment variables:
|
|
|
|
- `UID` / `GID` - which user ID to run as (default 1000/1000)
|
|
|
|
- `INSTALL_DSN` - specify a data source to install into, to skip the installer screen, eg
|
|
|
|
`-e INSTALL_DSN="pgsql:user=shimmie;password=6y5erdfg;host=127.0.0.1;dbname=shimmie"`
|
2018-11-10 11:19:56 +00:00
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
### Upgrade from earlier versions
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2010-03-02 02:48:11 +00:00
|
|
|
I very much recommend going via each major release in turn (eg, 2.0.6
|
2014-04-26 21:47:14 +00:00
|
|
|
-> 2.1.3 -> 2.2.4 -> 2.3.0 rather than 2.0.6 -> 2.3.0).
|
|
|
|
|
2019-01-06 11:55:08 +00:00
|
|
|
While the basic database and file formats haven't changed *completely*, it's
|
|
|
|
different enough to be a pain.
|
2010-03-02 02:48:11 +00:00
|
|
|
|
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
## Custom Configuration
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2012-03-31 17:59:28 +00:00
|
|
|
Various aspects of Shimmie can be configured to suit your site specific needs
|
2014-04-26 21:43:13 +00:00
|
|
|
via the file `data/config/shimmie.conf.php` (created after installation).
|
|
|
|
|
2019-06-12 22:35:32 +00:00
|
|
|
Take a look at `core/sys_config.php` for the available options that can
|
2012-03-31 17:59:28 +00:00
|
|
|
be used.
|
2012-02-12 19:56:21 +00:00
|
|
|
|
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
#### Custom User Classes
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
User classes can be added to or altered by placing them in
|
|
|
|
`data/config/user-classes.conf.php`.
|
2014-04-26 21:47:14 +00:00
|
|
|
|
2019-01-06 11:55:08 +00:00
|
|
|
For example, one can override the default anonymous "allow nothing"
|
|
|
|
permissions like so:
|
2012-03-19 11:27:01 +00:00
|
|
|
|
2014-04-26 21:43:13 +00:00
|
|
|
```php
|
2019-06-14 17:45:15 +00:00
|
|
|
new UserClass("anonymous", "base", [
|
2019-07-09 14:10:21 +00:00
|
|
|
Permissions::CREATE_COMMENT => True,
|
|
|
|
Permissions::EDIT_IMAGE_TAG => True,
|
|
|
|
Permissions::EDIT_IMAGE_SOURCE => True,
|
|
|
|
Permissions::CREATE_IMAGE_REPORT => True,
|
2019-06-14 17:45:15 +00:00
|
|
|
]);
|
2014-04-26 21:43:13 +00:00
|
|
|
```
|
2012-03-19 11:27:01 +00:00
|
|
|
|
2014-04-26 21:47:14 +00:00
|
|
|
For a moderator class, being a regular user who can delete images and comments:
|
2012-04-28 10:02:12 +00:00
|
|
|
|
2014-04-26 21:43:13 +00:00
|
|
|
```php
|
2019-06-14 17:45:15 +00:00
|
|
|
new UserClass("moderator", "user", [
|
2019-07-09 14:10:21 +00:00
|
|
|
Permissions::DELETE_IMAGE => True,
|
|
|
|
Permissions::DELETE_COMMENT => True,
|
2019-06-14 17:45:15 +00:00
|
|
|
]);
|
2014-04-26 21:43:13 +00:00
|
|
|
```
|
2012-04-28 10:02:12 +00:00
|
|
|
|
2019-07-09 14:10:21 +00:00
|
|
|
For a list of permissions, see `core/permissions.php`
|
2012-03-19 11:27:01 +00:00
|
|
|
|
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
# Development Info
|
2014-04-26 21:43:13 +00:00
|
|
|
|
2019-01-06 11:55:08 +00:00
|
|
|
ui-\* cookies are for the client-side scripts only; in some configurations
|
2012-08-15 09:43:28 +00:00
|
|
|
(eg with varnish cache) they will be stripped before they reach the server
|
|
|
|
|
2019-01-06 11:55:08 +00:00
|
|
|
shm-\* CSS classes are for javascript to hook into; if you're customising
|
2012-08-15 20:19:51 +00:00
|
|
|
themes, be careful with these, and avoid styling them, eg:
|
2012-08-15 09:43:28 +00:00
|
|
|
|
2012-08-15 19:42:56 +00:00
|
|
|
- shm-thumb = outermost element of a thumbnail
|
2014-04-26 21:43:13 +00:00
|
|
|
* data-tags
|
|
|
|
* data-post-id
|
2012-08-15 20:19:51 +00:00
|
|
|
- shm-toggler = click this to toggle elements that match the selector
|
2014-04-26 21:43:13 +00:00
|
|
|
* data-toggle-sel
|
2012-08-15 20:19:51 +00:00
|
|
|
- shm-unlocker = click this to unlock elements that match the selector
|
2014-04-26 21:43:13 +00:00
|
|
|
* data-unlock-sel
|
2012-08-15 20:19:51 +00:00
|
|
|
- shm-clink = a link to a comment, flash the target element when clicked
|
2014-04-26 21:43:13 +00:00
|
|
|
* data-clink-sel
|
2012-08-15 19:42:56 +00:00
|
|
|
|
2010-07-07 12:02:27 +00:00
|
|
|
Please tell me if those docs are lacking in any way, so that they can be
|
|
|
|
improved for the next person who uses them
|
|
|
|
|
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
# Contact
|
2014-04-26 21:43:13 +00:00
|
|
|
|
|
|
|
Email: webmaster at shishnet.org
|
|
|
|
|
|
|
|
Issue/Bug tracker: http://github.com/shish/shimmie2/issues
|
2007-04-16 11:58:25 +00:00
|
|
|
|
|
|
|
|
2014-04-26 21:52:31 +00:00
|
|
|
# Licence
|
2014-04-26 21:43:13 +00:00
|
|
|
|
|
|
|
All code is released under the [GNU GPL Version 2](http://www.gnu.org/licenses/gpl-2.0.html) unless mentioned otherwise.
|
|
|
|
|
2016-06-19 16:41:40 +00:00
|
|
|
If you give shimmie to someone else, you have to give them the source (which
|
|
|
|
should be easy, as PHP is an interpreted language...). If you want to add
|
|
|
|
customisations to your own site, then those customisations belong to you,
|
|
|
|
and you can do what you want with them.
|