Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
p01-contact : simply add contact forms in your pages
#26
oscim Wrote:For fix, add htaccess in folder p01-contact/captcha
This isn't exactly it. It only allows to launch .php file directly in browser.
P01 mentioned already that this is a problem with friendly urls and paths.
If you turn off friendly urls, and add exception in htaccess then it will work fine.
But, plugins should work without any exceptions in htaccess, and of course with FURLs turned on.
Addons: getsimple theme, Online Visitors, Notepad
Reply
#27
Quote:This isn't exactly it. It only allows to launch .php file directly in browser.

This url for img, are relative url. For me, the htaccess block acces in folder.
Reply
#28
Thanks for a nice plugin!

I made a small change I wanted to share:

I wrapped the following code in the CREATE ELEMENTS section:
Code:
// display fields
        foreach($settings['fields_shown'] as $field) {
            if(!in_array('no'.$field, $form_data['parameters']) &&
                $type = get_field_type($field)
            ) {
                $form .= add_field($type, $form_data);
            }
        }
        // add tag parameters fields
        foreach($form_data['parameters'] as $field) {
            if($type = get_field_type($field))
                $form .= add_field($type, $form_data);
        }
        $form .= '
            <tr>
                <td><input name="contact_id" type="hidden" value="' . $id . '" /></td>
                <td><input class="submit" id="contact-submit" name="contact-submit" type="submit" value="' . lang('send') . '" /></td>
            </tr>';

with this check:
Code:
if ((empty($form_data['status']['message'])) || (!(empty($form_data['status']['message'])) && ($form_data['status']['sent'] == false))) {
...
}

This will cause the form to not be displayed again after a comment is successfully emailed, and will just display the message.

To complement, I changed the sent word array to so:
Code:
'sent'     => array('en' => 'Thanks for your message!',     'fr' => 'Email envoyé.'),

SO it Says "Thanks for your message" rather than "Email Sent"

-Rob A>
Reply
#29
all the time wrote
Code:
Please write a longer message
Reply
#30
RobA : Nice idea! Thanks.

Oleg06 : like it's said, write a longer message. There is actually a minimum of 100 characters to write. If you want change this, modify the value at line #199.

All fields rules or default values will eventually be configurable in admin panel or tag options.
Before version 1.0 anyway
Reply
#31
Oleg06 Wrote:all the time wrote
Code:
Please write a longer message
http://neowebtime.ru/0/contact2

Change the value in line 199. For example I changed mine to 20 characters:

Code:
case 'message':
            $size = strlen($value);
            if($size > 20) return 1;
            else return 0;

edit - looks like I cross-posted p01, sorry!


-Rob A>
Reply
#32
thanks, works good plugin
Reply
#33
I'm glad you like it.

Zegnåt Wrote:The way this is usually implemented would be a checkbox at the bottom of the form, something like: “Send me a copy of this email.”
You're right. Added to todo list.

For those interested, you can see new features and changes expected before 1.0 on p01-contact Todo list

Good night.
Reply
#34
If everything on your todo list will be implemented, then this can be the best contact form plugin Smile

I'd have 1 more request. If user won't set an e-mail address to receive messages from contact form, then it should use GS admin's mail address by default.
Thus changing admin's address won't force the user to change settings in contact form plugin.

There may be a small problem in future, when GS will allow multiple user management.
Then in contact form plugin default mail could be chosen from a drop down list, taken from all registered users.


edit: 1 more thing. Although there's 1 captcha, you could develop a simple mathematic captcha.
Something like generating 2 numbers, where 1 of them would be shown as verbal, and user would have to enter result of the arithmetic action (as a number or verbal).
Like: 2 * twenty one = 41 (or forty one)
Users would be able to choose between 2 captchas.
Addons: getsimple theme, Online Visitors, Notepad
Reply
#35
@P01
Quote:Known issues

Privacy : the tag (and so recipients) is displayed in <meta> of output html. GetSimple use page sources for page description.

this is only an issue if the user does NOT specify a meta description inside page options. So there is an easy way to get around this...
- Chris
Thanks for using GetSimple! - Download

Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Reply
#36
yojoe : Recover the administrator email was originally planned, but for now i don't know how to retrieve data from GS. For the math/litteral captcha, if i made one it would replace the existing captcha. To keep it simple.

ccagle8 : Hi. I will tell the user to set the description, but a simple usage require the plugin to do it himself if needed. Would you know how to access various information of GS, such as description, language or email administrator? And is it possible to reuse the pretty error message used by GS?

I should be able to work on this tomorrow.
Thanks.
Reply
#37
p01 Wrote:How to access various information of GS, such as description, …
When a page is loaded to be displayed a variable $metad is created with the description of the page.
Running something like the following function when a page is being loaded should be able to change the description the way you want it.
Code:
function rewriteDescription() {
   global $metad;
   $metad = preg_replace(); # Strip away your tag here.
}

p01 Wrote:… language or …
What language do you want to check? The one used in the admin panel? It is stored in $LANG.

p01 Wrote:email administrator?
Probably at $datac->EMAIL. Please note I’ve never used this one so I can’t be sure.

Of course all of the above is only true when other plugins haven’t reused these variables in the global scope.

p01 Wrote:And is it possible to reuse the pretty error message used by GS?
Those are all printed by the /admin/template/error_checking.php file. There are too many different ways to get into right now in a reply so I advice you to take a look at what variables might trigger error_checking into working.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#38
Version 0.5
It starts to resemble something usable.

