Extension talk:EmailForm

From MediaWiki.org

Jump to: navigation, search

Contents

[edit] Spam

Hello,

I am using your extension and thank you for that work.

What I am witnessing is that I get a lot of s p a m, plenty of messages with external links....

I am using the extension recaptcha on the website but as no page is edited for the form, this is not trigerred.

Would you have any idea/suggestion about this?

Thanks and have a good day

Guy Contact form

I haven't had any spam through my site, but you aren't the only one to report this. Can you tell if the spam is being submitted through the form, or if the email address is being picked up through the MediaWiki:EmailForm page? I'm starting to think the address should be stored in the code instead.
EHartwell 20:05, 1 November 2007 (UTC)
I agree storing in the code is probably a better solution however we need to make sure that it does not limit us to only one target mail address or we end up with Extension:ContactPage, maybe storing addresses in an array and then somehow selecting which one to use through the MediaWiki:EmailForm page, perhaps by providing the array index or something?
This extension works like charm. Only one question. When i fill out the form and send the mail, the sender is wwwrun@something.com (apache), but not the sender i typed in the form. Is it possible to change this?
--89.212.65.33 14:54, 24 January 2008 (UTC)
I had a big problem with spam being sent via this contact form so I added checks for valid email address being used as 100% of the spams I was getting didn't even bother to enter anything looking remotely like an email address in the field. It only required detecting the address validity in send_email() and returning the error message text from render_email_field(), contact me if you're interested in my changes.
VZ 15:05, 23 March 2009 (UTC)

[edit] Feature Request: Captcha

This extension really needs a built in captcha, because automated bots can easily send spam through this form. I've experienced this personally, since I tried it out on the Battlestar Wiki. -- Joe Beaudoin Jr. 17:08, 25 March 2008 (UTC)

[edit] Updated version

From the main page, moved here:

I implemented this extension by the instructions above and my wiki page gave me a list of repeated errors like follows on the page where I placed the <emailform>:

PHP Notice: Undefined index: sendEmailForm in C:\Inetpub\wwwroot\mediawiki\extensions\emailform\EmailForm.php on line 49 

PHP Notice: Undefined offset: 0 in C:\Inetpub\wwwroot\mediawiki\extensions\emailform\EmailForm.php on line 58 

PHP Notice: Undefined offset: 1 in C:\Inetpub\wwwroot\mediawiki\extensions\emailform\EmailForm.php on line 127 

This drove me nuts, so I edited the EmailForm.php file so that these errors no longer display. I have verified that the EmailForm still functions perfectly. I also changed the subject line in the emails so that they only display the prefix and the name information instead of the entire content of the email.

All of my changes are very obvious and I left the original code in place behind comment symbols. I hope this helps you too!

I replaced this new version with the old version. Odessaukrain 20:01, 9 May 2008 (UTC)

[edit] i cant see the hebrew emails

when users write to me in hebrew i cant see the email.. can u help me?

[edit] Error on send

Hi

I have somme pb with this extension :

The form is OK but the mail is not send and i have the following error message :

Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\xampp\htdocs\mediawiki\extensions\EmailForm\EmailForm.php on line 223

Can somebody help me ? Thanks


[edit] Warnings and Blank Page after upgrading to 1.12.0

I originally installed EmailForm in MediaWiki 1.9.3. When I upgraded to 1.12.0, pages with Email forms on them stopped displaying. I now get the white page. The apache error log looks like:

 [-timestamp-] [error] [client -IP-] PHP Notice:  Undefined index:  0 in /var/www/html/w/includes/Parser.php on line 3430
 [-timestamp-] [error] [client -IP-] PHP Notice:  Undefined index:  1 in /var/www/html/w/includes/Parser.php on line 3430
 [-timestamp-] [error] [client -IP-] PHP Notice:  Undefined index:  2 in /var/www/html/w/includes/Parser.php on line 3430

It turns out that on this particular page I have 3 section headings in the <emailform> and 0 section headings in the <emailform result> part.

