Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > SUPPORT / INFORMATION > Pixelpost Help

Post Reply
 
Thread Tools
  #1  
Old 02-10-2005, 05:52 PM
Birdie's Avatar
Birdie Offline
pp veteran
 
Join Date: Jan 2005
Location: Canada
Posts: 51
Contact Form

Hello;

Is it possible to change the information contained in the contact form when it gets mailed to you? I would like the information to include the posters email address and website.

I've tried poking around but don't know where the code is for this. Any help appreciated.

Cheers,
Birdie
Reply With Quote
  #2  
Old 02-10-2005, 06:06 PM
Zlato Offline
pp regular
 
Join Date: Feb 2005
Location: Paris - FRANCE
Posts: 43
Hi Birdie,
you can find what you're searching in the Index php search for this (line 590 or 592): // ################################################## ########################################//
// 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['parent_id'];
$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.
$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);
}


In bold is that you receive by mail..

Hope this had help you.

Regards
__________________
A. Zlatogorov
Ecrivain de lumière
Reply With Quote
  #3  
Old 02-10-2005, 06:33 PM
Birdie's Avatar
Birdie Offline
pp veteran
 
Join Date: Jan 2005
Location: Canada
Posts: 51
Thank you.

I changed the code to:
Code:
// 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['parent_id'];
    $comment_message = clean($_POST['message']);
    $comment_url = clean($_POST['url']);
    $comment_email = clean($_POST['usemail']); 
    $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.
$link_to_comment

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

    $headers = "To: admin <$admin_email>\r\n";
    $headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";
    $headers .= "From: Uncommon Depth <$admin_email>\r\n";
    mail($recipient_email,$subject,$body,$headers);
    }
} // commentemail yes
I'm still not getting the email portion showing up though, so I must need to be making some changes elsewhere. I do have the email input area added to the comments template. I am fairly new working with php, so I'm guessing there must be a little blurb of code that needs to be placed somewhere else.

This isn't hugely important, but it would be nice to be able to reply to some of the people who post comments.
Reply With Quote
  #4  
Old 02-10-2005, 06:38 PM
andy Offline
pp regular
 
Join Date: Dec 2004
Location: Minnesota, USA
Posts: 29
In the line:

Code:
$headers .= "From: Uncommon Depth <$admin_email>\r\n";
change the $admin_email variable to $comment_email.

That is what I did on my photoblog. I still made the email field optional. If a person doesn't want to leave their email, then I default it back to $admin_email.

Hope that helps.
Reply With Quote
  #5  
Old 02-10-2005, 06:39 PM
Birdie's Avatar
Birdie Offline
pp veteran
 
Join Date: Jan 2005
Location: Canada
Posts: 51
Got It!

Line 609

Code:
if(($parent_id != "") and ($message != "")) {
	$query = "insert into ".$pixelpost_db_prefix."comments(id,parent_id,datetime,ip,message,name,url,usemail,)
	VALUES('NULL','$parent_id','$datetime','$ip','$message','$name','$url','usemail',)";
	$result = mysql_query($query);
	}
I added the usemail fields.

Thanks for the help. Hope this will be useful for others now!

Cheers,
Birdie
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 05:28 AM.

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