Jump to content

Recommended Posts

I have looked at all the forums i could use and have opted to create one from stratch as all of them have all the bells and whistles which just clogg up the forum.

 

All i would like to find is a forum that you have categories, topics and comments on the topics.

 

i already have a member database which will be used to insert the user name of the member making the post.

 

what i am having trouble with is the method i should use to create and store the information in the database.

 

once i have this i should be able to do the rest, i hope.

 

can someone please suggest how they would do something like this or direct me to a site that explains how to create a forum from scratch.

 

been looking and have had a friend look and just not finding anything.

 

cheers

Link to comment
https://forums.phpfreaks.com/topic/132471-very-basic-php-forum/
Share on other sites

When I make a forum this is the plan I keep in my head.

 

First you need to get your conventions down, you want categories, topics, and posts.

 

That is 3 tables there.

 

Categories should have ID, Name, Description.

 

Topics should have ID, Title, Content, Category_ID, Author_ID, Time posted, Time edited.

 

Posts should have ID, Content, Post_ID, Author_ID, Time posted, time edited.

 

You can have more / less on each of those tables but you should need at least that much.

 

Now that you have the associations down you just have to write the queries etc. Like the above poster said, MySQL is the best with PHP.

Link to comment
https://forums.phpfreaks.com/topic/132471-very-basic-php-forum/#findComment-688750
Share on other sites

i have used this reply to start and thought it would be easy, but it just got to conplex, i can not understand how i get the most recent reply in the category

 

i wanted to have shown the most recent post like in this forum. and who posted it but can not work out how i get that info when the comment on the topic relating to the category all do not have the category id only the category and topic have it, so how do i get the info from the post/comments DB?

 

also i dont want to have a new field, 'recnet post' in the category DB as there may be time i need to remove a post for legal / suitability reasons, and this would therefore still have the previously posted items username in the category DB

 

 

When I make a forum this is the plan I keep in my head.

 

First you need to get your conventions down, you want categories, topics, and posts.

 

That is 3 tables there.

 

Categories should have ID, Name, Description.

 

Topics should have ID, Title, Content, Category_ID, Author_ID, Time posted, Time edited.

 

Posts should have ID, Content, Post_ID, Author_ID, Time posted, time edited.

 

You can have more / less on each of those tables but you should need at least that much.

 

Now that you have the associations down you just have to write the queries etc. Like the above poster said, MySQL is the best with PHP.

Link to comment
https://forums.phpfreaks.com/topic/132471-very-basic-php-forum/#findComment-689377
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.