nashikouen / kotatsuBBS

image board software written in php
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

ID number trouble #4

Closed Releasement closed 2 months ago

Releasement commented 3 months ago

Just wanted to report an issue I'm facing and see if you knew a solution, whenever installation is completed I'm shown a screen that says "board needs ID number" should I change the -1 before installation?

chen-chan1 commented 3 months ago

do you have proper rewrites set up? as of right now /intro/ is the only board that gets created and starts with a id of 1. the GET request will resolve boardNameID and get the corresponding boardID.

if there is no intro.php inside of boardconfigs/ then there is something broken

show me what ur url looks like. and let me know if u have the proper board configs.

Releasement commented 3 months ago

I think I messed up the rewrite. Currently the url resolves to bbs.php?boardNameID=%1 or bbs.php?boardNameID=%(nameid). The intro.php was generated.

chen-chan1 commented 3 months ago

nginx is slightly different. so something like this might work. idk if nginx needs a rewrite moduel to use this.



    # /boardName
    location ~ ^/([a-zA-Z]+)/?$ {
        rewrite ^/([a-zA-Z]+)/?$ /bbs.php?boardNameID=$1 last;
    }

    # /boardName/thread/1234
    location ~ ^/([a-zA-Z]+)/thread/([0-9]+)/?$ {
        rewrite ^/([a-zA-Z]+)/thread/([0-9]+)/?$ /bbs.php?boardNameID=$1&thread=$2 last;
    }

    # /boardName/1
    location ~ ^/([a-zA-Z]+)/([0-9]+)/?$ {
        rewrite ^/([a-zA-Z]+)/([0-9]+)/?$ /bbs.php?boardNameID=$1&page=$2 last;
    }

    # /boardName/admin/
    location ~ ^/([a-zA-Z]+)/admin/?$ {
        rewrite ^/([a-zA-Z]+)/admin/?$ /admin.php?boardNameID=$1 last;
    }
``
chen-chan1 commented 3 months ago

i do need to change the openbsd install as it dose have rewrites, i just didn't know at the time and used redirects

Releasement commented 3 months ago

I forgot to mention I'm using apache. this shouldn't be a problem as apache has a rewrite module though. Thanks.

chen-chan1 commented 2 months ago

i have done some sort of reinstall on my test server. so it seems in the install script had a issues but i ironed them out. try pulling and running again. it should work, let me know if there is any issues you face with reinstalling.