Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p01-contact : simply add contact forms in your pages
(2013-07-04, 19:53:32)Connie Wrote:
(2013-07-04, 17:37:25)TeeJay Wrote: Thanks for making me think, Connie. I just realized the solution. You are actually talking against yourself, when you say "A text between quotes define field title", it means that it's manually multilingual Smile

not at all, Teejay ;=)

what I say (and learned from the documentation") is that you can define some texts in this way. But it does not imply that with this parameter also the relating answer message etc. is defined

and it still means that you can only use one contact form in one language, not a flexible one where you can define a language and all other texts are automatically drawn from the relating language file

as you write: the "message is sent" can't be defined per language.

you can construct forms in the desired language and add these to the language-contact-pages, but all this only up to a certain level, not completely

and that is the pity ;=)

Cheers, Connie

Yes, I totally agree with you, I just wanted to emphasize my thought Smile

I can feel that you got what I wanted to say by that and I'm glad for it.

And no matter how inflexible the solution that the documentation offers is, it is still better than having a name field with label "Jméno / name / Name / nom / название", isn't it?
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-07-04, 20:27:23)TeeJay Wrote: And no matter how inflexible the solution that the documentation offers is, it is still better than having a name field with label "Jméno / name / Name / nom / название", isn't it?


správně / correct / richtig / juste / правильно

;=)
|--

Das deutschsprachige GetSimple-(Unter-)Forum:   http://get-simple.info/forums/forumdisplay.php?fid=18
Reply
Is there a way to change the input submit value depending on language ?
Reply
I had an error after implementing this into my website. It was related to the difference in saving the user-file in the different versions of GetSimple. I came up with the following solutions/hack:
Replace the admin_email function with the code below (p01-contact_gs.php ; line: 66)
Code:
function admin_email()
{
    if(file_exists(GSDATAOTHERPATH . 'user.xml'))
    {
        $data = getXML(GSDATAOTHERPATH . 'user.xml');
        return $data->EMAIL;
    }

    $dir = scandir(GSUSERSPATH);
    foreach($dir as $file)
    {
        if(preg_match('/\.xml/', $file) > 0)
        {
            $data = getXML(GSUSERSPATH.$file);
            return $data->EMAIL;
        }
    }
}

This little change in code checks if the file is found in the DATAOTHERPATH/user.xml else it will take the first file found in the GSUSERPATH. It's not the best solution, but it works for me. Maybe it works for some of you too!
Reply
Is there an email-logging feature? I would like to be able to store emails in a database of some sort. Thanks.
Reply
(2013-08-23, 06:52:56)rhecht Wrote: Is there an email-logging feature? I would like to be able to store emails in a database of some sort. Thanks.

This is just a PHP form, nothing more. You can store the emails in your inbox Big Grin which is not what you're looking for I guess.

However, you can implement that functionality, with a bit (more) of programming.
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-08-23, 06:52:56)rhecht Wrote: Is there an email-logging feature? I would like to be able to store emails in a database of some sort. Thanks.

cumbe's contact form logs emails
http://get-simple.info/extend/plugin/contact-form/264/
and works and is still maintained.
Reply
Hi,

is it possible to use p01-contact in multi language envirorment too?

Currently i have german and english site made by N18N plugin. But if i have default "german" in the config
the results of the p01-contact form are shown german only. But if i use (phone"Telefon") i can modify this
but not all outputs are than in other languages.

Any idea?
Reply
(2013-10-13, 18:52:55)phpman Wrote: Hi,

is it possible to use p01-contact in multi language envirorment too?

Currently i have german and english site made by N18N plugin. But if i have default "german" in the config
the results of the p01-contact form are shown german only. But if i use (phone"Telefon") i can modify this
but not all outputs are than in other languages.

Any idea?

Yes, it is, but with some restriction - not everything will be translated.

