You are here:  » Alerts for new reviews


Alerts for new reviews

Submitted by Convergence on Sun, 2012-09-30 19:22 in

v12/10B

Greetings,

Is there a method to receive an alert on new reviews?

Thanks!

Submitted by support on Mon, 2012-10-01 07:46

Sure!

Right after where the new review is inserted into the database by the following code at line 16 of reviews.php:

      database_queryModify($sql,$insertId);

...add the following line to send you an email notification of a new review...

      mail("you@example.com","New Review Alert","There is review pending moderation at www.example.com");

Cheers,
David.
--
PriceTapestry.com

Submitted by Convergence on Mon, 2012-10-01 16:56

Thanks, David!

Submitted by BobL on Sat, 2013-07-13 13:54

Bob L.

Hi David.

Hope life fine you well,

Quick question on this mod,
Is there an easy way to grab the persons "IP" address that is doing the review to insert into the email notification.
example like on the shtml for the 404s?
I'd like it in the email sent to me only, as I'm getting alerts that are spam but when I look in the review table itself in MyPhpAdmin there isn't a review there, but in the emails I see where they tried to insert links.
I'd like to add the IP to the blocked list is why I'm asking.

Thanks.

Submitted by support on Sat, 2013-07-13 16:36

Hi Bob,

Sure, it does depend on server configuration but normally the requesting IP is in the super global $_SERVER["REMOTE_ADDR"] so based on the above code...

  mail("you@example.com","New Review Alert","There is review pending moderation at www.example.com posted from ".$_SERVER["REMOTE_ADDR"]);

Cheers,
David.
--
PriceTapestry.com

Submitted by BobL on Sat, 2013-07-13 17:03

Bob L.

Thank you David.
As always spot on. :)