savetheinternet / Tinyboard

The better imageboard software
http://tinyboard.org
Other
368 stars 311 forks source link

4chan compatible API. #119

Closed kaja47 closed 11 years ago

kaja47 commented 11 years ago

This adds support for 4chan (almost) compatible API. Structure of these jsons and their url path is the same as 4chan stuff. Json files are generated after generation of index or thread html files.

It might be good for smaller boards because they can benefit from browser plugins and other tools developed for mother of all chans.

czaks commented 11 years ago

I've pulled your patch to vichan-devel/Tinyboard repo and tested it somewhat. Everything works well, as far as I can see, but I believe that it may have some problems with purging on cache servers (grep inc/functions.php for purge to get a grasp at what I mean), still I don't use it, so I won't help you test that.

Also, I've noticed that it slows down rebuilding a bit, so I believe it won't get upstreamed until it might be disabled in config.

Still, I've deployed that patch on some medium-sized imageboards, so if any problems arise, I'll get back and report them.

savetheinternet commented 11 years ago

I've pulled your patch to vichan-devel/Tinyboard repo and tested it somewhat. Everything works well, as far as I can see, but I believe that it may have some problems with purging on cache servers (grep inc/functions.php for purge to get a grasp at what I mean), still I don't use it, so I won't help you test that.

I scrolled through the code pretty quickly, but as far as I can see I don't think this will cause a problem for Tinyboard setups using HTTP cache servers (like mine). As long as you use my custom file_write function and not something like file_put_contents or fwrite, then it should call the cache-purging function automatically.

I'm not going to merge this just yet because I think it should at least be optional, and there are definitely some performance issues we need to address.

savetheinternet commented 11 years ago

Going to close this for now because of the performance issues and the fact that it is not optional.