[ b / jp / o / q / sw / lounge ] [ cgi ] [ up ] [ wiki ]
[Home] [Search] [RSS feed] [Inbox] [Write PM] [Catalog] [Admin]
[Return]
Posting mode: Reply
[]
(for deletion, 8 chars max)
  • Allowed file types are: GIF, JPG, JPEG, PNG, BMP, WEBM, MP4
  • Maximum file size allowed is 9000 KB.
  • Images greater than 200 * 200 pixels will be thumbnailed.
boku

  • 2024/04/26 - Neomenu came back from 2021
  • 2024/04/26 - Museum@Heyuri has been launched
  • 2024/02/27 - Anime nominations and their votings will be held on this table from now on.
  • 2024/01/29 - Try out some extra CSS files: Link


Want your site's banner shown here too? Read this thread and contact me.

File: giko_prog.png
(37 KB, 360x360) ImgOps
37 KB
github : https://github.com/Heyuri/kokonotsuba
as of making this thread, me and one other anon are working on a fork to try and clean up most of this shit.
we are planing on making proper objects for board,thread,post data. this of course would simplify things for module creation and future proof the code base.
i believe the module system will be powerful hooked base system that will be able to change data mid pipe line with out messing with the underlying system.

for creating a post postRequest. it should look something like this.

$postData = new postData();
$postData->loadFromPostRequest();
executeHook("preValidation", $postData); //can trigger a whole post fail based on IP ban or failed capcha moduel.
if(!$postData->isValidPost()){ //inside module hooks. there would be a postValidation() in contrast to preValidation() to stop files with pizza

}
.....

i also want to remove a lot of crud that is scatted all over the place and make a proper pipeline.
the pipeline should look like.
start -> post received -> post validated -> post saved to db -> load threads from db based on board configs -> load post in threads -> redraw html files -> end

of course there might be slightly different pipelines for admin menus or live views, witch might consist of a module having special things drawn in the render, or remove validation.
output should be redirectable so its either stright from*.php or gets written to *.html with proper redirect code


lots of things are still a mystery and what i said may not even work or might need some slight changes.
the more experimental fork that aims on chaining a lot of the underlying system that me and anon are working on is right here https://github.com/nashikouen/kokonotsuba

please ask in this thread about things you don't understand!! we are happy to help you learn more about kokonotsuba.
>>
strange on my test server, thumbnails dot have this black background but on heyuri they do???
>>
for some one trying to understand the table for kokonotsuba.
here is a hopeful self explanatory code. the right is the data from the database but as a table with keys matching what it would be in the database.


$this->postID = $data['no'] ?? null;
$this->threadID = $data['resto'] ?? null;
$this->category = $data['category'] ?? null;

$this->lastBumpTime = $data['root'] ?? null; // so it seems
$this->utime = $data['time'] ?? null; //unix time stamp
$this->time = $data['now'] ?? null; //time stamp but as string

$this->md5chksum = $data['md5chksum'] ?? null; //file md5 hash
$this->fileName = $data['fname'] ?? null;
$this->fileExtension = $data['ext'] ?? null;
$this->imgw = $data['imgw'] ?? null;// width
$this->imgh = $data['imgh'] ?? null;// hight
$this->imgsize = $data['imgsize'] ?? null;
$this->tw = $data['tw'] ?? null;// thumbnail witdh
$this->th = $data['th'] ?? null;// thumbnail hight
$this->fileNameOnDisk = $data['tim'] ?? null;// its utime plus miliseconds at the end. i only found to use with filenames

$this->password = $data['pwd'] ?? null;
$this->name = $data['name'] ?? null;
$this->email = $data['email'] ?? null;
$this->subject = $data['sub'] ?? null;
$this->comment = $data['com'] ?? null;
$this->host = $data['host'] ?? null;
$this->status = $data['status'] ?? null;
>>
for users trying to set up a test server of yourself. some php modules might not be installed nor specified on the official wiki. i have a guide for a OpenBSD install here that might help or be it as a check list to get a environment set up.

the php modules you will need is php-mysqli and php-gd
php-mysqli is to run code thu mysql
php-gd is for image processing. mainly to get thumbnails.

common mistake i had is all files should be owned by the web server user and dat should be 777 or writable from web server user.
>>
well, this is a good time as any to learn some php
>>
>strange on my test server, thumbnails dot have this black background but on heyuri they do???
It's likely cuz you're using PNG thumbnails, while Heyuri is using JPEG thumbnails. I think the last time we tried to switch to PNG it messed up some stuff/didn't fix transparency, so we switched back - but I don't really know/remember sweat2

