Zen
Oct 27 2008, 11:19 PM
I'm wondering how one would get about programming a commenting system into a normal CMS. One's that normal news sites would contain. I've already setup a basic CMS using MySQL. The structure is as such:
Database:
-Table [news]:
--Entry: [id,title,content,date]
Now I can only think of making a new table for each post and adding in entries that way. This would require making a new database solely for Comments. Well not exactly but does anyone else have a different way?
swordz
Oct 27 2008, 11:28 PM
You could make 1 new table, and then have a news id field to store which news item each post is related to.
swordz
Zen
Oct 28 2008, 03:40 AM
So in order to process them to a page...I'd have to sort by the ids, clip those not needed, then sort by date.
Eh, cool.
Any other methods?
swordz
Oct 28 2008, 09:20 AM
No, you can do it all in the SQL query.
SELECT * FROM `table` WHERE `id`='newsid' ORDER BY `date`
swordz
Trice
Oct 28 2008, 10:50 AM
you'd have a table named something like comments.
with the fields um..
commentid
newsid
userid
comment
commentdate
commentip
maybe?
obviously those names are just used to show you what they are. you'd change them to something maybe smaller?
Jetteh22
Oct 28 2008, 06:29 PM
Yeah, do what trice said.
Add a table named "comments" or somethin with the fields.
I'm actually working on my own custom CMS for a site I'm making. Simple. yet effective enough to work properly, all within the main site itself (that way It would be easier on me to add pages, and hopefully will make it worth more if I ever decide to sell it, for thsoe who are web design illterate) and that is the way I'm going to try to do it.
uncled1023
Oct 30 2008, 03:07 AM
yea, for my old site, i wrote a comment script. Like they said, just make a new table, with all the info in it, and just retrieve it for each member.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.