Quarantine area for comments plug in

By JeffC - August 19, 2014

I plan to buy the comments plugin but before I do I wondered if it had the facility for all comments to go into a quarantine area so that the website owner can read them before they go live. If this function is not part of the existing plug in please could you provide a cost for some custom consulting

Thanks

Jeff

Hey Jeff,

Unfortunately this is not part of the current plugin, but it would be very easy to add. You'd need to add a hidden check box field to the _wsc_comments section, then add the following at line 161 of the websiteComments.php plugin:

  // add comment
  mysqlStrictMode(false); // disable Mysql strict errors for when a field isn't defined below (can be caused when fields are added later)
  $newCommentNum = mysql_insert('_wsc_comments', array(
    'createdDate='     => 'NOW()',
    'createdByUserNum' => $CURRENT_USER['num'],
    'comment'          => trim($_REQUEST['wsc_comment']),
    'tableOrTag'       => $_REQUEST['_wsc_tableOrTag'],
    'recordNum'        => $_REQUEST['_wsc_recordNum'],
    'hidden'            => '1',
  ));

Then when a comment is added, the site administrator would just need to uncheck the hidden field to get the comment to display. Site administrators are e-mailed when a new comment is added to a site by default.

If you'd set up the website comments plugin on your site, it would not take us long at all to integrate this feature. You can send an e-mail to consulting@interactivetools.com, and we give you a price for adding it.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Hi Jeff,

Are you making the comments appear on a detail page for a particular record? So if you're using a getRecords function to retrieve a detail record for your page, the _wsc_example_records would be an example of the code loading that record.

So the idea is that comments are linked to a particular record you've created in one of your sections, and the comments will only be displayed for that particular record.

If you're not loading the details of a particular record on the page, you wouldn't need anything like the _wsc_example_records getRecords function, you could just modify the comments code to have unique values.

Hopefully that helps.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By JeffC - August 29, 2014

Hi Greg,

Thanks for the reply.

I was over complicating things. All I needed to do was copy and paste the comments code, change the values and job done!

A great plugin.

Cheers,

Jeff

Jeff