So.... How do I use this plugin? I enabled it, what now? lol... Is it on the default theme anywhere? Do I have to edit some text somewhere? Since its a nightly build, i assume there isnt much information on it yet...
This plugin is new and prints a mail form. As with all optional plugins you would have add it's function to your theme file yourself where you wish to display it. It's not in the documention yet, but it's all documented in the file itself (it's always..:-)). Also you need to set some options. Best make a custom page called contact.php for example and call it there (more about custom pages on our theming tutorial).
Well, I have'nt seen that ! Thank you Acrylian ! I'm actually running a [2222] version and I can't install the last nightly because of this problem : http://www.zenphoto.org/trac/ticket/758 So I have several questions : 1. Does this plugin depends on new functions added till the [2222] one ? 2. Does it work with multilingual options ? 3. Will your ZenPage plugin be able to display forms like that ?
1. Sorry, you need a current nightly because the plugin uses a new function for radio boxes in the options that was added at the same time. 2. Yes. 3. Yes, basically. Zenpage will feature a "codeblock" section for each page/news article where you can enter php functions like this directly on the admin to be displayed for that specific page.
But you can use it right now with a normal custom theme page, too.
Great ! Thank you for your answer : now I understand why it can't work for me right now. I'll just wait the next nightly which fix the bug above to try it (thanks to sbillard).
If you need testers for your ZenPage plugin, no problem.
Hi Acrylian. I was finally able to upgrade my [2222] ZP to a [2469] version. I made a custom page based on archive.php and paste into it : <?php printContactForm(); ?> I enabled the plugin but when I choose which field of the form to display (in the options) and save it, it seems that the script doesn't keep them : when I reload the plugin options in my browser the radio boxes are still virgin. Do you have any idea about how to fix it ? Should I have a look in a particular section of my database to check it ?
Please try the nightly. The option handling for radioboxes is new and had a bug that now should be corrected.
Thanks for the typo report. I will correct that (in German it's "Adresse", I sometimes confuse the spelling of similar words..:-)). Since that text is just a suggestion you can of course that in the options, too.
Perfect. I had the nightly from 2 days ago with that problem, tried with the newest nightly and it works like a charm.... or that's what I thought I go through the whole process of filling in info and sending, click Confirm to say I am sure I want to send the message. I get the message..
"Thanks for your message. A copy has been sent to your provided e-mail address for your own records."
However I never receive any email, I have an email set in the email address in the plugin settings.
We think it may probably be related to your server setting. Some servers prohibit SMTP sends and requrire mail to come from an account. The contact forms sends it directly via php. It works on my server but maybe not on yours. Maybe you can check that?
` <?php $to = "spam1@olihar.com"; $subject = "Php test mail"; $body = "Test mail for php mail()"; if (mail($to, $subject, $body)) { echo("Yes you have done it "); } else { echo("Oops try once more.. "); } ?> ` testcont.php
I guess somehow the internal e-mail-function Zenphoto and this plugin use does not work for you. You find that in line 274 of zp-core/lib-utf8.php in case you want to take a look. I did not write that, so I currently don't have any idea. We will investigate that of course.
I tried one thing I forgot about... I tried to tick the box for sending email to the admin as soon as a comment had been written. That works like a charm. I get an email with the comment right away.
I should be the same send_mail code as the other one, right?
If so might there be a bug in the plugin?
There is nothing else I need to put into the custom page then. `<?php printContactForm(); ?>`
No problem, of course I want the things that I make to work as expected!
Actually the comments use a little different mail code. There the request goes first through another function before sending through the function that the plugin uses. I will test it again on my server soon.
Hi. I've just upgraded my gallery to the last nightly, now I can choose the fields that I want to appear but the captcha one still stay virgin even if I select it.
This is quite strange, I must have forgotten something.
Comments
Best make a custom page called contact.php for example and call it there (more about custom pages on our theming tutorial).
I'm actually running a [2222] version and I can't install the last nightly because of this problem :
http://www.zenphoto.org/trac/ticket/758
So I have several questions :
1. Does this plugin depends on new functions added till the [2222] one ?
2. Does it work with multilingual options ?
3. Will your ZenPage plugin be able to display forms like that ?
Thank you for your time.
2. Yes.
3. Yes, basically. Zenpage will feature a "codeblock" section for each page/news article where you can enter php functions like this directly on the admin to be displayed for that specific page.
But you can use it right now with a normal custom theme page, too.
I'll just wait the next nightly which fix the bug above to try it (thanks to sbillard).
If you need testers for your ZenPage plugin, no problem.
I was finally able to upgrade my [2222] ZP to a [2469] version.
I made a custom page based on archive.php and paste into it :
<?php printContactForm(); ?>
I enabled the plugin but when I choose which field of the form to display (in the options) and save it, it seems that the script doesn't keep them : when I reload the plugin options in my browser the radio boxes are still virgin.
Do you have any idea about how to fix it ?
Should I have a look in a particular section of my database to check it ?
Thank you for your time.
On the side note... as the plugin is there is a small spelling mistake.
"Thanks for your message. A copy has been sent to your provided e-mail adress for your own records."
there is a d missing in Address. just a very small side note.
Thanks for the typo report. I will correct that (in German it's "Adresse", I sometimes confuse the spelling of similar words..:-)). Since that text is just a suggestion you can of course that in the options, too.
"Thanks for your message. A copy has been sent to your provided e-mail address for your own records."
However I never receive any email, I have an email set in the email address in the plugin settings.
The put up a small test and it runs fine.
I will send code here from the test files to include everything. They uploaded 3 files.
Sendmailtest.php
`
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Sendemail Script
<?php
$ip = $_POST['ip'];
$httpref = $_POST['httpref'];
$httpagent = $_POST['httpagent'];
$visitor = $_POST['visitor'];
$visitormail = $_POST['visitormail'];
$notes = $_POST['notes'];
$attn = $_POST['attn'];
if (eregi('http:', $notes)) {
die ("Do NOT try that! ! ");
}
if(!$visitormail == "" && (!strstr($visitormail,"@) || !strstr($visitormail,.")))
{
echo "<h2>Use Back - Enter valid e-mail\n";
$badinput = "
Feedback was NOT submitted
\n";echo $badinput;
die ("Go back! ! ");
}
if(empty($visitor) || empty($visitormail) || empty($notes )) {
echo "
Use Back - fill in all fields
\n";die ("Use back! ! ");
}
$todayis = date("l, F j, Y, g:i a") ;
$attn = $attn ;
$subject = $attn;
$notes = stripcslashes($notes);
$message = " $todayis [EST] \n
Attention: $attn \n
Message: $notes \n
From: $visitor ($visitormail)\n
Additional Info : IP = $ip \n
Browser Info: $httpagent \n
Referral : $httpref \n
";
$from = "From: $visitormail\r\n";
mail("spam1@olihar.com", $subject, $message, $from);
?>
Date: <?php echo $todayis ?>
Thank You : <?php echo $visitor ?> ( <?php echo $visitormail ?> )
Attention: <?php echo $attn ?>
Message:
<?php $notesout = str_replace("\r", "", $notes);
echo $notesout; ?>
<?php echo $ip ?>
Next Page
`
tesingcontact.php
`
<?php
$to = "spam1@olihar.com";
$subject = "Php test mail";
$body = "Test mail for php mail()";
if (mail($to, $subject, $body)) {
echo("Yes you have done it
");
} else {
echo("Oops try once more..
");
}
?>
`
testcont.php
`
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Email Form
<?php
$ipi = getenv("REMOTE_ADDR");
$httprefi = getenv ("HTTP_REFERER");
$httpagenti = getenv ("HTTP_USER_AGENT");
?>
" />
" />
" />
Your Name:
Your Email:
Attention:
Sales n Billing
General Support
Technical Support
Webmaster
Mail Message:
Free Code at: ibdhost.com/contact/
`
Just to include everything from my hosting company even though not necessary, I wonder what the bug could be in Zenphoto or the plugin.
P.s. I got an email in my inbox stating "Test mail for php mail()"
I should be the same send_mail code as the other one, right?
If so might there be a bug in the plugin?
There is nothing else I need to put into the custom page then.
`<?php printContactForm(); ?>`
thanks again for your time Malte
Actually the comments use a little different mail code. There the request goes first through another function before sending through the function that the plugin uses. I will test it again on my server soon.
I've just upgraded my gallery to the last nightly, now I can choose the fields that I want to appear but the captcha one still stay virgin even if I select it.
This is quite strange, I must have forgotten something.
EDIT: Found it, was a small typo. Fix will be in tonight's nightly.