25-Aug-2010, 04:08 AM
Do you think that a (non-admin) feature to reply to comments is a good feature to add?
In order to implement it, I think that you would need to add another column in the comments DB called "reply_to" with a default value of "0" in order to make it easier to implement, and makes zero define it as not a reply. If it replies to someone, it defines the comment id to which it replies. If it's a reply, then it adds an extra div around the comment box to help style replies, like add a left margin.
The hard part would be putting it after the comment it's supposed to be after. I think that it can be addressed by taking the comments, putting the ids into an array, putting reply comments into a separate array, checking each one, sorting them in the correct order, combining them into a final array, and then printing them.
The back-end will need some work on this though. It should be able to set the comment to which it replies, and that can be done with a small preview of each comment, or something like that.
Deleting a comment with replies should either delete the replies, set "reply_to" to "0", or set some sort of box with "Comment removed" and the replies still visible after it.
Replies to replies should not have any special styling, other than the default reply styling.
Anything I missed? If you want, then I can try adding the feature myself.
As a side note, do you think it's worthwhile to create a button for the admin reply feature as an add-on? It should be easy to do so.
In order to implement it, I think that you would need to add another column in the comments DB called "reply_to" with a default value of "0" in order to make it easier to implement, and makes zero define it as not a reply. If it replies to someone, it defines the comment id to which it replies. If it's a reply, then it adds an extra div around the comment box to help style replies, like add a left margin.
The hard part would be putting it after the comment it's supposed to be after. I think that it can be addressed by taking the comments, putting the ids into an array, putting reply comments into a separate array, checking each one, sorting them in the correct order, combining them into a final array, and then printing them.
The back-end will need some work on this though. It should be able to set the comment to which it replies, and that can be done with a small preview of each comment, or something like that.
Deleting a comment with replies should either delete the replies, set "reply_to" to "0", or set some sort of box with "Comment removed" and the replies still visible after it.
Replies to replies should not have any special styling, other than the default reply styling.
Anything I missed? If you want, then I can try adding the feature myself.
As a side note, do you think it's worthwhile to create a button for the admin reply feature as an add-on? It should be easy to do so.
I'm giving you three guesses...