>the php modules you will need is php-mysqli and php-gd
Not PHP, but I think you also need FFmpeg to generate MP4/WebM thumbnails
>>
> It's likely cuz you're using PNG thumbnails, while Heyuri is using JPEG thumbnails. I think the last time we tried to switch to PNG it messed up some stuff/didn't fix transparency, so we switched back - but I don't really know/remember sweat2
< ah i see. what ever the change was, even if you only have hits of it. let me know

>Not PHP, but I think you also need FFmpeg to generate MP4/WebM thumbnails
ah so this might be why i still get no thumbnail for videos on nashi. i will look at it when i wake up

i am going to sleep now.
one change i plan to make is move static/css/download,png into static/image/download.png so that its in the proper folder. and also update the stupid templet files to change (really i dont understand why smarty files exist. they seem to be a thing because a retard dose not know how to format php with html)
>>
>ah i see. what ever the change was, even if you only have hits of it. let me know
It's just "THUMB_SETTING" in config.php. I think one of the issues was that changing the format broke all the existing thumbnails that were in the previous format unsure

Optimally, kokonotsuba should just support generating JPEG thumbnails with the appropriate background colors (for OPs and replies respectively) when a PNG is uploaded - this is what other imageboard software does, including 4chan

I tried adding this functionality myself a couple of years ago, but I'm not a programmer, so I only got as far as getting a single color to work sweat2
>>
that is a stupid idea. op post and reply post have 2 different background styles.
what if some one uses a different css style?
sure i guess you could generate 2 thumbnails for op and replys and then a 3 set of thumbnails for users who want transparent background bc they have custom css.
>>
i forgot about highlighted post witch would require a 4th thumbnail.
>>
Like I said, the way most imageboard software (including 4chan) does it is to use the appropriate color for OPs and replies respectively

It does mean the "wrong" colors appear if a user isn't using the default color scheme, but that's 1. exactly how 4chan and other imageboard software does it, and 2. much less of a problem than the current situation where thumbnail backgrounds are always black and anything dark is invisible xd

Now generating multiple sets of thumbnails does sound stupid - half the reason behind using JPEG thumbnails in the first place is to reduce the amount of storage space they take up, and now the server would be having to work several times harder every time an image is uploaded!
>>
Thumbnails are liek previews of images, is it really such a big deal if the transparent parts are black by default? unsure
>>
It's a little annoying especially for black text/art, and it's not too difficult to have thumbnails be generated with a different background color

