This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Include email of commentor in admin notice
#1

I'd like to include the person's email address of the person who submitted a comment in the admin notification.  How do I add this code to allow it to work in the admin template.
Reply
#2

Which admin notification are you referring to?

Have you completed the interview?
Reply
#3

The admin notification email. I don't see a [email] variable in the admin template to include this when sent.
Reply
#4

I haven't tested the following but it should work. I assume you've made the email field mandatory.

Open /upload/includes/app/processor.php

Replace:
PHP Code:
<?php 
cmtx_notify_admin_new_comment_approve
($cmtx_name, $cmtx_comment, $cmtx_comment_id);

With:
PHP Code:
<?php 
cmtx_notify_admin_new_comment_approve
($cmtx_name, $cmtx_comment, $cmtx_comment_id, $cmtx_email);

Replace:
PHP Code:
<?php 
cmtx_notify_admin_new_comment_okay
($cmtx_name, $cmtx_comment, $cmtx_comment_id);

With:
PHP Code:
<?php 
cmtx_notify_admin_new_comment_okay
($cmtx_name, $cmtx_comment, $cmtx_comment_id, $cmtx_email);

Open /upload/includes/functions/processor.php

Replace:
PHP Code:
<?php 
function cmtx_notify_admin_new_comment_approve($poster, $comment, $comment_id) {

With:
PHP Code:
<?php 
function cmtx_notify_admin_new_comment_approve($poster, $comment, $comment_id, $email) {

Replace:
PHP Code:
<?php 
function cmtx_notify_admin_new_comment_okay ($poster, $comment, $comment_id) {

With:
PHP Code:
<?php 
function cmtx_notify_admin_new_comment_okay ($poster, $comment, $comment_id, $email) {

Inside both of those functions, add the following where it does the replacements:
PHP Code:
<?php 
$body
= str_ireplace('[email]', $email, $body);

Have you completed the interview?
Reply
#5

Thanks I will give it a try.
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
28-Mar-2015, 01:45 PM
Last Post by Steven
23-Feb-2014, 01:57 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)