Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

imgboard . php

Name: Anonymous 2009-02-01 1:48

So I was browsing /b/ when it crashed, and a download popped up for imgboard.php

http://pastebin.com/m2c2883d7

Haven't gotten a chance to look through it yet. Is this win?

Name: Anonymous 2009-02-01 20:03

OP here

I guess it WASNT supposed to be seen since the link here >>2
doesn't work anymore. Now some newfag on /b/ made a thread saying he hax0red 4chan to get it.

Anyway, I'm glad if it's of some use.

Name: Anonymous 2009-02-01 20:03

>>40
Age, just to piss this man off.

Name: Anonymous 2009-02-01 20:05

>>41
I saved it for posterity.

Name: Anonymous 2009-02-01 20:15

>>43
ditto

Name: Anonymous 2009-02-01 20:16

WTF? You  fags are late, there's already been a thread on /b/ about this by the original dude who hacked it.

Name: Anonymous 2009-02-01 20:25

>>45
Eh, it don't matter. We all have it now.

Name: Anonymous 2009-02-01 20:27

I also got the old 4chan FAQ preserved in its beautiful pre-web 2.0 layout.

Name: Anonymous 2009-02-01 20:28

>>45
see >>41.

Name: Anonymous 2009-02-01 21:12

OP again

I'm not much of a web programmer, and to me the file seems HORRIBLY spaghetti-coded and hard to follow. A few things seem interesting, but figuring out what's actually going on is pretty difficult for me. If anyone finds something cool, please post an explanation.

Also if anyone has the included postfilter.php, which I assume has all the wordfilters listed, please put it up on pastebin.

Name: Anonymous 2009-02-01 21:42

>>20

The fact that the code doesn't just check for the only allowed types and reject all others with the same fucking error should be your first clue that this entire site is coded like shit.

Name: Anonymous 2009-02-01 23:20

>>49
If you want to follow the flow, scroll down all the way to the bottom where the main switch statement is. I don't think it's spaghetti-coded, there's not a single goto anywhere.

This proves that their statement about 4chan running a heavily modified version of Futaba is correct. You can see much similarity between the two, including the same variable names (lol RENZOKU) and some code which has survived from Futaba.

I suggest reading the Futaba SQL version first:
http://www.2chan.net/h/futaba.php.txt

Name: Anonymous 2009-02-01 23:31

>>1
This shit is embarrassing.

Name: Anonymous 2009-02-02 0:03

>>52
that you, moot?

Name: Anonymous 2009-02-02 1:13

I'm not much of a web programmer, and to me the file seems HORRIBLY spaghetti-coded and hard to follow.
is it worse than http://waro.su/bbs.txt?

Also if anyone has the included postfilter.php, which I assume has all the wordfilters listed, please put it up on pastebin.
you should have grabbed it too while things weren't working right.

should be your first clue that this entire site is coded like shit.
my first clue was this:
Shiichan was a 2ch-type board in PHP. It was written in late 2004 by a guy named Shii. Currently, it is in a buggy beta stage, and no development is planned.

Name: Anonymous 2009-02-02 1:16

This proves that their statement about 4chan running a heavily modified version of Futaba is correct. You can see much similarity between the two, including the same variable names (lol RENZOKU) and some code which has survived from Futaba.

I suggest reading the Futaba SQL version first:
http://www.2chan.net/h/futaba.php.txt

actually it's a modified version of futallaby, which is based on the futaba SQL version: http://1chan.net/futallaby/

Name: Anonymous 2009-02-02 1:20

http://1chan.net/futallaby/
FUTALLABY IS NO LONGER IN DEVELOPMENT. Wakaba can do everything Futallaby does and so much more.
lol, reminds me of:
http://wakaba.c3.cx/shii/
Shiichan was a 2ch-type board in PHP. It was written in late 2004 by a guy named Shii. Currently, it is in a buggy beta stage, and no development is planned.
An actually working alternative: Kareha

Name: Anonymous 2009-02-02 4:42

>>38
``EXPERT QUOTING''

Name: Anonymous 2009-02-02 4:45

OK, so can any of you EXPERT PROGRAMMERS tell me if there is anything that can be made of use out of this leaked code?

Also, EXPERT PROGRAMMERS, in your opinion, is 4chan's imageboard software coded better or worse than Kusaba was?

Name: Anonymous 2009-02-02 5:10

>>58
They are both shit.

Name: Anonymous 2009-02-02 6:10

me and my bros gonna check this out tonight see what all the fuss is about, you know?

Name: Anonymous 2009-02-02 6:38

next time this shit happens, open the file, look at all include_once files and download them too

Name: Anonymous 2009-02-02 6:54

anus

Name: Anonymous 2009-02-02 7:01

Name: Anonymous 2009-02-02 7:33

Why the hell do you want to look at the wordfilters? They're just a bunch of preg_replaces, and a bit of code to come up with random PENIS colors. You could probably write the file yourself in your sleep if you gave it a few seconds' thought.