You can redefine the text in the form (field labels) like this
Code:
<p>
(% contact : teejay.net@seznam.cz, subject! "Subject", email! "E-mail", phone "Phone number", radio "How long would you like to stay?" = "1 week" selected | "2 weeks" | "3 weeks or more", textarea "Please, sends at least a short message here.", select "Preliminary day of arrival" = "1." selected | "2." | "3." | "4." | "5." | "6." | "7." | "8." | "9." | "10." | "11." | "12." | "13." | "14." | "15." | "16." | "17." | "18." | "19." | "20." | "21." | "22." | "23." | "24." | "25." | "26." | "27." | "28." | "29." | "30." | "31." |, select "month" = "January" selected | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" , captcha "Security code" %)
</p>

You can change the text in between the quotes "" of course. Then you'll copy the form to the second language and just change the strings between the quotes again.

So you can change all the field labels, but not the texts shown after the form is sent (Mail has been successfully sent...).
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
Okay, than i understand this that it is a little problem for me.

Yust there any solution with another contact form plugin to get all outputs in the seleceted language ?

Default i have "german" so thats not so good all isn´t correct than.
Or is it normal that i use as default english? But i think my client has problems if default not german.....
Reply
Hi
I wanted to use your plugin with GetSimple CMS and used it as component
with the following code:
Code:
<?php
echo $p01contact->parse('(% contact %)');
?>

I get this error:
Code:
Fatal error: Call to a member function parse() on a non-object in /home/www/web223/html/plugins/i18n_base/frontend.class.php(127) : eval()'d code on line 4

Does this mean, that your plugin does´t work with i18n plugins? Do you know this error?

thanks for your help
Reply
Try with:
Code:
<?php
global $p01contact;
echo $p01contact->parse('(% contact %)');
?>
(not tested)
Reply
Hi,
The form is working as expected but I have an issue. All the email sent to me ends up in my spam folder on gmail. It comes from my domain with a from address that is not my domain so google flags it. Is there a way to have the senders email address become the "reply to" header, and make the senders "From" header become admin@mydomainName.com?

This is just a test where I sent a message to myself.
ToConfusedomename@gmail.com
X-PHP-Originating-Script: 0:p01-contact.php
From: Theo <somename@gmail.com>
Reply-To: Theo <somename@gmail.com>

What I would like to try is this, see if google will allow this:
To: somename@gmail.com
X-PHP-Originating-Script: 0:p01-contact.php
From: Admin<admin@mydomain.com>
Reply-To: Theo <somename@gmail.com>

Update:
I was able to get it working by changing the following lines:
Code:
$a_name = 'Admin';
$a_email = 'www-data@mydomain.com'; (this was the actual value when I inspected the incoming header)
// $headers  = "From: $name <$email>\r\n";
$headers  = "From: $a_name <$a_email>\r\n";
$headers .= "Return-Path: $a_name <$a_email>\r\n";

I then marked the email as 'Not Spam' in gmail and added the sender www-data@mydomain.com to my contacts. When I reply, it still goes to the correct email as it was intended to.
Reply
(2013-10-14, 06:40:45)TeeJay Wrote:
(2013-10-13, 18:52:55)phpman Wrote: Hi,

is it possible to use p01-contact in multi language envirorment too?

Currently i have german and english site made by N18N plugin. But if i have default "german" in the config
the results of the p01-contact form are shown german only. But if i use (phone"Telefon") i can modify this
but not all outputs are than in other languages.

Any idea?

Yes, it is, but with some restriction - not everything will be translated.

You can redefine the text in the form (field labels) like this
Code:
<p>
(% contact : teejay.net@seznam.cz, subject! "Subject", email! "E-mail", phone "Phone number", radio "How long would you like to stay?" = "1 week" selected | "2 weeks" | "3 weeks or more", textarea "Please, sends at least a short message here.", select "Preliminary day of arrival" = "1." selected | "2." | "3." | "4." | "5." | "6." | "7." | "8." | "9." | "10." | "11." | "12." | "13." | "14." | "15." | "16." | "17." | "18." | "19." | "20." | "21." | "22." | "23." | "24." | "25." | "26." | "27." | "28." | "29." | "30." | "31." |, select "month" = "January" selected | "February" | "March" | "April" | "May" | "June" | "July" | "August" | "September" | "October" | "November" | "December" , captcha "Security code" %)
</p>

You can change the text in between the quotes "" of course. Then you'll copy the form to the second language and just change the strings between the quotes again.

So you can change all the field labels, but not the texts shown after the form is sent (Mail has been successfully sent...).

Hi, i need that this select options are taken from language file. Is it posible.

example.
select = "var1" | "var2" | "var3"

language file:
'var1' = 'bmadfkpbm'
'var2' = 'asrfgbae'
'var3' = 'sfbadgnbsfgn'
Reply
(2013-11-29, 21:16:47)kuzma Wrote: Hi, i need that this select options are taken from language file. Is it posible.

example.
select = "var1" | "var2" | "var3"

language file:
'var1' = 'bmadfkpbm'
'var2' = 'asrfgbae'
'var3' = 'sfbadgnbsfgn'

Hi kuzma,
I don't know it that would work - I guess it wouldn't.
You would have to edit the plugin itself or just add a few pieces of your own code to make this work as you want to.

I can't help with this, but maybe some deeper PHPers might Smile
Tomáš Janeček - Multilingual personal website powered by GetSimple
» The little I did for GetSimple
Reply
(2013-11-29, 21:33:34)TeeJay Wrote:
(2013-11-29, 21:16:47)kuzma Wrote: Hi, i need that this select options are taken from language file. Is it posible.

example.
select = "var1" | "var2" | "var3"

language file:
'var1' = 'bmadfkpbm'
'var2' = 'asrfgbae'
'var3' = 'sfbadgnbsfgn'

Hi kuzma,
I don't know it that would work - I guess it wouldn't.
You would have to edit the plugin itself or just add a few pieces of your own code to make this work as you want to.

I can't help with this, but maybe some deeper PHPers might Smile

I make in code samo changes, i put in some new variable, and it work fine, now i need this translate to work on select3, and i think it must be placed here but i am short with php knowledge.

// add fields
foreach($params as $id => $param) {
$field = new P01contact_field($form, $id, $param[1]);
$field->set_title($param[4]);

if($param[1] == 'select'
|| $param[1] == 'select2'
|| $param[1] == 'select3'
|| $param[1] == 'radio'
|| $param[1] == 'checkbox'
|| $param[1] == 'calendar1'
|| $param[1] == 'calendar2') {
// fields with multiples values
preg_match_all($values_pattern, $param[7], $values, PREG_SET_ORDER);
$values = unset_r($values, 0);
$field->set_value($values);
}
Reply
Hi!

Today I'have recognizied that in some cases no mail was send because of a wrong header:

------------------------
The message WAS NOT relayed to:
<info@xxxyyyxx.de.de>:
554 5.6.0 Bounce, id=320846-09 - BAD HEADER

This nondelivery report was generated by the program amavisd-new at host
xxxyyyxx.de. Our internal reference code for your message is
320846-09/yHh2lxtOzibR

INVALID HEADER

Improper use of control character (char 0D hex): From: xxxxx
<info@xxxxx.de>\r
Improper use of control character (char 0D hex): Reply-To: xxxxx
<info@xxxxx.de>\r
Improper use of control character (char 0D hex): MIME-Version: 1.0\r
Improper use of control character (char 0D hex): Content-type: text/html;
charset=UTF-8\r

Return-Path: <xxx@xxxxx.de>
From: xxxxx xxxxx.de <info@xxxx.de>\015
Message-ID: <20140212131024.9DCB21C806A6@xxxxx.de>
X-Mailer: PHP/5.3.3
Subject: xxxxx.de
-----------------

I made the following modification in "p01-contact.php"

Line 725

$headers = "From: $name <$email>\n";
$headers .= "Reply-To: $name <$email>\n";
$headers .= "Return-Path: $name <$email>\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "Content-type: text/html; charset=UTF-8\n";
$headers .= "X-Mailer: PHP/" . phpversion() . "\n" ;

This works for me.
Reply
Brick 
Hello everybody,
with the kind agreement of Nicolas, the author of the popular p01-contact plugin, I have forked and made some improvements to it (mainly, the ability to set the form language on a per-form basis and the ability to translate the plugin using the translate plugin available for GetSimple).

Shall you be interested, you can download it from here:
http://get-simple.info/extend/plugin/sim...ntact/784/

And you can ask for fixes and improvements here:
http://get-simple.info/forums/showthread.php?tid=6004

Bests,
Francesco
Reply
I also have a plugin named simple-contact
Reply
(2014-03-25, 21:41:41)Oleg06 Wrote: I also have a plugin named simple-contact

Hello Oleg,
sorry to have picked up a name which conflicts with yours, I have searched for "simple-contact" in the "extend" section and wasn't able to find any conflict because you didn't publish your plugin in the official repository.

Never mind, the name makes no difference for me, I will rename my plugin and publish it accordingly.

Bests,
Francesco
Reply
this plugin old, he's not in the repository, but it works
Code:
// Simple Contact v1.1.5 for GetSimple 2.X
// Plugin created by internet54 - http://internet54.com/
// Author: David Guerra - david@internet54.com
// Last Edited on May 23rd, 2010
// Altered by Nigel Thomson, 23 may 2010
Reply
(2014-03-26, 02:53:00)Oleg06 Wrote: this plugin old, he's not in the repository, but it works
Code:
// Simple Contact v1.1.5 for GetSimple 2.X
// Plugin created by internet54 - http://internet54.com/
// Author: David Guerra - david@internet54.com
// Last Edited on May 23rd, 2010
// Altered by Nigel Thomson, 23 may 2010

Thanks for pointing that out Oleg. I have renamed my plugin to "Simple C" now, but in any case my fork is likely going to have a short life, as my improvements to p01-contact are going to be added directly to p01-contact or to its successor, FormSimple.

Meanwhile, anybody interested on my (now temporary) fork of p01-contact can get it from this page.

Bests,
Francesco
Reply
Rename it to Easy Contact Form, or Simple Contact Form, Simple Contact 2014, so on

I don't think you should drop the word "Contact", because this is what this is all about.
Reply
How can I disable captcha?

Possible to disable subject too?
Reply
delete in the plugin settings
Reply




Users browsing this thread: 2 Guest(s)