Jump to content

need help impelementing comments section into custom made photo gallery


cbassett01

Recommended Posts

Need some ideas on how to incorporate a small message board into an existing site (I can't use phpBB or other free BB systems... I have to code my own).

 

Basically, I've got a photo gallery I designed, and want people to be able to post comments or hold small discussions around the pictures.  I'm in need of some help designing the "comments" portion.  Although this following statement doesn't really affect the actual design and coding of the table, this is what I'd like to see hapen: My goal is that when a person clicks on a picture from a grid of pictures, a new page appears with the enlarged picture, and below it, are comments people have made about the picture.

 

Here is my thought process so far:

 

Each photo in the gallery (regardless of what album it falls into) has a unique photo ID represented as a number, which helps the system identify the photos and sort the photos into various albums--I created a "linking" table in Mysql that helps the system link photo albums to pictures.  I was thinking of having a single table that simply referenced a photo ID, user's ID number, a date/time stamp, and the comment (along with other info, such as the user's name, date of the post, etc).  In this "comment" table, there would be a field of an integer that would hold the comment's ID (the primary key, mainly for the purpose of being able to select a single comment from a list of many comments for deletion, modification, etc).  The ID would not really determine the order in which the comments are displayed.  The date/time stamp would be the primary determining factor (most recent posting at the bottom of the page).

 

Additionally, the comments would only be shown when someone was looking at a single picture... not the grid of photos. 

I already have the user account management system in place and written, so that's already done.  Each person has their own username and password.  In addition to that, the primary key of that table is each user has a given ID number that never changes.  They can change their username and password, but the ID number does not change.  This number would be used for tracking who posts what in the comments section.

 

Is this a fairly acceptable thought / design I have or am I missing something major?  This site probably won't see very heavy traffic (it's for a member's only site for a small group at the local school).  Any other ideas for suggestions?  I already have the user account management system in place and written.

Link to comment
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.