A simple forum based on php 8.1 and store things in plain text files.
MIT License
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.
The installation depends on composer. Install composer to your system $PATH
.
All style changes should be done in forum.scss and built by sass. To setup for development:
npm
, install sass
to anywhere in your $PATH
. Probably with this command:npm install -g sass
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 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
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.
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;
...
}
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.
For some legacy hosting environment, you might not be able to do path rewrite as modern PHP routing requires.
CrudeForum support multiple routing strategies. For that, you may reference the examples:
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
This software is licensed under the MIT License.
You may get a copy of the license along with the software.