Also, to the person who asked about a comparison to Trevorsaba, consider this: 4chan's code is quite compact. Yeah it's all crammed together, but really, that's much better than having everything spread out in 30 different PHP files, and requiring several different libraries for no real reason (lol, adodb and smarty) -- Kusaba is way too overengineered for the task at hand. 4chan's (and Futaba's) code might be a bit nasty looking, but dammit, it works. Once you learn what stuff does what, it's very simple to hack at the board a little bit and change something, and it's much easier to keep that code in your head all at once.

It all comes down to the YAGNI principle. Moot's not going to suddenly switch to MS SQL Server, so there's no need to abstract that sort of thing out. There's barely any HTML to output in the first place, so why bother constructing several templates and building the necessary scaffolding for them to execute? Just print the page out, and get on with it. Some of you so-called EXPERT PROGRAMMERS who praise abstractions and reusable code components and other such nonsense might scoff at this, but this is how code works in the real world. If it ain't broke, don't fix it.

Name: Anonymous 2009-02-02 7:34

>>61
If they can be accessed, that is. I'd put my includes so they can't be reached by an URL.

Name: Anonymous 2009-02-02 8:45

>>64-kun is a member of 4chan staff.

All code is in one file. It is easier to work this way.

Hahaha, oh wow.

Sorry, but the way code works in real world is in no way related to how it works on your 4chan.

Name: Anonymous 2009-02-02 9:08

>>66
First of all, I'm not a 4chan staff member. I just happen to be someone with an actual programming job.

You took my statement out of context. Congratulations.

If you read the full post, I am contrasting 4chan's imgboard.php with Kusaba's gigantic and haphazardly organized collection of files. You have to agree that the former is much easier to understand.

Also, it's a couple thousand lines long. I personally would split it up into a couple different files (maybe one for the main bit, and another for the support functions) but that is not outside the limits of sanity. I have seen single functions longer than that.

I doubt you have as much "real world" experience as you claim. Any programmer worth their salt has dealt with at least one unweldy mess of barf-code in their life that far surpasses the file posted here, and many have seen horror stories that could fill entire threads. Truth is, actual code sucks. The important thing is whether or not it works, because you're not getting paid more to write beautiful works of art. As long as you're capable of continually meeting the deadlines and shipping a product that doesn't suddenly crash or make the computer burst into flames when tested, great.

Name: Anonymous 2009-02-02 9:33

>>68
eZ... Oh god, the flashbacks!

Name: Anonymous 2009-02-02 10:20

>>68
I am a fucking [b][u]EXPERT PROGRAMMER[/b][/u], i wrote my first ANSI C compiler at 12 years old. The vastness of the many applications i've written is beyond the comprehensions of you feeble minded fools.

I've worked with professional programming for over 25 years and do not have to give reasons for my arguments for i have achieved satori.

Summarized you post for the other Anonymii.

Name: Anonymous 2009-02-02 10:22

>>8
Lines 1947-2005 are particularly intriguing, and also prove that the mods hack the board to enlarge their e-penises.
What? Dice roll is for interactive board games on /tg/

Name: Anonymous 2009-02-02 10:34

>>68,70
I've dug through shitcode that's shittier than 4chan's shitty imageboard.php. Therefore, shitty code is the norm and is ok.
Did I sum it up correctly?

Allow me to retort.

Just because a bunch of shitty php ``programmer'' wannabes slap together shit code and it works, doesn't mean that it's NOT SHITTY.

Yes, unfortunately, there's worse code out there. Yes, it is possible to follow the flow of imageboard.php with a little work - meaning it's somewhat usable. BUT, it's STILL SHITTY and this type of shit should NOT be expected.

As long as you're capable of continually meeting the deadlines and shipping a product that doesn't suddenly crash or make the computer burst into flames when tested, great.
-_-"
You've just named the number one problem with software development today. Bullshit from people who don't give a fuck about the quality of their work not that people like you could every produce ``quality'' work in the first place.

If you don't feel your work is important enough to perfect, then do the rest of us a favor and don't do the work.

Name: Anonymous 2009-02-02 10:40

So I just finished reading it. Pretty useless, but for some reason it was a good read.

Name: Anonymous 2009-02-02 11:04

KOREA is the best

Name: Phrozen Voidzorz 2009-02-02 11:12

>>75
is that really relevant to the conversation, or just your way of saying "i love Korea"?

Name: Anonymous 2009-02-02 11:41

>>76
both

Name: Anonymous 2009-02-02 13:37

Now all I need is a link to download the modified Shiichan that 4chan uses and I'm set.

Name: Anonymous 2009-02-02 13:59

>>79
Far from it. Plus, it's still incomplete. I'm missing all the little includes that are in the code. But it does give you insight into how 4chan's software has been coded.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List