No.32709
Hey, I want to build my own imageboard but I've been stuck for a while and feel I've wasted too much time on something that has already been made countless times
I can't find any info or tutorials and there are a lot of functionalities I don't understand.
Any help would be greatly appreciated
____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32715
Don't feel bad. I don't even understand computer programming (they call it scripting/coding these days now, I think?) and the language it involves. Last time I tried that shit way back in the day, there weren't even GUI's. In college, we had to do everything in DOS at a c\> prompt and type out this file path on the monitor screen, and the jibberish we typed-out didn't even make sense to me. I still don't get that shit. I just use these damn machines. I don't know how they work. Not sure if I even care.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32728
>>32715
Thanks a lot for the encouragement
Happy new year
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32745
>>32709
Try becoming an admin of an existing chan and find out how it works.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32750
>>32745
pillow (a global admin) nuked /interracial/ and would probably nuke a new one. hes allowed to because jim doesnt care. id say another chan. currently, interracial folks only have discord and no chan, whether you make a board like that on your own chan and advertise on the discord, or on a chan you admin, it would introduce traffic. whats special about the chan you want to make? there are many chans, but they lack interest. you need to think of special kind of traffic. for example, 8kun died down a lot following /vidya/s migration.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32766
>>32750
I intend to allow polling in mine
I'm from the third world and I'm hoping to capitalize on the fact that chan culture is mostly unknown over here
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32768
>>32750
>pillow (a global admin) nuked /interracial/
You say that like it is a bad thing…
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32771
>>32766
There are a lot of chan people who know how to use VPNs. They could distort the polls in their favor.
A non-English language is one. For example, 8kun has Polish and Egyptian boards. It also has diaper and tickle fetish boards. You need to look for types of communities that are in demand. You don't need to agree with them (like interracial).
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32772
>>32771
I know the polls will mostly be for fun
I've thought about all that
I plan on just spamming it across my university
just really want to be done with this and move on.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32773
Also
I'm coding in PHP and using a xamp apache server.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32781
>>32772
It's best to remain anonymous, keep that in mind. For example, Jim blocked all IPs from where he lives, Phillipines, so people he knows won't start rumors about him.
What can you decide about the polls being for fun? If you want to get it done and move on, you'll have to hand moderation to other people, and some might not be willing to moderate a strict IB.
Even on here, banned content stays up for hours sometimes even after it's reported many times.
PHP is an older programming language and I'd recommend looking into the source code of existing chans to see if any use PHP.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32793
(1/3)
Here's some advice from a professional.
>Data
For the most basic functionality, first think about your data model. Choose any DB language you want. I recommend postgres if you want a free Oracle equivalent that doesn't suck. DB2 has a free version, but it's gimped pretty hard from what I understand. Get it up and running and ignore the rest of this until you can connect to whatever db server you pick yourself. At a basic level you're going to want a minimum of 2 tables, one for your board names and one for your posts. I'd suggest something like varchar(32) unique for the field on your board names table. Let's call this BOARDS. The second table would have your have that same field with a foreign key to the board names table, thread number, post number unqiue auto-generated, timestamp, image blob, and post text fields. Add in a dummy table name at this point such as 'random' and two tuples in the other table using your board name. Let's call this one POSTS. Don't try to make anything unique by something that doesn't need to be. The board name is sufficient for the BOARDS table and the post number is the only unqiue identifier for the POSTS table in a single board model. I would recommend using board name + post number as the unique key for a post count by board, but let's get the basics going first. Do not attempt to make this unique by thread number.
At this point we have two tables:
TABLE BOARDS
VARCHAR(32) BOARD_NAME unique
TABLE POSTS
VARCHAR(32) BOARD_NAME unique foreign key BOARDS.BOARD_NAME
TIMESTAMP TIMESTAMP
DECIMAL POST_NUMBER
DECIMAL THREAD_NUMBER
BLOB IMAGE
VARCHAR(<insert your character limit here>) POST_TEXT
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32794
(2/3)
>Backend
Once you have your data setup, start your backend.
To start, provide a list of boards, list of threads, and list of posts.
1 (optional, but easy). board list for a landing page GET
Your board list endpoint will simply query your board name table and return the full list. Use your backend to query the database with something like SELECT * FROM BOARDS. You can modify this later to hide boards for various reason, ignore that for now to get up and running with the basics.
2 (technically optional, but you want this). thread list for a board GET
The second endpoint will need to return a list of threads and images for a particular board. SELECT MIN(TIMESTAMP), IMAGE, POST_TEXT, POST_NUMBER, THREAD_NUMBER FROM POSTS WHERE BOARD_NAMES in (?) group by THREAD_NUMBER. ? is your board name. Don't worry about sorting this yet, you can do that later.
3. (required) thread posts GET
The third endpoint will return all the posts for a given thread. SELECT TIMESTAMP, POST_TEXT, POST_NUMBER, IMAGE WHERE THREAD_NUMBER = ? ORDER BY TIMESTAMP. With ? obviously being your thread.
4/5. POST
The fourth endpoint will need to be a POST since it will be containing the content of either a thread or post. You can do these separately, but I would recommend doing them as one endpoint. Your POST endpoint will need to include some primary things: board name, thread name (leave blank if creating a new thread) and process on the back end, post text, image blob. INSERT INTO POSTS <timestamp>, <image>, <post text>, <thread number (pick a new number based on MAX(THREAD_NUMBER) + 1 for ease if this was left blank)>, <board name>. The post number will be auto-generated.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32795
(3/3)
>Front End
Do this however you want. All you need to do is query your backend and display the data. If you've done your backend correctly, you can loop through the list of objects and display them in a generated table easily enough. I usually use a very different front end language, but from what I remember of PHP from almost 2 decades ago you'll want yoursite.com/boards.php to display the list of boards (query board list and generate link to board), yoursite.com/board.php?board=random to display a list of threads with images and generated links to the thread page, and yoursite.com/thread.php?thread=12345 for the thread. You'll want the same text box in both board and thread for posting, pass in the thread number from the thread page POST.
>Notes and further steps
Test after every step (data, each endpoint, each page). Do not skip your intermediate testing. Doing these in the order I've provided will be the easiest way to build this and not lose hope in unfamiliar territory. Always do your data model first. Never build your front end without an object model of your data. You can very obviously do the backend queries directly in the PHP if this is just some personal project you never want to share. After you've gotten the basic structure up and running you can add on anything you want, such as word filters on the backend before inserting the post, checking to see how quickly posts are being made and discard them, etc. After this is up and running, I would immediately add in additional logic for post count by board and image hashing to avoid storing duplicate images. I would also split the images out of the POSTS table into it's own table with a reference to the POSTS table's POST_NUMBER. The table would look like this:
TABLE IMAGES
blob IMAGE
varchar(64) HASH64 unique
varchar(256) IMAGE_NAME
DECIMAL POST_NUMBER foreign key POSTS.POST_NUMBER
The IMAGE would be removed from the POSTS table and the primary key would be changed to POST_NUMBER + BOARD_NAME to allow for board post counts instead of having them be site wide. This separate image table would allow for variable counts of images per post. This will complicate your queries slightly, but it'll still be simple. From this point on you're set up to add all the frills you'd like. Add a table to store board specific image banners, board subtitles. Add a table to store board subtitles or add it as a field on your BOARDS table. Add a top bar with the 5 boards with the most recent posts from your POSTS table or 5 random boards from your BOARDS table or a hot threads list (most posts/whatever).
This was done off the top of my head, so feel to point out anything I may have forgotten about.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32803
(4/3)
>Afterwards and things I missed
If you want to take this further, you're going to have to start thinking about what needs to be done after you've got things running. How much data do you want to store? How long do you want to store it? How many threads should I allow for a board? How many posts until a thread is locked? For the data question, I would add in creation timestamps to all of the tables you'll want to purge. I expect you'd want to be purging the POSTS and IMAGES tables. You will never want to automatically delete parts of your BOARDS lookup table. This should be done at the initial data stage (I missed this in 1/3). I would add in another table with two fields to handle tracking of threads. Let's call this the THREADS table. I would add this in as part of your POSTS insert. Your POSTS.THREAD_NUMBER would be a foreign reference to the THREADS table. On new thread creation, add the THREAD_NUMBER to the THREADS table then insert the post in the POSTS table. The THREADS table would have a number of fields to support thread functionality, like LOCKED, BUMP_LOCKED, VISIBLE. The table might look like this:
TABLE THREADS
THREAD_NUMBER unique
BOOLEAN LOCKED
BOOLEAN BUMP_LOCKED
BOOLEAN VISIBLE
TIMESTAMP LAST_POSTED_TIMESTAMP
The use of this table would be done each time someone attempts to post and the status could also be returned when viewing the thread. When a post is made, check this table to see if it's LOCKED to discard the post if it was attempted. Update the LAST_POSTED_TIMESTAMP if the post is allowed. If the post count for a thread number in the POSTS table is above a certain amount, set the BUMP_LOCKED flag and don't increase the timestamp. Set the VISIBLE flag to false if the thread count for a board is over your arbitrary limit.
Once you have this tracker table going, you now have the ability to lock, hide, and purge dated threads. This also allows for the natural thread death most image boards feature now.
>Batch purge
Set this interval to be however frequent you need it to be. What you'll do is fetch the list of threads that are no longer visible from the THREADS table that are past your expirational period, delete them from the THREADS table, detele all tuples from the IMAGES table with POST_NUMBER associated with the THREAD_NUMBER from your POSTS table, delete all tuples from the POSTS table with matching that thread number. That should be all the data purge you need to keep a clean database.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32805
(5/3)
>Admin
It's an image board, so you're going to need admin tools. This is where a login table starts to show up. If it's just you, you can forego the admin table and have a separate application to view threads. You're going to want a ban table that you'll check at time of post. If the user is in the ban table, discard the post. The table might look like this:
TABLE BANNED
VARCHAR(254) IP
TIMESTAMP CREATION_TIMESTAMP
HOURS DURATION
You'll want to add and IP field to your POSTS table to identify which IP to ban. Your admin application will need to do a few simple things: un/ban users by post number, delete posts by post number, delete images, and delete threads. You may also want to add in a section to create or delete boards, but you can do this manually since this is likely to be infrequent after the initial setup. Simply add users to the table with a reference from their POST_NUMBER and decide how long it will take. You may want to hide/show posts rather than truly delete them to prevent mistakes or allow for further use.
<Read the whole thing as I fucked up not thinking about the larger data model initially assuming you were just wanting something basic. Polling is something else entirely and I don't really care about it, so you're on your own there.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32892
>>32805
wow
Thanks a lot
two more things:
>What should the original thread number be?
>Also any Idea on implementing the arrow functions
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32893
>>32805
Also OP identification would that be by a field in posts? or will it be derived by selecting the first post of a particular thread number?
I initially made seperate tables for posts and replies but that came with it's own issues
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32931
>>32892
If you mean the thread number that happens when you start a thread, derive this from your data. Take the highest thread number you have available for a board and then add 1 to it. For arrow functions, I assume you mean the green/red text and other text functionality. Store this raw in the database and use the front end to display the changes. You're going to have to parse in whatever front end technology you decide to use. Something like the position of the '>' to the next line character will be wrapped in a tag that your css colors green or red or pink or whatever.
>>32893
Your OP identification is also data driven. I explained it above. You need to make a query to your POSTS table to get the list of threads for a board and then filter by whether or not they exist as visible in the THREADS table once you have a THREADS table or simply by the earliest timestamp with a GROUP BY clause if going by just the POSTS table. You do not need an OP identification field unless you really want to do that if the set logic is unfamiliar to you. In that case, just add in a BOOL OP to your POSTS table and when you query make sure you get that one. If you do this, you'll have to set the identification flag when inserting into the table intially.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.32938
>>32893
>Also OP identification would that be by a field in posts? or will it be derived by selecting the first post of a particular thread number?
I misread that in my previous answer. Yes, it's derived by selecting the earliest post of a thread number from your POSTS table.
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.
No.33479
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.