PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

About

RegularBoard is a lightweight, text-based BBS with social networking features.

Installation

To install RegularBoard:

  1. Set up NGINX rulesets (included below)
  2. Edit rb-config-example.php and save as rb-config.php
  3. Navigate to your installation in your browser

NGINX Rulesets

location / {
    # Quints
    rewrite ^/u/(.*)/comments/page/(.*) /?user=$1&comments&page=$2 last;
    rewrite ^/u/(.*)/images/page/(.*) /?user=$1&images&page=$2 last;
    rewrite ^/u/(.*)/saved/page/(.*) /?user=$1&saved&page=$2 last;
    rewrite ^/u/(.*)/videos/page/(.*) /?user=$1&videos&page=$2 last;
    rewrite ^/u/(.*)/threads/page/(.*) /?user=$1&threads&page=$2 last;
    # Quads
    rewrite ^/api/(.*)/url/(.*) /api/index.php?kind=$1&url=$2 last;
    rewrite ^/all/discussion/page/(.*) /?all&discussion&page=$1 last;
    rewrite ^/all/new/page/(.*) /?all&new&page=$1 last;
    rewrite ^/host/(.*)/page/(.*) /?host=$1&page=$2 last;
    rewrite ^/moderation/page/(.*) /?moderation&page=$1 last;
    rewrite ^/t/(.*)/page/(.*) /?thread=$1&page=$2 last;
    rewrite ^/threads/discussion/page/(.*) /?threads&discussion&page=$1 last;
    rewrite ^/threads/new/page/(.*) /?threads&new&page=$1 last;
    rewrite ^/u/(.*)/threads/(.*) /?user=$1&threads&$2 last;
    rewrite ^/u/(.*)/comments/(.*) /?user=$1&comments&$2 last;
    rewrite ^/u/(.*)/images/(.*) /?user=$1&images&$2 last;
    rewrite ^/u/(.*)/saved/(.*) /?user=$1&saved&$2 last;
    rewrite ^/u/(.*)/videos/(.*) /?user=$1&videos&$2 last;
    # Triples
    rewrite ^/all/page/(.*) /?all&page=$1 last;
    rewrite ^/api/(.*)/(.*) /api/index.php?kind=$1&id=$2 last;
    rewrite ^/comments/page/(.*) /?comments&page=$1 last;
    rewrite ^/images/page/(.*) /?images&page=$1 last;
    rewrite ^/videos/page/(.*) /?videos&page=$1 last;
    rewrite ^/inbox/page/(.*) /?inbox&page=$1 last;
    rewrite ^/threads/page/(.*) /?threads&page=$1 last;
    rewrite ^/users/page/(.*) /?users&page=$1 last;
    rewrite ^/login/(.*)/(.*) /?login&user=$1&hash=$2 last;
    # Doubles
    rewrite ^/all/discussion /?all&discussion last;
    rewrite ^/all/new /?all&new last;
    rewrite ^/threads/discussion /?threads&discussion last;
    rewrite ^/threads/new /?threads&new last;
    rewrite ^/host/(.*) /?host=$1 last;
    rewrite ^/settings/(.*) /?settings&$1 last;
    # Singles
    rewrite ^/all /?all last;
    rewrite ^/blog /?blog last;
    rewrite ^/comments /?comments last;
    rewrite ^/config /?config last;
    rewrite ^/images /?images last;
    rewrite ^/videos /?videos last;
    rewrite ^/moderation /?moderation last;	
    rewrite ^/page/(.*) /?page=$1 last;
    rewrite ^/register /?settings&register last;
    rewrite ^/settings /?settings last;
    rewrite ^/logout /?logout last;
    rewrite ^/threads /?threads last;
    rewrite ^/users /?users last;
    rewrite ^/post /?post last;
    # Wildcard rules
    rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*)/(.*) /?$1=$2&$3&$4&$5=$6 last;
    rewrite ^/(.*)/(.*)/(.*)/(.*)/(.*) /?$1=$2&$3&$4=$5 last;
    rewrite ^/(.*)/(.*)/(.*)/(.*) /?$1=$2&$3=$4 last;
    rewrite ^/(.*)/(.*)/(.*) /?$1=$2&$3 last;
    rewrite ^/(.*)/(.*) /?$1=$2 last;
}
location /rb-assets/ {

}    
error_page 404 /index.php;