Heyuri / Uploader

2ちゃん uploader!
MIT License
1 stars 0 forks source link

Centralize non-unique files of user boards #2

Closed kaguy4 closed 2 months ago

kaguy4 commented 2 months ago

As of now, any change here would require user boards' index.php files to need to get manually updated too... Maybe we can have a certain directory where all other user directories call their files from with _<?php requireonce '/location/of/file';?> like kokonotsuba does with multiple boards instances? This includes CSS and other some other files like aihelper.png and aiyay.png (or whatever isn't unique to any individual user board)

index.php files of user boards are unique to each board, but I think only the unique part (currently under 基本設定) can be separated to another file like config.php

hachikuji-san commented 2 months ago

Alright! warota.php is pretty much completed for now. Now the user boards can be tended to.

kaguy4 commented 2 months ago

ヽ(´∇`)ノ

hachikuji-san commented 2 months ago

I will leave them to @chen-chan1 if he's still interested.

kaguy4 commented 2 months ago

dumping my messages with hachi on Chat@Heyuri (read from bottom to top):

★ hachikuji-san > so having 1 template file and then create.php making the dir, building config.php, then index.php being 1 line like in koko is best (2024/4/23-15:26:19) ★ hachikuji-san > currently create.php is a strange abomination that builds index.php from multiple template files (2024/4/23-15:25:26) ★ kaguya > the "main" file would be the name of this software, or just something like "main.php" if we can't come up with a good one (2024/4/23-15:21:54) ★ kaguya > or more similarly, how multiple board instances of kokonotsuba use the same kokonotsuba.php (2024/4/23-15:20:07) ★ kaguya > adapted to warota, it would be: warota.php, it would become just few lines which has a "config file" and "main file" (2024/4/23-15:19:39) ★ kaguya > what I want is all of them sharing the same "base" file, so I (and maybe others in the future) wouldn't need to edit all user board's scripts each time there is an update (2024/4/23-15:18:51)

chen-chan1 commented 2 months ago

not gonna read tehm i am just gonna maek it wurk :DDD

kaguy4 commented 2 months ago

yah that werks!

chen-chan1 commented 2 months ago

yk what else werks http://173.255.204.74/uploader/admin.php

kaguy4 commented 2 months ago

did u check the user creation page? There is already a similar setting page: http://173.255.204.74/uploader/user/create.htm

chen-chan1 commented 2 months ago

never seen that page.....

kaguy4 commented 2 months ago

user boards can also already have these things: http://173.255.204.74/uploader/user/kaguya/settings.htm these rly should go just their own config file, and they use one "main" script all.

kaguy4 commented 2 months ago

I forgot cleaning index page before uploading too: http://173.255.204.74/uploader/user/index.htm Which I always thought to look kind of ugly...

chen-chan1 commented 2 months ago

2 bed. your getting a total rewrite. i dont want to touch this https://github.com/Heyuri/Uploader/blob/main/user/settings.php or simlar files there.

kaguy4 commented 2 months ago

I feel like it would just be harder for u but okay...

chen-chan1 commented 2 months ago

not really. got board listing at top. boards share the same base file. boards can be created and deleted

chen-chan1 commented 2 months ago

the thing missing for it is the forms. i made a nashi branch you can check out. https://github.com/Heyuri/Uploader/tree/nashiFork

boards can have there own css and choose if they are listed or not.

when a new board is made. a dir is added to /boards/

/boards/newboard/index.php is symlinked the rest of the stuff like src and log file are created on the spot.

why they need a varable name in the config for logs? beats me i would just have *.blocked to give nothing so users cant see logs of any file with .bloked to keep strong security and have it hard coded like that

also here is futaba theme for uploader u can slap in place of the nashi one i have a:link {color:#0000ee;} a:hover {color:#5555ee;} a:visited {color:#0000ee;} tr:nth-child(odd) {background-color: #f7efea;} tr:first-child {background-color: #eeaa88;} tr:hover {background-color: #f0e0d6;} table { border-collapse: collapse;} body{background: ##ffffee;}

chen-chan1 commented 2 months ago

nothing really else needed here. i got user boards made. the they all use one base file for each board. configs get duplicated so you would want to set default configs before making new board.

http://173.255.204.74/uploader/ thats what i got. some things still need to be made witch is a user form where they can use there mod pannel to change things like board name, description, delet etc

admin form also needs to be made so they can select a board and giveith or takith away resources/cooldown or more files.