Another quick plugin

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Another quick plugin
« on February 27th, 2012, 05:47 AM »
2 hours work, and I'm almost done (one random quirky bug and I need to test it on a real server that can email but otherwise I'm done)

Another one for the list :)
Posted: February 27th, 2012, 05:45 AM

I probably could make it a little nicer in places, but I wanted to get the core functionality done.

📎 contact_page.png - 16.19 kB, 640x365, viewed 201 times.

When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Dismal Shadow

  • Madman in a Box
  • Me: Who is Arantor? Cleverbot: It stands for time and relative dimensions in space.
  • Posts: 1,185
“I will stand on my ground as an atheist until your god shows up...If my irreligious bothers you much, and if you think everything I do is heresy to your god I don't care. Heresy is for those who believe, I don't. So, it isn't heresy at all!


   Jack in, Wedge,
   EXECUTE!

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Another quick plugin
« Reply #2, on February 27th, 2012, 09:07 AM »
Heh, two hours is a bit quick for getting it all done save a few quirks. I'm impressed[1] :D
 1. Motorfingers :P
A confident man keeps quiet.whereas a frightened man keeps talking, hiding his fear.

Dismal Shadow

  • Madman in a Box
  • Me: Who is Arantor? Cleverbot: It stands for time and relative dimensions in space.
  • Posts: 1,185
Re: Another quick plugin
« Reply #3, on February 27th, 2012, 09:12 AM »
We will probably see alot of official cleanest plugins from Arantor & the Wedge Teamz.

Farjo

  • "a valuable asset to the community"
  • Posts: 492

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Another quick plugin
« Reply #5, on February 27th, 2012, 11:19 AM »
Quote from Nathan Sparrow on February 27th, 2012, 09:12 AM
We will probably see alot of official cleanest plugins from Arantor & the Wedge Teamz.
Not from me I'm afraid :P

Pete, is this really plugin material...? Why not core?
Also, did you ensure the input box for e-mails has an email type? I like HTML5 forms :P

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Another quick plugin
« Reply #6, on February 27th, 2012, 02:12 PM »
Quote
Also, did you ensure the input box for e-mails has an email type? I like HTML5 forms
Actually, no I didn't, I forgot. But there are other reasons to use this rather than pure semantics - most notably, on the iPad, you get a different contextual keyboard to work with.
Quote
Pete, is this really plugin material...? Why not core?
I debated that last night, and the bottom line is that I don't think it's quite core material. How many forums have you seen that have such a thing?

The way I figure it, it's built and we can use it - and if it later turns out to be popular, we can fold it in to the core reasonably easily.
Posted: February 27th, 2012, 01:32 PM

I've updated the plugin to use an email field, and also to correct the niggly bug. Everything else that could be done at this point is purely cosmetic (like highlighting errors better at the footer of the form) but I'm done for now, heh.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Another quick plugin
« Reply #7, on February 27th, 2012, 11:34 PM »
Quote from Arantor on February 27th, 2012, 02:12 PM
Actually, no I didn't, I forgot. But there are other reasons to use this rather than pure semantics - most notably, on the iPad, you get a different contextual keyboard to work with.
Yup, the #1 reason for using these...
Quote
I debated that last night, and the bottom line is that I don't think it's quite core material. How many forums have you seen that have such a thing?
The question should be -- how many forums will do it once we start doing it? :P
Because Wedge is not there to 'be a free alternative to paid forum quality'.
Wedge is here to innovate, to do things that other forums don't. Not systematically, but it's nice to have a few ideas from time to time that we know others will start stealing from us. ;)
Quote
The way I figure it, it's built and we can use it - and if it later turns out to be popular, we can fold it in to the core reasonably easily.
Sure enough.
Quote
I've updated the plugin to use an email field, and also to correct the niggly bug. Everything else that could be done at this point is purely cosmetic (like highlighting errors better at the footer of the form) but I'm done for now, heh.
Now you can get started on the calendar plugin...... :niark:

Just kidding eheh. It's not like I'm missing it.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Another quick plugin
« Reply #8, on February 27th, 2012, 11:38 PM »
Quote
Yup, the #1 reason for using these...
Actually, though, it's the number 2 reason for me. Having the browser do idiot-proofing on the inputs for the user - so I don't have to - is the number 1 reason :D
Quote
The question should be -- how many forums will do it once we start doing it?
More than one already does it in the paid sector. So I'm being daring by NOT doing it ;)
Quote
Wedge is here to innovate, to do things that other forums don't. Not systematically, but it's nice to have a few ideas from time to time that we know others will start stealing from us.
Contact forms in the core are nothing new, thus it doesn't innovate or push any boundaries to either leave it out or put it in. And doing it this way means I don't have to worry about it in the core - and have a perfect test subject for the feature I added today.
Quote
Now you can get started on the calendar plugin......
Actually it should be mostly done, apart from having to fix $modSettings -> $settings, just really needs a lot of testing and making sure the whole post form integration stuff works (because that hasn't been tested AFAIK)

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Another quick plugin
« Reply #9, on February 27th, 2012, 11:57 PM »
Quote
Having the browser do idiot-proofing on the inputs for the user - so I don't have to - is the number 1 reason :D
OH HELL YES!

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Another quick plugin
« Reply #10, on February 28th, 2012, 12:02 AM »
That's the thing - assuming the browser is capable of handling it, you get email addresses being checked that they are at least legal email addresses, you get numbers validated to being integers (optionally conforming to steps, e.g. between 0 and 100, rounded to nearest 10), and the spec even allows for validating floats though I never got into that because I can't remember anywhere that actually uses it...

live627

  • Should five per cent appear too small / Be thankful I don't take it all / 'Cause I'm the taxman, yeah I'm the taxman
  • Posts: 1,670
Re: Another quick plugin
« Reply #11, on February 28th, 2012, 12:15 AM »
Email validation is a real beast. Almost nobody gets it right.

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Another quick plugin
« Reply #12, on February 28th, 2012, 12:18 AM »
Not even the specification always agrees, and GMail's trick of ignoring dots to build a header (e.g. a.b.c.d@account = abcd@account) is not exactly within the specification either.

It also depends on whether you treat TLDs properly or not, validating what is actually currently legal vs what is theoretically legal (i.e. checking against TLDs' existence) vs locally routable domains (like localhost).