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

By JeffC - August 28, 2014

Thanks Greg. I have purchased the plugin and your solution worked a charm.

Please could you help with another problem I have had setting up the plugin. I think I have misunderstood the instructions!

I have added the following code to my product page:

<!-- DISPLAY COMMENTS -->
<?php

  wsc_comments(array(
    'tableOrTag' => 'die_adapters',    // Section these comments are associated with, such as: "articles", "blog", "about_us".
    'recordNum'  => $record['num'],            // Record num these comments are associated with, such as: $record['num'] or 1
    'themeName'  => 'custom',                 // HTML theme to display comments with, from /plugins/websiteComments/themes
    'pageName'   => $record['name'],           // Page name displayed in comment notification emails, such as: $record['title'] or "Custom Text"
    'pageUrl'    => realurl($record['_link']), // Page URL displayed in comment notification emails, such as realurl($record['_link'])
  ));

?>
<!-- /DISPLAY COMMENTS -->

I have also added the following code to the head of my file. I assume this needs to be changed - and you have included it as a sample only - but after hours of head-scratching i can't work out what exampleRecords, exampleMetaData etc should be changed to.

// load records
  list($exampleRecords, $exampleMetaData) = getRecords(array(
    'tableName'   => '_wsc_example_records',
    'where'       => whereRecordNumberInUrl(1), // If no record number in url just load first record
    'limit'       => '1',
  ));
  $record = @$exampleRecords[0]; // get first record
  if (!$record) { dieWith404("Record not found!"); }  // show error message if no matching record is found
 

Jeff

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