Page 1 of 2

Contact form

PostPosted: Sat Sep 29, 2012 8:22 pm
by ljhelbo
I have a contact form, which I use on several of my websites. It was developed based on a number of different scripts and i have now changed it to make it work as a PivotX extension. I still have to improve the integration. I think that can be better. But at least it now works, so if anybody is interested.

It has:
- Multiple recipients
- Multilanguage user interface
- Smtp authentication
- Captcha

and some other things. You can see how it works, if you go to my website at http://www.salldata.dk and click the blue email-icon to the very right. If you want to try it, you can get it via this link: http://www.salldata.dk/scripts/contact_form.zip

The extension has been officially published on the extensions site:
Visit http://extensions.pivotx.net/entry/65/contactform for more info or download.

Re: Contact form

PostPosted: Sat Sep 29, 2012 11:12 pm
by Harm10
Don't you want it to become a true PivotX extension? If so you can submit it.
btw there already exists an extension for forms: Bonusforms http://extensions.pivotx.net/entry/49/bonusforms

Re: Contact form

PostPosted: Sun Sep 30, 2012 7:38 am
by ljhelbo
I probably will, but I regard this as beta-1 ;)

Re: Contact form

PostPosted: Sun Oct 14, 2012 7:45 pm
by ljhelbo
The next version is available under the above link.

Re: Contact form

PostPosted: Tue Oct 30, 2012 8:00 am
by Harm10
This extension is currently under review to be added to the official extensions.

Re: Contact form

PostPosted: Sun Nov 11, 2012 7:33 pm
by Harm10
The extension has been officially published on the extensions site:
Visit http://extensions.pivotx.net/entry/65/contactform for more info or download.

Re: Contact form

PostPosted: Sat Nov 17, 2012 11:30 am
by ljhelbo
Sorry to say that I just found a small problem. For this extension you may place the names and emails of possible recipients in a Google spreadsheet. From there they are read with php fgets. Now I realised that this will not work if you have allow_url_fopen = off in your php.ini and some hosters may not allow you to change this value.

For this reason I have just submitted a new version, where fgets is replaced by curl.

Re: Contact form

PostPosted: Sat Nov 17, 2012 11:58 am
by Harm10
The new version is published on the extensions site!

Re: Contact form

PostPosted: Sat Nov 17, 2012 5:40 pm
by hansfn
For this reason I have just submitted a new version, where fgets is replaced by curl.

And if you don't have PHP with Curl support ;-)

The best solution is to use the HTTP library/client that is included with PivotX itself - Snoopy:

Code: Select all
        require_once $PIVOTX['paths']['pivotx_path']."/includes/Snoopy.class.php";
        $client = new Snoopy();
        @$client->fetch("URL_TO_YOUR_FILE");
        $status = $client->status;
        if ($status < 200 || $status >= 300) {
            die("Error"); // If you accept redirects replace 300 with 400
        } else {
            // Do something with $client->results which contains the file data.
        }

Snoopy can do POST request to using the function submit - see inline documentation in includes/Snoopy.class.php.

Re: Contact form

PostPosted: Sat Nov 17, 2012 5:55 pm
by ljhelbo
hansfn wrote:And if you don't have PHP with Curl support ;-)


Yes, I see ;) I will look into it, but it may take a few days ....