Website Comments

By gversion - December 11, 2019

Hello,

I have purchased the Website Comments plugin with the aim of using it as a very simple bulletin board script.

I would like messages (i.e. comments) to expire after a certain amount of time (e.g. 90 days). Is there a simple way I can achieve this with some of the inbuilt CMSB functions?

Any help would be greatly appreciated.

Thank you,

Greg

By robin - December 12, 2019

Hi Greg,

There is not a built in way to expire comments. (Though I think that's a great idea for future versions).

For now you could accomplish this with a small modification to the plugin.  

In the file websiteComments.php

Edit line 122:

From:

    'where'         => mysql_escapef("tableOrTag=? AND recordNum=?", $tableOrTag, $recordNum),

To:

    'where'         => mysql_escapef("tableOrTag=? AND recordNum=?", $tableOrTag, $recordNum) . " AND createdDate > (NOW() - INTERVAL 90 DAY)",

Please let me know if you run into any trouble.  Thanks,
Robin

Robin
Programmer
interactivetools.com