No.2245
File: 1541554886065.gif (451.96 KB, 325x164, 325:164, giphy.gif) ImgOps Google
int(1)
No.2539
File: 1541596161011.gif (61.22 KB, 720x720, 1:1, pinkamena_clap.gif) ImgOps Google
Jesus... each thread is its own json? That's horrific.
Back in 2009, I decided to start making my own forum system from scratch. The very first version I created used separate .sav (essentially json) files for each thread, forum, etc. Within a few months of experimentation, I scrapped the entire system and replaced it with a consolidated SQL database. ... This imageboard has the same structure as that shitty first-pass attempt using .sav files. This structure is completely incompatible with many of the optimizations I was hoping to make. so... int(1) it is!
but thankfully the image management isn't anywhere near as bad as you made it out to be when first describing it.
No.2541
>>2539>Jesus... each thread is its own json? That's horrific.Not just that. If Ponyville's code is anything like Ponychan's (since they both use Tinyboard as a base), each board is stored in a separate table. I don't know why, it doesn't make sense.
SQL is a horrible ugly beast, but it's everywhere.
No.2543
>>2542I meant SQL itself is a horrible ugly beast, not TinyBoard's design.
>the board structure is determined in part by the folders & jsons. Ponychan has /api.php which provides dynamic JSON for all of the boards, catalogs, and threads based on GET variables. It might not be too difficult to modify the individual JSON file generation code to something like that.
No.2544
>>2543 I find SQL to be quite elegant. You can make it do some amazing things.
As far as I'm concerned, the jsons shouldn't even exist. 100% of the json information should be contained within the sql database and nowhere else.
No.2545
>>2544Oh wait, I guess I misunderstood. The JSON API is (or should be) solely for client usage, not for anything server-side.
SQL in some ways is nice but doing more advanced things like making functions/routines and stuff like that is about as much fun as pulling teeth.
No.2546
>>2545 oh? that wasn't the impression I got, but I'm new to js. what role do they have client-side?
If the database itself were setup in a more meaningful way, it wouldn't be so bad. There is a distinct lack of useful keys and cross referencing.
No.2551
File: 1541613328125.png (519.42 KB, 720x539, 720:539, WHAT HAS SCIENCE DONE.png) ImgOps Google
>>2550That's a lot of JSON files.
No.2553
File: 1541613781314.png (156.34 KB, 334x374, 167:187, 1403442130490.png) ImgOps Google
>>2552By the way, I didn't know you're a programmer. That's pretty cool.
No.2559
File: 1541615519432.jpg (2.04 MB, 1668x2880, 139:240, 20181107_102750.jpg) ImgOps Exif Google
>>2554> since I decided to cut costs and shut down my home serversI actually have my own home server, though it isn't anything fancy like a blade server or a rack server. It's a generic desktop computer that was considered economy-class when it was first put out...in 2005.
No.2560
>>2559 woo! this is similar to the few I had running back in like... 2012. The last two I had running were C2Ds. Basically as I refurbished machines, I'd pull the best ones and use them myself.
but I wasn't doing anything with them, no one was using them, they were heating my living room and running up my cooling costs, so I shut them down.
I do have a rack, but I ended up scrapping the blades that I got with it, so I just use it as a rolling desktop and projector cart.
No.2564
>>2563 I've thought of that. I might fire them back up
if it cools down. Currently it's still 79F in my apartment. This summer, it was typically capping out around 82F in my apartment. Back when I was running the C2Ds 24/7, it would cap out around 85F.
No.2595
File: 1541712279652.png (53.7 KB, 300x100, 3:1, nl1.png) ImgOps Google
holy shit, dutch banners are still being pushed with every pageload
No.2596
File: 1541712360119.png (40.98 KB, 300x100, 3:1, nl4.png) ImgOps Google
another one
No.2597
>>2595Has anyone figured where these are coming from? Last time they healed up magically on their own.
Could it be a dns issue? Is there a dutch ponyville page or what.
No.2598
File: 1541715969913.gif (949.43 KB, 350x350, 1:1, pinkamena_flagarble.gif) ImgOps Google
>>2597 They're from the April Fool's Day site gag. I'm guessing it was never fully removed from the site code. but I haven't figured out where/why yet. I was just randomly looking at
what-used-to-be-called-Firebug to see page element load times, and noticed it was grabbing unused images for no reason.
edit: oh.... it's from the Nederlands theme.... and it's being loaded with every single pageload regardless of which theme you're using....
that shit's gotta go.
No.2599
File: 1541718315751.png (29.73 KB, 256x144, 16:9, glimglamtriggered.png) ImgOps Google
>>2598it's not happening on my android with chrome or my work pc, win10 with edge.
tee hee have you tried plugging it in I mean clearing your cache. when it's time to buy ponies I always clear my cash.
steal my avatar will you, two can play at that game.
No.2601
File: 1541726188410.gif (63.86 KB, 900x644, 225:161, pinkie_no_u.gif) ImgOps Google
>>2599 I mean... are you checking the loaded resources? It doesn't show up on the page itself.
> No.2602
>>2601It's by design. Is it good design? I assume not. But what I did was load both banner sets and have the theme you select hide one or the other.
You're invited to fix it if you know a better way. I'm sure a lot of the things I've done are terrible design, but I never claimed to know what I'm doing.
No.2603
>>2602 Simply put, the Nederlands theme needs to be brought into line with the other themes, with the extra resources purged.
e.g. showing the regular banner, etc.
The special images should be a regular background, and thereby not take any extra resources.
No.2604
>>2603Yeah, I'm not really so sure I can imagine what you are describing. I think you overestimate how much I understand any of this front end technology.
Lol, I'm sure this isn't even close to the biggest crime I've committed against this codebase. I'm eager to hear what else there is that's a mess.
No.2605
File: 1541739788048.png (1.06 MB, 1280x1280, 1:1, silly_starlight_glimmer_by….png) ImgOps Google
>>2604 Simply put, it should be structured like the Steven Universe one (at least, assuming it doesn't do the same thing, which I don't think it does). I honestly shouldn't be looking at it until I can devote lots of uninterrupted time to work on it, but my curiosity gets the best of me. I haven't started making changes yet, but I did download the code so I can edit files more easily, and I've glanced through the structure of it a bit.
I'd also like to point out how annoying it is that when you right click on a web page and go to View Page Source, it's on a single line. Seriously, what the fuck...
No.2606
>>2605I can see how the banners can come in with the theme as a background, but I'm not sure how you intend to handle randomly rotating them, unless you just want Javascript to come in and sort that out for you after the fact.
Yeah, pretty annoying!
No.2608
>>2607I mean, we can scrap the whole site and solve a lot of problems that way too! But I mean, at this point it's probably fine since I doubt anyone even uses Netherlands theme anymore. And if so, they don't need special banners.
Still, I made those silly nl banners and they'll be missed. Stroopwafel.
No.2610
File: 1541805980524.jpg (66.64 KB, 960x1077, 320:359, 1530910901704.jpg) ImgOps Exif Google
>>2608So you put us in dutch for a laff.
Such betrayal, sentence you to wear wooden clogs.
No.2611
Oh, this is a the code thread? I'd like to make a small request: On the
+50
thread pages, add a
rel=canonical
metadata link to the full thread.