Take the "heyuri seal of epic win" for example - I only ever post the version with the pre-baked background color since it looks crappy with a black background, but it would be nicer for everyone wanting to use it (whether it's reposting it, using it in an edit, making stickers, etc.) if the transparent version was being posted instead

Hell, just look at the Heyuri logo I made that's currently on teh wiki's main page - I pre-baked the background so it didn't look liek crap in the thumbnail, and then whoever decided to make it the logo did a poor job of cutting it out, leaving some of the original background unremoved dark
>>
heyuri: the reawakening
>>
kaguya.
it seems you only have mod_csrf_preven on /b/ and not /q/ or /jp/
i think you should put them on those 2 as well
>>
and there is no rss feed on /jp/
>>
File: referer.png
(41 KB, 974x336) ImgOps
41 KB
>it seems you only have mod_csrf_preven on /b/ and not /q/ or /jp/
I seem to have it on all boards. Kokonotsuba's CSRF attack prevention isn't perfect, see the picture. Not that it really matters for an imageboard...

>and there is no rss feed on /jp/
added
now this brings the question: who actually uses RSS!?
>>
best of luck for you guys
>>
>>66417
i must have misread something then whoops
>>
>>66417
i used rss to create a kokonotsuba archiver script
>>
File: fontcomparison.png
(59 KB, 1670x892) ImgOps
59 KB
Site-wide shift jis support could be implemented using a new BBCode. In CSS:

@font-face {
font-family: "saitamaar";
src: url("Saitamaar.woff2") format("woff2");
font-display: block;
}

.shift_jis {
font-family: 'saitamaar', 'MS Pgothic', 'MS Pゴシック', IPAMonaPGothic, 'IPA モナー Pゴシック', Monapo, Mona;
line-height: 15px;
font-size: 14px;
}

Saitamaar is a great font for that sort of thing as it preserves detail MS Pgothic doesn't on modern Windows. It's what https://aahub.org uses.
https://aahub.org/assets/fonts/Saitamaar.woff2
>>
i was on the brink of suicide to get something like this. that's amazing thank you
>>
is there a list of major changes heyuri did to pixmcat?
>>
comit sent on fixing the black box so that it atleast matces the heyuri's background post color
https://github.com/Heyuri/kokonotsuba/commit/27e9da66a31f9251e0cdfc5587b08a32b7c681b3
>>
one thing i did notice, and idk if there is a easy way to fix, is the thumbnails for OP in catalog is trying to use new thumbnail file extension.
>>
File: yahoo.png
(669 B, 40x40) ImgOps
669 B
it also seems i didn't pull yesterday... well anyways. i fixed the catalog so nao both work
>>
File: 3dbdc5f9.png
(58 KB, 758x537) ImgOps
58 KB
thanks for the pull requests, merged smile

>is there a list of major changes heyuri did to pixmcat?
no, kokonotsuba was heavily undocumented prior to making it open sourced.

question: isn't there an issue with line 71 of mod_cat?

<script type="text/javascript" src="'.ROOTPATH.'/js/catalog.js"></script>

Feels like it doesn't need '.ROOTPATH.'/ here.
Maybe all JS files should be in the static folder if it would help being more consistent with other static files? unsure
>>
>>66442
>Maybe all JS files should be in the static folder if it would help being more consistent with other static files?
js was already a dir in koko b4 the static files were added to the repo. So my thought process at teh time was that since js was already there while static had to be pulled manually, then it should stay where it is. Though now since things are more in order maybe js should be moved...
>>
what is this archive database thingy in the configs. i would love to get that working and possibly send it to my hdd with 100tb of storage. never miss thread!
>>
use sourcehut instead
>>
>>66444
it's something that used to work in the past, but got b0rk at some point and couldn't get fixed
see [Archive] at top right (I couldn't find the link itself on archives sadly) https://archive.md/EREDi
>>
can you explain wat it dose? is it like this? https://boards.4chan.org/s4s/archive
i am guessing its a folder just with html file and images in the thread?
>>
test;a
>>
test
>>
i got catalog sorting working, but i don't know php so its hacky.

the whole catalogs data should just be a json endpoint and dealt with on the front end IMO. its MUCH easier and wouldn't require calling the db every time.
no-js browsers could keep the current bump sort closed-eyes
>>
>>66547
awesome! post teh code here or maek a pull request on the koko repo
>>
>>66548
dont overestimate me, its definitely not good enough for your repo. idk php. ill just explain what i done

in mod_cat
i made a urlparam for the sort type and passed it into fetchThreadList()
in pio.mysqli
fetchThreadList() i made $tmpSQL be dependent on the sort type.
then its just different sql queries to rearrange
like

if($sort="bump") $tmpSQL = 'SELECT no FROM '.$this->tablename.' WHERE resto = 0 ORDER BY '.($isDESC ? 'no' : 'root').' DESC';
elseif($sort
= "lastreply") $tmpSQL = 'SELECT resto FROM '.$this->tablename.' WHERE (no, resto) IN (SELECT MAX(no), resto FROM '.$this->tablename.' GROUP BY resto) AND resto != 0 ORDER BY no DESC';
...

i only found 1 place that sets the optional $isDESC in fetchThreadList idk what for
and it's too much trouble to change every pio.DB file

it werks but... meh
im going to try making a json endpoint instead sweat2
>>
>>66549
Deal with all of this on the frontend, i beg you banana
No time to check it now but also very possibly unsafe code.
>>
>>66555
pio dose not use prepared statements?!?
>>
>>66549
Check out mod_api.php, I think it does what you're looking for
>>
i tried posting the code here and got filtered

>>66559
after i already made a diy solution i see this

i added two more keys from whats available though:
latestreply:unixtime
replycount:int
for 2 of the sort types (last reply, reply count...)
could that MAX(), COUNT()s query be added to mod_api or does it have to stay as it is?

aside from that i got the js working fine closed-eyes
>>
>i tried posting the code here and got filtered
you can upload to Uploader@Heyuri and link it here
Codes shouldn't get filtered by the system
>>
blotter and ads cause mobile to slightly be blown of screen
>>
>blotter and ads cause mobile to slightly be blown of screen
- Blotter is fixed by replacing "width" with "max-width"
- Ad iframe needs "max-width: 100%"
- The CSS for the BBCode "code" and "preformatted" also needs improving, perhaps with "overflow-x: auto"
>>
test


Delete Post: []
Password:
First[0] Last