Skip to content

Commit

Permalink
Finish 5.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Schlaefer committed Aug 30, 2019
2 parents fd53257 + faa7c17 commit d7e193e
Show file tree
Hide file tree
Showing 386 changed files with 10,912 additions and 8,336 deletions.
10 changes: 8 additions & 2 deletions .gitignore
Expand Up @@ -13,14 +13,20 @@ schema-dump-default.lock

### Saito ###
/_attic
/config/.env
/webroot/useruploads/*
/build/
/config/.env
/docs/local
/dist/
/webroot/useruploads/*

### Assets ###
plugins/Bota/webroot/css/*
!plugins/Bota/webroot/css/src/

plugins/Bota/webroot/fonts/*.woff*

plugins/SpectrumColorpicker/webroot/*

webroot/css/stylesheets/*
!webroot/css/stylesheets/src/
webroot/js/*
27 changes: 20 additions & 7 deletions .travis.yml
Expand Up @@ -10,7 +10,9 @@ env:
- DB=mysql DATABASE_TEST_URL='mysql://root:password@127.0.0.1/cakephp_test'
global:
- DEFAULT=1
- PHP=1
- PHPCS=0
- JS=0

matrix:
fast_finish: true
Expand All @@ -20,6 +22,17 @@ matrix:
- php: 7.2
env: PHPCS=1 DEFAULT=0
- php: 7.3
- language: node_js
env: JS=1 DEFAULT=0 PHP=0
node_js:
- node
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
script: yarn travis

dist: trusty

Expand All @@ -34,22 +47,22 @@ cache:
before_install:
- phpenv config-rm xdebug.ini

- if [ $DB = 'mysql' ]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
- if [ $DB = 'mysql' ]; then mysql -u root -e "USE mysql; UPDATE user SET password=PASSWORD('password') WHERE user='root'; FLUSH PRIVILEGES;"; fi
- if [ $PHP = 1 ] && [ $DB = 'mysql' ]; then mysql -u root -e 'CREATE DATABASE cakephp_test;'; fi
- if [ $PHP = 1 ] && [ $DB = 'mysql' ]; then mysql -u root -e "USE mysql; UPDATE user SET password=PASSWORD('password') WHERE user='root'; FLUSH PRIVILEGES;"; fi

- pecl channel-update pecl.php.net
- if [$PHP = 1 ]; then pecl channel-update pecl.php.net; fi
- |
if [[ ${TRAVIS_PHP_VERSION} != "5.6" ]]; then
if [ $PHP = 1 ] && [[ ${TRAVIS_PHP_VERSION} != "5.6" ]]; then
echo 'extension = memcached.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini;
fi
- echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini
- if [$PHP = 1 ]; then echo 'extension = apcu.so' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi
- if [$PHP = 1 ]; then echo 'apc.enable_cli = 1' >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi

- if [[ ${TRAVIS_PHP_VERSION:0:1} == "7" ]] ; then echo "yes" | pecl install channel://pecl.php.net/apcu-5.1.5 || true; fi
- sudo locale-gen da_DK

before_script:
- composer install --prefer-source --no-interaction;
- if [ $PHP = 1 ]; then composer install --prefer-source --no-interaction; fi
- if [ $PHPCS = 1 ]; then vendor/bin/phpcs --config-set installed_paths vendor/cakephp/cakephp-codesniffer; fi

script:
Expand Down
37 changes: 33 additions & 4 deletions Gruntfile.js
Expand Up @@ -34,6 +34,35 @@ module.exports = function (grunt) {
src: '*',
dest: './webroot/css/stylesheets/fonts/'
},
/// Assets for plugins/SprectrumColorpicker
{
src: './node_modules/spectrum-colorpicker/spectrum.js',
dest: './plugins/SpectrumColorpicker/webroot/js/spectrum.js',
},
{
src: './node_modules/spectrum-colorpicker/spectrum.css',
dest: './plugins/SpectrumColorpicker/webroot/css/spectrum.css',
},
/// Assets Cabin font
{
expand: true,
flatten: true,
src: './node_modules/typeface-cabin/files/cabin-latin-[4|7]00.woff*',
dest: './plugins/Bota/webroot/fonts/',
},
{
expand: true,
flatten: true,
src: './node_modules/typeface-cabin/files/cabin-latin-[4|7]00italic.woff*',
dest: './plugins/Bota/webroot/fonts/',
},
/// Assets Fenix font
{
expand: true,
flatten: true,
src: './node_modules/typeface-fenix/files/fenix-latin-400.woff*',
dest: './plugins/Bota/webroot/fonts/',
},
]
},
},
Expand Down Expand Up @@ -86,7 +115,7 @@ module.exports = function (grunt) {
}
},
},
sass: {
'dart-sass': {
options: {
sourceComments: true,
sourceMap: false,
Expand Down Expand Up @@ -157,7 +186,7 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-contrib-clean');
grunt.loadNpmTasks('grunt-contrib-watch');
grunt.loadNpmTasks('grunt-shell');
grunt.loadNpmTasks('grunt-sass');
grunt.loadNpmTasks('grunt-dart-sass');
grunt.loadNpmTasks('grunt-postcss');

// dev-setup
Expand All @@ -171,8 +200,8 @@ module.exports = function (grunt) {
// cleanup
'clean:release',
// CSS
'sass:static',
'sass:theme',
'dart-sass:static',
'dart-sass:theme',
'postcss:release',
// webpack
'shell:webpack',
Expand Down
56 changes: 38 additions & 18 deletions README.md
Expand Up @@ -2,9 +2,11 @@

## What is it?

Saito is a web forum. It is different from the majority of other solutions as it puts the emphasis on presenting threads and conversations in a classic tree style view. It is optimized to display hundreds of individual posts on a single page request while running on a modest shared-hoster.
Saito is a web-forum with [conversation threading][ConversationThreading]. It is different from the majority of other forums as it puts the emphasis on performance and presenting conversations in a classic tree-style threaded view.

[Test it here][SaitoSupport] (log-in: test/test).
A lot of optimization went into serving long existing, small- to mid-sized communities with moderate traffic but hundreds of thousands of existing postings. It is able to displays hundreds of individual postings on a single page while running on a inexpensive, shared hosting account.

[Test it here][SaitoSupport] (login: test/test).

## Status

Expand All @@ -13,37 +15,41 @@ Saito is a web forum. It is different from the majority of other solutions as it

[cake]: http://cakephp.org/
[marionette]: https://marionettejs.com/
[SaitoHomepage]: http://saito.siezi.com/
[SaitoSupport]: http://saito-forum.de/
[SaitoHomepage]: https://saito.siezi.com/
[SaitoSupport]: https://saito-forum.de/
[ConversationThreading]: https://en.wikipedia.org/wiki/Conversation_threading

## Requirements

- PHP 7.2
- PHP 7.2+
- Database (MySQL/MariaDB tested, [others untested](https://book.cakephp.org/3.0/en/orm/database-basics.html#supported-databases)).

## Get Started

A full prepackaged zip if is available on the [release page](https://github.com/Schlaefer/Saito/releases).
A ready-to-use ZIP containing all necessary files is available on the [release page](https://github.com/Schlaefer/Saito/releases). Unzip it, upload it to your server, open it in a browser, and follow the instructions on the screen.

## Development

### Install Files
### Set-Up Environment

Checkout files from git.
You need a more or less generic environement providing:

Install the PHP packages (the backend is mainly build on [CakePHP][cake]):
- PHP with `composer` for the server-backend (mainly build on [CakePHP][cake])
- node with `yarn` and `grunt-cli` for the browser-frontend (mainly build on [Marionette][marionette])
- a database

```shell
composer install
```
There's a docker file for *development* in `dev/docker/…`

Install Javascript packages (the frontend is mainly build on [Marionette][marionette]):
### Install Files

Checkout the files from git-repository and install the dependencies:

```shell
yarn
composer install;
yarn install;
```

Move files into places:
Move dependency-assets into the right places:

```shell
grunt dev-setup
Expand All @@ -55,18 +61,32 @@ Run all test cases:
composer test-all
```

See `Gruntfile`, `packages.json` and `composer.json` for additional scripts to run.
See the `Gruntfile`, `packages.json` and `composer.json` for additional devleopment-commands.

### Create Production Files

Create minimized assets with:
To generate all the minimized assets for production:

```shell
grunt release
```

Create a release-zip:
### Create A Release Zip

To generate a zip-package as found on the release page for distribution:

```shell
vendor/bin/phing
```

## FAQ

### How does it compare to [mylittleforum]

Actually this forum was written to replace a mylittleforum installation with a more modern approach. Mylittleforum is a noteworthy starting place if you want a threaded web-forum. There aren't that many out there. Mylittleforum exists for many years now and offers great features.

*Disclaimer: Subjective opinion ahead…*

But there are a shortcommings, mainly: performance and maintainability. If a mylittleforum installation reaches a few hundred thousand postings it is going to slow down. Also it was written when PHP was a much worse language: there are no test cases, which makes it more fragile to changes.

[mylittleforum]: https://mylittleforum.net/
1 change: 1 addition & 0 deletions build.xml
Expand Up @@ -20,6 +20,7 @@
<include name="index.php"/>
<include name="README.md"/>
<exclude name="**/css/src/**"/>
<exclude name="plugins/*/tests/**"/>
</fileset>

<!-- start fresh each time. Remove the dist and build dirs -->
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -13,7 +13,7 @@
},
"require": {
"php": ">=7.2",
"cakephp/cakephp": "3.7.*",
"cakephp/cakephp": "3.8.*",
"cakephp/migrations": "@stable",
"cakephp/plugin-installer": "*",
"josegonzalez/dotenv": "*",
Expand Down

0 comments on commit d7e193e

Please sign in to comment.