PHP Classes
elePHPant
Icontem

What is the best PHP blog comment system class?: Need a script or advice for a blog commenting system

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  All requests RSS feed  >  What is the best PHP blog comment system class?  >  Request new recommendation  >  A request is featured when there is no good recommended package on the site when it is posted. Featured requests  >  No recommendations No recommendations  

What is the best PHP blog comment system class?

Edit

Picture of Talha Bin Faisal by Talha Bin Faisal - 2 months ago (2015-12-13)

Need a script or advice for a blog commenting system

This request is clear and relevant.
This request is not clear or is not relevant.

+4

I created a blog with PHP and MySQL database. I have created a table where I store all blog details.

Now I want to add a comment system on my blog, so that visitors can post comment about the articles.

I think need an another database table to do that. Then both tables 'title' column would be same, so that I can fetch data both table with the "title". Is there any better idea to do this project?

  • 1 Clarification request
  • 1. Picture of Dave Smith by Dave Smith - 2 months ago (2015-12-13) Reply

    your blog table should have a unique id, preferably an integer, for each blog post. Then you include the blog id in the comment table row to relate them. This is a one to many relation, one blog id is used in many comment rows to form the relation.

    • 2. Picture of Talha Bin Faisal by Talha Bin Faisal - 2 months ago (2015-12-16) in reply to comment 1 by Dave Smith Comment

      If I wanna insert same unique id in both table, then I should insert the same id for each blog post & that not with auto increament function. So, when how insert same id in both table???

    • 3. Picture of Dave Smith by Dave Smith - 2 months ago (2015-12-16) in reply to comment 2 by Talha Bin Faisal Comment

      Suppose you have a blog table which contains these columns (there will be more, this is just for example)

      id - int, primary auto increment key title - varchar, index key blogentry - text

      Then you have a comment table that will contain these columns

      id - int, primary auto increment key blogid - int comment - text

      The value in the blogid column will be the id for the blog entry in the blog table.

      This creates the relation between a blog entry and all comments for that entry.

    • 4. Picture of Dave Smith by Dave Smith - 2 months ago (2015-12-16) in reply to comment 3 by Dave Smith Comment

      Not sure why, but the post lost its line spacing with the columns.

      So columns for blog are id, title, blog entry.

      Columns for comment are id, blogid and comment

      Dave

Ask clarification

1 Recommendation

Bootstrap PHP Comments System: Comments system with replies and like buttons

This recommendation solves the problem.
This recommendation does not solve the problem.

+5

Picture of Manuel Lemos by Manuel Lemos Reputation 11100 - 2 months ago (2015-12-14) Comment

This comments system is very complete with possibility to have replies and like buttons for each comment. It uses MySQLi so it will work well on PHP 7.

Anyway, as Dave explained you need to have a reference from the comments table to the blog posts table. Usually that reference is the ID of the post comment.

At the time of this writing, this comment system does not have that field but I am sure if you post a request in the package support forum, the author can add it easily.


Recommend package
: 
: