Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Need a change to the Thank Me Later plugin WordPress

  • SOLVED

I am hoping someone here is familiar with the Thank Me Later plugin, http://wordpress.org/extend/plugins/thank-me-later/

It sends a pre-defined email to everyone who comments on a post, kind of a 'thank you for commenting' type email.

It basically sends an email almost immediately after the person leaves a comment if the comment is approved. RIght now I set it so all comments are approved right away in the wordpress settings.

I need to modify it slightly. It only sends the email once the comment is approved. I'd like to have all comments go into moderation, but have the plugin send the email out right away instead of after the comment gets approved.

It sounds like a fairly simple change but I am unable to find the spot in the code to change it.

Please let me know if someone can make this change.

I've put this up at $4, but if it requires a bit more work please PM me and we'll work something out.

Answers (1)

2011-06-28

Linda answers:

Hi, in the plugin's file: thank-me-later/tml_includes/comment.php you can find this line:

if (!$status || $status == "spam") // wait until publsihed...
return;


I would think this should be what you are looking for. ;)

-Linda


Dan | gteh comments:

Thanks,

So if I add another line after that like:


if (!$status || $status == "hold") // wait until publsihed...
return;


That should essentially do the trick?

If not, how much more should I offer for you to provide the fix for me?


Linda comments:

I was thinking that the lines I posted below are saying if the comment is 'hold, spam or delete' or it is 'not spam' do not send it out.

I would try commenting out this:


// ~23 Sep 09 19:52 BST~
// Replaced above with the fikkiwubgm becayse the DB information is out of date already!
//if (!$status || $status == "spam") // wait until publsihed...
// return;



thus you remove that whole 'wait until published if' statement and it should send as scheduled. Give it a try and let me know if it works. :)


Dan | gteh comments:

Ok thanks. Testing it now but seems like it should work.


Dan | gteh comments:

Commenting out that line by itself did not work, but I commented this out as:


//if (in_array($status, array("hold", "spam", "delete"))) {
// $this->remove_comment($id);
// return;
// }


and that did the trick. Now I uncommented it, and only removed "hold" from the array which I believe is exactly what I needed.

Thanks for pointing me in the right direction Linda.