Data Management Made Easy Using Nennius: Advanced Data Handling - Component Notes
(Page 6 of 8 )
Our Comments component is now fully functional. However, we have not yet created any method for moderators to communicate regarding User Comments. This could be an unfortunate oversight. If one moderator is unsure of whether a comment should be edited/removed but has no way of asking another moderator for advice, what will happen? In order to avoid this scenario, let's allow our moderators to attach private messages, or notes, to each User Comment. This can be done simply by adding the following lines to the end of the '/descriptors/comments.php' file:
# set record notes table info (if notes desired)
$GLOBALS['g_optional_notes_db_table'] = 'comment_notes';
$GLOBALS['g_optional_notes_db_key'] = 'id';
$GLOBALS['g_optional_notes_db_index'] = 'news_id';
$GLOBALS['g_optional_notes_db_user_id'] = 'user_id';
$GLOBALS['g_optional_notes_db_datetime'] = 'datetime';
$GLOBALS['g_optional_notes_db_text'] = 'description';
Now ADMIN users will have the ability to attach private messages to user-submitted comments. These messages may be modified or deleted at a later time.
Next: Help Files >>
More MySQL Articles
More By Brian Vaughn