A lot of new things. Make forms from the simpliest to the complex.

Feel free to report any bug, idea...
Good evening!



Zegnåt Wrote:Running something like the following function when a page is being loaded should be able to change the description the way you want it.
Code:
function rewriteDescription() {
   global $metad;
   $metad = preg_replace(); # Strip away your tag here.
}

I don't understand this $metad var... I can change it :
Code:
$metad = 'something';

But i can't recuperate its value like :
Code:
echo $metad;
$metad = 'TEST' . $metad;
So impossible to preg_replace. Weird.

Zegnåt Wrote:The one used in the admin panel? It is stored in $LANG.
Perfect, thanks.

Zegnåt Wrote:Probably at $datac->EMAIL. Please note I’ve never used this one so I can’t be sure.
Thanks. The email is stored in user.xml file, so i retrieved this way :
Code:
$userdata = getXML(GSDATAOTHERPATH . 'user.xml');
$userdata->EMAIL;
Reply
#39
p01 Wrote:
Zegnåt Wrote:Running something like the following function when a page is being loaded should be able to change the description the way you want it.
Code:
function rewriteDescription() {
   global $metad;
   $metad = preg_replace(); # Strip away your tag here.
}

I don't understand this $metad var... I can change it :
Code:
$metad = 'something';

But i can't recuperate its value like :
Code:
echo $metad;
$metad = 'TEST' . $metad;
So impossible to preg_replace. Weird.
Did you use the global word? If you don’t your function wont be able to access a variable in the global scope.

p01 Wrote:
Zegnåt Wrote:Probably at $datac->EMAIL. Please note I’ve never used this one so I can’t be sure.
Thanks. The email is stored in user.xml file, so i retrieved this way :
Code:
$userdata = getXML(GSDATAOTHERPATH . 'user.xml');
$userdata->EMAIL;
Please try $datac->EMAIL first. Every getXML you use in your plugins will slow down the website and $datac should already have user.xml in it.
“Don’t forget the important ˚ (not °) on the a,” says the Unicode lover.
Help us test a key change for the core! ¶ Problems with GetSimple? Be sure to enable debug mode!
Reply
#40
Zegnåt Wrote:Did you use the global word? If you don’t your function wont be able to access a variable in the global scope.
Yes, of course. See below.

Zegnåt Wrote:Please try $datac->EMAIL first. Every getXML you use in your plugins will slow down the website and $datac should already have user.xml in it.
You're right. But i don't know how to use $datau or $datau->USR objects ($datac recuperate cp_settings.xml datas), like in line #82 in common.php. Same problem than with $metad...
Code:
Trying to get property of non-object
Reply
#41
how to connect language file?
Reload does not work
Reply
#42
You translate the plugin in russian?

I have not connected the external lang files for now, it's trunk structure (i didn't want to add this to 0.5, it's an error).
For now, temporarily, you can translate by adding entries in the lang() function in the bottom of the plugin main file or, if you use advanced tag syntax, by setting the fields title with :

Code:
fieldName "fieldTitle"

If you can paste here your traduction, i will add it to next release.

Thanks.
Reply
#43
Here it turns
Reply
#44
One caution that the sent copy to me option can be abused to send spam.

-Rob A>
Reply
#45
Oleg06 Wrote:Here it turns http://neowebtime.ru/00/contact1

Can you paste tour TAG code (whithout addresses)?

RobA Wrote:One caution that the sent copy to me option can be abused to send spam.
This was discussed earlier. It was my first feeling.
In absolute terms any form mail can be used to spam : for visitors with this option, for those who set up the plugin with the ability to identify recipients, for anyone with a mailbox...
We'll see.
Reply
#46
Congratulations! Your contact form is for me the best contact form solution for GetSimple.
A have some suggestions for new Version of the plugin:

1. Separate the translations file from the plugin
2. Attachment function would be nice
3. Fixing the Captcha reload - it doesn't not work.

Great plugin.
Reply
#47
Hi, thanks!

Separated language files are planned for next release. See Todo list.
File field added to Todo list and "reload" bug added to known issues.
__________________

Version 0.6

Nothing extraordinary in this release, mainly the separation of language and config files.

You can now easily translate the plugin. Please share if you do!

I have added an information in the documentation.

Good night.
Reply
#48
p01 Wrote:File field added to Todo list and "reload" bug added to known issues.

fixed, replace 'case' as mine
file:p01-contact.php; line: 261
Code:
case 'captcha' :
            $row .= '<img id="' . $name . '" src="'.P01CTCAPTCHA.'securimage_show.php" ';
            $row .=     'alt="CAPTCHA Image" /><br/>';
            $row .= '<a href="#"';
            $row .=     'onclick="document.getElementById(\'captcha\').src = \'';
            $row .=     P01CTCAPTCHA.'securimage_show.php?\' ';
            $row .=     '+ Math.random(); return false">';
            $row .=     lang('reload');
            $row .= '</a> ';
            $row .= '<input ';
            $row .=     'type="text" name="contact[' . $name . ']" ';
            $row .=     'size="10" maxlength="6"';
            $row .=     $locked ? ' disabled="disabled" ' : ' ';
            $row .= ' />';
            break;
Reply
#49
Hi, I'm trying your plugin, but I always get an
Reply
#50
Hi, I'm trying your plugin, but I always get an Error_message when sending the form. I created the file lang it.php but I can not use it. Can you help me?
Reply




Users browsing this thread: 1 Guest(s)