Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 02-18-2005, 03:35 PM
greentraveler's Avatar
greentraveler Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 106
Comment Notification Email Glitch

I've recently noticed a couple of changes in the notification emails I get when comments are posted to my site. To start, the title of the photo used to be in the body of the message but no longer shows up. In addition, the image link ends after "http://www.greentraveler.com/photoblog/?showimage=", which obviously just throws me to the latest post.

Although this isn't a critical problem, I really like being able to see which photo the comment is for without having to log into the admin Comments page or search my phtoos randomly.

Here's the code...can anyone tell me where I've gone wrong?!?!?!?

Quote:
Originally Posted by greentraveler
################################################## ########################################//
// EMAIL NOTE ON COMMENTS
// ################################################## ########################################//
if($cfgrow['commentemail'] == "yes") {
if($_GET['x'] == "save_comment") {
$admin_email = $cfgrow['email'];
$comment_name = clean($_POST['name']);
$comment_image_id = $_POST['image_title'];
$comment_message = clean($_POST['message']);

$link_to_comment = $cfgrow['siteurl']."?showimage=$comment_image_id";

$subject = "Pixelpost - New Comment Made";
$sent_date = date("Y-m-d");
$sent_time = date("H:i");
$body = "Hello,\r\n
A new comment has been made at your photoblog.
$comment_image_id
$link_to_comment

The Comment is
----------------------------------------------------------------------
$comment_message
by $comment_name
----------------------------------------------------------------------
Email Sent by pixelpost
";

$headers = "To: admin <$admin_email>\r\n";
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$headers .= "From: PIXELPOST <$admin_email>\r\n";
mail($recipient_email,$subject,$body,$headers);
}
} // commentemail yes
Reply With Quote
  #2  
Old 02-18-2005, 04:34 PM
Connie
Guest
 
Posts: n/a
first of all: things don't change just from themselves

what did you change?
Reply With Quote
  #3  
Old 02-18-2005, 04:52 PM
greentraveler's Avatar
greentraveler Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 106
I've tweaked the EXIF values to display D70 info correctly, added Exifer, installed 6 add-ons (Grablinks, Pixelpost Stats, Visits Today, Random Thumbs, Random Image, & Category List of Links), upgraded to 1.3, and made small HTML changes to my templates to include add-ons and design changes.

:lol:

Basically, I've modified it so much that I cannot isolate exactly where the problem began. I hoped throwing the code up would reveal an obvious coding error on my part, but any further investigation would be crazy-time intensive and I know that you're stretched thin as it is.

Like I said, this isn't life-threatening...more of an annoyance that I can certainly live with. And fixing it seems daunting in the way untangling cords is. When I upgrade to the next version of PP, I'll test as I tweak and have a much more accurate idea of where the trouble begins.

Thanks for all your help in the forums, Connie!
Reply With Quote
  #4  
Old 02-18-2005, 06:29 PM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
greentraveler...thats funny, because, i've never seen the title in the email....in fact, i was going to try to add it, but ran into all sorts of problems...

ARe you sure it was there before?
Reply With Quote
  #5  
Old 02-18-2005, 06:32 PM
tseneadza Offline
forum loafer
 
Join Date: Feb 2005
Location: Atlanta, Georgia
Posts: 5
greentraveler, try adding "index.php" to the end of your site URL in the Administration screen under "Options". I had the same problem and this is how I fixed it.

Tony S.
Reply With Quote
  #6  
Old 02-18-2005, 06:34 PM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
greentraveler, btw, your photoblog is awesome!
Reply With Quote
  #7  
Old 02-18-2005, 07:42 PM
greentraveler's Avatar
greentraveler Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 106
tseneadza: Thanks for the tip, but it didn't end up working out for me. Appreciate it, though!

mark: Thanks for the praise. And I'm embarassed to admit that you're right...a search of my old emails shows that I never actually did get the title. I would have sworn that I did, but I must just have been recognizing the photo number in the links I'm missing now.

ops:

I guess I thought that this tag, $comment_image_id would show the title. Since it was delivering no displayed value in the emails, I deduced it was a problem on my end. That's the actual tag that's screwing up the link, too. The value just isn't being pulled from the comment page for some reason.

Reply With Quote
  #8  
Old 02-21-2005, 05:42 AM
mark Offline
pp veteran
 
Join Date: Feb 2005
Location: Atlanta, GA USA
Posts: 89
greentraveler...

Here's the solution...it works..

First, in comment.html under:

Code:
<input type='hidden' name='parent_id' value='<IMAGE_ID>' />
add new line:
Code:
<input type='hidden' name='title' value='<IMAGE_TITLE>' />
Then in index.php, under:
Code:
    $comment_image_id = $_POST['parent_id'];
    $comment_message = clean($_POST['message']);
    $comment_email = clean($_POST['email']);
Add:

Code:
    $comment_title = clean($_POST['title']);
And then just change the following line to add the new $comment_title tag

Code:
    $subject = "MarkMyShots - New Comment Made - $comment_title";
whala!!
Reply With Quote
  #9  
Old 02-21-2005, 06:29 AM
greentraveler's Avatar
greentraveler Offline
pixelpost guru
 
Join Date: Oct 2004
Posts: 106
whala!! is right...that set things up perfectly. Thanks a lot, Mark!

Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 01:15 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs