Ive been trying to code a message board for about 6 months, i hate reading but i have done a lot of it, but books are not helping me, if someone has a source could that i can copy and learn from or just look at it please let me know!! Something like this one would be great.. thanks again
08:48 pm, Wednesday, January 23, 2002 (7 years ago)
oh yeah i think i have a learning disorder or something im one of does people that learns by watching someone do it, or doing it myself, i cant learn from books, been like that since iw as little thats why i skipped college and went to a Tech School
we cannot give you the source code for this message board, but there are others available on the internet. www.ezboard.com is fairly popular, easy-to-use, and free.
get a book called The PHP 4 Bible (damn, you'd think I wrote the thing considering how much I plug it) Don't start off trying to make a message board, start with something smaller, gain experience, then go for the message board.... my site, phatskinz, has been in the planning stage for months, because I've been learning php. I now have enough experience to go at it alone and be able to debug the code without looking at any one else's code. it'll take a while, but you'll get there. have fun =)
Miriku: I think he's been studying php, not perl =) I could be wrong.
1. Make a table in a database which contains the threads with properties id and title, date and such 2. Make a table in a database which contains the posts with properties id, thread_id, post, author, date, etcetera 3. To display the list of threads, just grab X threads from the thread table in the database 4. To display an individual thread, grab X posts with a thread_id corresponding to the thread's id (duh) 5. To add a post, just add an entry to the posts table, where the thread_id value of the post is the id of the thread you are posting to
And that's the core of thing. Or at least how I would do it. The most complex bit of it is getting and storing values in/from the dbase.
not that it's hard, it just sucks. it puts people in this state of mind where they think in mysql, and when they have to switch to a real relational database, they're obsolete
i would recommend just doing it in plain text, personally. it's not like you're going to be doing 2000 simultanous users or anything
as you haven't been able to write one yet i assume that you haven't started using databases yet (bash me for my prejudices later if im wrong). i really suggest you try to write a very simple one, more like a guest book first. here's an example on how you can do it:
well, that's about as easy as it can get.. just make sure you have a file named messages in the same dir, or change the path to another file.. ohh, and dont forget to set permissions to it ;-)
i hope this helps a little, if it still doesnt i can write it into a working example for you (i havent tested this one, but too all my knowledge it will work). if this doesnt clear things up, please dont be shy to contact me through this board or email. good luck to you
Oh, and as for coding one yourself: I have a mantra for you:
"I will take baby steps before leaping."
Repeat this a few thousand times until it sinks in.
Start by coding a simple blog script. Now, after you've tested it & it's functioning well, add user authentification - make sure it knows you're you.
Then, add the ability for it to authenticate other people, and let them update the blog.
Now, split the blog into sections - say, 3 parts, "why I hate bananas blog", "the joy of bouncy things blog", "I'm sorry about your cat blog" - and make sure all the functionality from the first exists in all three. IE, authenticated users can post to each. Make a selection screen so they can pick which blog to post to.
Now, give authenticated users the ability to make new blog sections.
the reason i looped through the text to append at top is because it's the way i prefer to do it.. remove the loop and mae the text append instead of overwrite to fix that.. good luck to you ;-)
goto php.net, download the .chm manual, read a lil, and you should get enough to be able to make one.... if this has already been mentioned, sorry, i don't feel like reading it all ;x