The relevant code in Parser.php is:

  3375                  # Get all headlines for numbering them and adding funky stuff like [edit]
  3376                  # links - this is for later, but we need the number of headlines right now
  3377                  $matches = array();
  3378                  $numMatches = preg_match_all( '/<H(?P<level>[1-6])(?P<attrib>.*?'.'>)(?P<header>.*?)<\/H[1-6] *>/i', $text, $matches );
 
  3422                  foreach( $matches[3] as $headline ) {
  3423                          $isTemplate = false;
  3424                          $titleText = false;
  3425                          $sectionIndex = false;
  3426                          $numbering = '';
  3427                          $markerMatches = array();
  3428                          if (preg_match("/^$markerRegex/", $headline, $markerMatches)) {
  3429                                  $serial = $markerMatches[1];
  3430                                  list( $titleText, $sectionIndex ) = $this->mHeadings[$serial];

I'm guessing that the code is choking on the conditionally rendered section headings? I don't know enough about PHP, MediaWiki, or this extension to fix this, or even to definitively say that is the problem.

The problem can be worked around by editing the page (append ?action=edit to the URL) and taking out all section headers. Putting in __NOEDITSECTIONS__ does not do the trick.

Any help is appreciated.

Tnabtaf 16:51, 15 August 2008 (UTC)

[edit] Page name with namespace prefix

I can't seem to get page name prefixes to work (namespace): My Form works, but not HR:My Form.

Any way around this?

Great extension, by the way -- thanks!

[edit] "EmailForm is only active on protected pages" Message

Hi,

I need to do a survey and I'm trying to use this extension. For some reason I am not able to see the form.

Although I have added the page details to MediaWiki:EMailForm, the form page only shows the message: "EmailForm is only active on protected pages."

I've tried everything I could. Does anybody has any idea?

Thanks.

[edit] Fix for 1.8+

In order to work in newer versions of mediawiki I made the following changes. Commented lines are what used to be there.

function render_wikitext($parser, $input) {
#    $lparse = clone $parser;
#    $output = $lparse->parse( $input, $parser->mTitle, $parser->mOptions, true, false );
    $output = $parser->recursiveTagParse( $input );
#    return( $output->getText() );
    return( $output );
}

[edit] LinkHolderArray problem since update on mediawiki 1.14

Undefined property:  LinkHolderArray::$internals in path\includes\parser\LinkHolderArray.php in line 126

This is the message that i recieve in every page with a form after upgrading to mediawiki 1.14. With all previous versions (from 1.11 to 1.13 it worked perfectly). Can anyone help to find a quick solution?

thanks in advance
best regards
--TurboKanne 09:34, 17 February 2009 (UTC)

[edit] Solution for the problem

You should apply to the above article "Fix for 1.8+".

70.134.109.42 02:08, 28 June 2009 (UTC) I'm going to fix the extension page.

[edit] Charset - how?

How i can add "Content-type: text/plain; charset=ХХХ" to final message? Some mailservers do not understand encoding correct... How can I set the character set of letters by hand? Thanks for your reply --81.200.28.116 11:06, 28 February 2009 (UTC)

[edit] Form

How do I make the form so that when someone click 'send comments' without entering anything it says:

You have not filled in the following fields:

  • Topic
  • Name
  • Email
  • Message

86.136.108.50 14:32, 14 March 2009 (UTC)

[edit] FatalError

Hello. I have an error on a pages with email form after i have updated mediawiki to 1.14 version:

 Fatal error: Unsupported operand types in /srv/www/w/includes/parser/LinkHolderArray.php on line 33

How can i fix it? Thanks. --79.142.85.9 20:05, 9 June 2009 (UTC)

[edit] Fatal error: Unsupported operand types in /home/.marabel/protofilm/protofilm.net/includes/parser/LinkHolderArray.php on line 33

I am receiving the same error as the inquiry above. I'm using version 1.15. Any help is appreciated.

thanks

--Kentongrey 14:38, 7 July 2009 (UTC)

[edit] bigger rows and cols?

How can I make the rows and cols bigger?

textarea: name="description" prompt="Problem description" rows="300" cols="300" Don't work

andrea 80.218.141.182 20:05, 21 October 2009 (UTC)