crude-forum / crude-forum
A very simple, crude and insecure web dicussion forum developed using PHP. Store data in text files in back-end.
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 1
Open Issues: 0
Type:project
Requires
- php: >=7.1
- cache/filesystem-adapter: ^1.0@dev
- fusonic/opengraph: dev-master
- nikic/fast-route: ^1.2
- phata/widgetfy: ^2.3
- symfony/dotenv: ^4.0
- twig/twig: ^2.0
Requires (Dev)
- kahlan/kahlan: ^4.0
This package is auto-updated.
Last update: 2024-03-14 08:15:14 UTC
README
A very simple, crude and insecure web dicussion forum developed using PHP. Store data in text files in back-end.
Originally forked from github.com/stupidsing/crude_forum but changed drastically since.
Prerequisites
The installation depends on composer and node-sass.
-
Install composer to your system
$PATH
. -
Install npm to your system. Then, with
npm
, installnode-sass
to anywhere in your$PATH
. Probably with this command:npm install -g node-sass
Basic Install
Getting the project files
First, install CrudeForum into the folder myForum
(which you may rename as you see fit):
composer create-project --prefer-dist crude-forum/crude-forum myForum
Note: If you do not have node-sass prior to running the composer create-project
command,
you'd need to run the composer build command to rebuild static assets after install:
composer run build
Web server configurations
Then setup your web server to use document of the full path to myForum/public
. Please remember
to setup your server to route to myForum/public/index.php
by default.
Nginx installation
For Nginx, assuming you have $document_root
points to myForum/public
, this means
to have something like this in your config:
location / { ... fastcgi_param SCRIPT_FILENAME $document_root/index.php; ... }
Apache installation
For Apache, please remember to setup AllowOverride all in the appropriate Directory section so the .htaccess file can work for you. Probably something like this:
<VirtualHost "my-forum.com"> DocumentRoot "/home/to/myForum/public" <Directory "/home/to/myForum/public"> AllowOverride all </Directory> </VirtualHost>
Should all the setup correct, you can now browse your forum in browser.
Development
Simply clone this repository. You can run crude forum with modern PHP 7.1+ command line tools:
composer dev
which effectively runs php -S localhost:8080 -t ./public
.
If you want to continuously develop the CSS stylesheet, you may consider to use the watch mode of node-sass:
composer watch
Both watch
and build
requires node-sass. You may supply additional argument by using the --
syntax.
For example, to watch and build asset with embeded source map:
composer watch -- --source-map-embed
For detail descriptions for the composer scripts available, use the command:
composer list
License
This software is licensed under the MIT License.
You may get a copy of the license along with the software.