This repository has been archived on 2024-09-05. You can view files and clone it, but cannot push or open issues or pull requests.
shimmie2/README.markdown

168 lines
6 KiB
Markdown
Raw Normal View History

```
2012-02-12 19:42:37 +00:00
_________.__ .__ .__ ________
/ _____/| |__ |__| _____ _____ |__| ____ \_____ \
\_____ \ | | \ | | / \ / \ | |_/ __ \ / ____/
/ \| Y \| || Y Y \| Y Y \| |\ ___/ / \
/_______ /|___| /|__||__|_| /|__|_| /|__| \___ >\_______ \
2014-04-26 21:52:31 +00:00
\/ \/ \/ \/ \/ \/
```
2012-02-12 19:40:38 +00:00
2014-04-26 21:52:31 +00:00
# Shimmie
[![Build Status](https://travis-ci.org/shish/shimmie2.svg?branch=master)](https://travis-ci.org/shish/shimmie2)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/shish/shimmie2/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=master)
[![Code Coverage](https://scrutinizer-ci.com/g/shish/shimmie2/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=master)
(master)
[![Build Status](https://travis-ci.org/shish/shimmie2.svg?branch=develop)](https://travis-ci.org/shish/shimmie2)
[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/shish/shimmie2/badges/quality-score.png?b=develop)](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=develop)
[![Code Coverage](https://scrutinizer-ci.com/g/shish/shimmie2/badges/coverage.png?b=develop)](https://scrutinizer-ci.com/g/shish/shimmie2/?branch=develop)
(develop)
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.
2014-04-26 21:52:31 +00:00
# Requirements
- MySQL/MariaDB 5.1+ (with experimental support for PostgreSQL 9+ and SQLite 3)
2017-03-09 09:12:27 +00:00
- [Stable PHP](https://en.wikipedia.org/wiki/PHP#Release_history) (5.6+ as of writing)
- GD or ImageMagick
2014-04-26 21:52:31 +00:00
# Installation
1. Download the latest release under [Releases](https://github.com/shish/shimmie2/releases).
2. Unzip shimmie into a folder on the web host
3. Create a blank database
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
not, you should be given instructions on how to fix any errors~
# Installation (Development)
2016-06-19 03:55:32 +00:00
1. Download shimmie via the "Download Zip" button on the [develop](https://github.com/shish/shimmie2/tree/develop) branch.
2. Unzip shimmie into a folder on the web host
3. Install [Composer](https://getcomposer.org/). (If you don't already have it)
4. Run `composer global require "fxp/composer-asset-plugin:~1.1" --no-plugins`. (This is installed globally due to a known composer bug)
5. Run `composer install` in the shimmie folder.
6. Follow instructions noted in "Installation" starting from step 3.
2014-04-26 21:52:31 +00:00
## Upgrade from 2.3.X
1. Backup your current files and database!
2. Unzip into a clean folder
3. Copy across the images, thumbs, and data folders
2014-04-26 21:47:14 +00:00
4. Move `old/config.php` to `new/data/config/shimmie.conf.php`
5. Edit `shimmie.conf.php` to use the new database connection format:
2011-01-01 17:04:09 +00:00
2014-04-26 21:47:14 +00:00
OLD Format:
```php
$database_dsn = "<proto>://<username>:<password>@<host>/<database>";
```
2014-04-26 21:47:14 +00:00
NEW Format:
```php
define("DATABASE_DSN", "<proto>:user=<username>;password=<password>;host=<host>;dbname=<database>");
```
2011-01-01 17:04:09 +00:00
The rest should be automatic~
2014-04-26 21:52:31 +00:00
If there are any errors with the upgrade process, `in_upgrade=true` will
be left in the config table and the process will be paused for the admin
to investigate.
2014-04-26 21:47:14 +00:00
Deleting this config entry and refreshing the page should continue the upgrade from where it left off.
2012-03-14 18:16:23 +00:00
2014-04-26 21:52:31 +00:00
### Upgrade from earlier versions
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).
While the basic database and file formats haven't changed *completely*, it's different
2010-03-02 02:48:11 +00:00
enough to be a pain.
2014-04-26 21:52:31 +00:00
## Custom Configuration
Various aspects of Shimmie can be configured to suit your site specific needs
via the file `data/config/shimmie.conf.php` (created after installation).
Take a look at `core/sys_config.inc.php` for the available options that can
be used.
2014-04-26 21:52:31 +00:00
#### Custom User Classes
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
For example, one can override the default anonymous "allow nothing" permissions like so:
2012-03-19 11:27:01 +00:00
```php
2012-03-19 11:27:01 +00:00
new UserClass("anonymous", "base", array(
2012-05-03 13:55:13 +00:00
"create_comment" => True,
2012-03-19 11:27:01 +00:00
"edit_image_tag" => True,
"edit_image_source" => True,
"create_image_report" => True,
));
```
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
```php
2012-04-28 10:02:12 +00:00
new UserClass("moderator", "user", array(
"delete_image" => True,
"delete_comment" => True,
));
```
2012-04-28 10:02:12 +00:00
For a list of permissions, see `core/userclass.class.php`
2012-03-19 11:27:01 +00:00
2014-04-26 21:52:31 +00:00
# Development Info
ui-* cookies are for the client-side scripts only; in some configurations
(eg with varnish cache) they will be stripped before they reach the server
shm-* CSS classes are for javascript to hook into; if you're customising
themes, be careful with these, and avoid styling them, eg:
- shm-thumb = outermost element of a thumbnail
* data-tags
* data-post-id
- shm-toggler = click this to toggle elements that match the selector
* data-toggle-sel
- shm-unlocker = click this to unlock elements that match the selector
* data-unlock-sel
- shm-clink = a link to a comment, flash the target element when clicked
* data-clink-sel
Documentation: http://shimmie.shishnet.org/doc/
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
IRC: `#shimmie` on [Freenode](irc.freenode.net)
Email: webmaster at shishnet.org
Issue/Bug tracker: http://github.com/shish/shimmie2/issues
2014-04-26 21:52:31 +00:00
# Licence
All code is released under the [GNU GPL Version 2](http://www.gnu.org/licenses/gpl-2.0.html) unless mentioned otherwise.
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.