Custom module, do you think I should add it to cvs.drupal.org ?
Hi folks, I made a really, really simple module (3 lines and a JS file). It uses the "title" HTML attribute on text and textarea HTML inputs to display an empty value in the input, which disappear on focus, and re-appear on focus out if input is still empty. This is simple, I saw something like 10 or 20 different JS implementations; I choosed one of them, (one I saw on Drupal.org's forums), adapted it a bit the JS file to be more coherent with Drupal6. The real module just does a "drupal_add_js()" in hook_init() (which should be compatible with aggressive caching). Do you think this is a good idea to commit it in the Drupal CVS, as a new project? Or do you known some modules which already does the same thing, in a better way? Regards, Pierre.
No. A 3 line module is not worth its own project and issue queue and such. This module is best posted in the snippets here http://drupal.org/node/23220 See also here http://drupal.org/handbook/customization/php-snippets On Thu, Apr 30, 2009 at 4:15 AM, Pierre Rineau < pierre.rineau@makina-corpus.com> wrote:
Hi folks,
I made a really, really simple module (3 lines and a JS file).
It uses the "title" HTML attribute on text and textarea HTML inputs to display an empty value in the input, which disappear on focus, and re-appear on focus out if input is still empty.
This is simple, I saw something like 10 or 20 different JS implementations; I choosed one of them, (one I saw on Drupal.org's forums), adapted it a bit the JS file to be more coherent with Drupal6.
The real module just does a "drupal_add_js()" in hook_init() (which should be compatible with aggressive caching).
Do you think this is a good idea to commit it in the Drupal CVS, as a new project?
Or do you known some modules which already does the same thing, in a better way?
Regards, Pierre.
-- Khalid M. Baheyeldin 2bits.com, Inc. http://2bits.com Drupal optimization, development, customization and consulting. Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra Simplicity is the ultimate sophistication. -- Leonardo da Vinci
Ok, so I won't. Thanks for your answer. Le jeudi 30 avril 2009 à 10:29 -0400, Khalid Baheyeldin a écrit :
No. A 3 line module is not worth its own project and issue queue and such.
This module is best posted in the snippets here http://drupal.org/node/23220
See also here http://drupal.org/handbook/customization/php-snippets
On Thu, Apr 30, 2009 at 4:15 AM, Pierre Rineau <pierre.rineau@makina-corpus.com> wrote: Hi folks,
I made a really, really simple module (3 lines and a JS file).
It uses the "title" HTML attribute on text and textarea HTML inputs to display an empty value in the input, which disappear on focus, and re-appear on focus out if input is still empty.
This is simple, I saw something like 10 or 20 different JS implementations; I choosed one of them, (one I saw on Drupal.org's forums), adapted it a bit the JS file to be more coherent with Drupal6.
The real module just does a "drupal_add_js()" in hook_init() (which should be compatible with aggressive caching).
Do you think this is a good idea to commit it in the Drupal CVS, as a new project?
Or do you known some modules which already does the same thing, in a better way?
Regards, Pierre.
-- Khalid M. Baheyeldin 2bits.com, Inc. http://2bits.com Drupal optimization, development, customization and consulting. Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra Simplicity is the ultimate sophistication. -- Leonardo da Vinci
I disagree. I don't think the initial number of lines of code is a good indicator of anything (and also, it's not just 3 lines in this case, but rather 3 lines plus an entire file, right?). In my opinion, a better measure is whether or not the code is written in a way that is generically useful. If it can be meaningfully used by a variety of sites without them needing to edit the code, then posting it as a module makes sense. Modules are accessible to a much broader audience than PHP snippets are. However, in this case, if I understand the description correctly, it sounds like it might have a lot in common with an existing project ( http://drupal.org/project/compact_forms)? If so, then you should contribute your work to that project rather than starting a new one. Good luck! David Rothstein On Thu, Apr 30, 2009 at 11:17 AM, Pierre Rineau < pierre.rineau@makina-corpus.com> wrote:
Ok, so I won't.
Thanks for your answer.
Le jeudi 30 avril 2009 à 10:29 -0400, Khalid Baheyeldin a écrit :
No. A 3 line module is not worth its own project and issue queue and such.
This module is best posted in the snippets here http://drupal.org/node/23220
See also here http://drupal.org/handbook/customization/php-snippets
On Thu, Apr 30, 2009 at 4:15 AM, Pierre Rineau <pierre.rineau@makina-corpus.com> wrote: Hi folks,
I made a really, really simple module (3 lines and a JS file).
It uses the "title" HTML attribute on text and textarea HTML inputs to display an empty value in the input, which disappear on focus, and re-appear on focus out if input is still empty.
This is simple, I saw something like 10 or 20 different JS implementations; I choosed one of them, (one I saw on Drupal.org's forums), adapted it a bit the JS file to be more coherent with Drupal6.
The real module just does a "drupal_add_js()" in hook_init() (which should be compatible with aggressive caching).
Do you think this is a good idea to commit it in the Drupal CVS, as a new project?
Or do you known some modules which already does the same thing, in a better way?
Regards, Pierre.
-- Khalid M. Baheyeldin 2bits.com, Inc. http://2bits.com Drupal optimization, development, customization and consulting. Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra Simplicity is the ultimate sophistication. -- Leonardo da Vinci
In fact, empty text in form inputs is a really common feature! But it won't be useful if there is no advertisement and if no people use it. In my company, for each project, we have to write manually the snippet, maybe for other people it wont help, but here, we are really going to use it. What I'm really looking for commiting it, is the community to help to get some more cool features and more configurability around this stuff. If anyone seems interested to help me evolving such module, tell me, and I will commit it, else I won't. Pierre. On Thu, 2009-04-30 at 12:16 -0400, David Rothstein wrote:
I disagree. I don't think the initial number of lines of code is a good indicator of anything (and also, it's not just 3 lines in this case, but rather 3 lines plus an entire file, right?). In my opinion, a better measure is whether or not the code is written in a way that is generically useful. If it can be meaningfully used by a variety of sites without them needing to edit the code, then posting it as a module makes sense. Modules are accessible to a much broader audience than PHP snippets are.
However, in this case, if I understand the description correctly, it sounds like it might have a lot in common with an existing project (http://drupal.org/project/compact_forms)? If so, then you should contribute your work to that project rather than starting a new one.
Good luck! David Rothstein
On Thu, Apr 30, 2009 at 11:17 AM, Pierre Rineau <pierre.rineau@makina-corpus.com> wrote: Ok, so I won't.
Thanks for your answer.
Le jeudi 30 avril 2009 à 10:29 -0400, Khalid Baheyeldin a écrit :
> No. A 3 line module is not worth its own project and issue queue and > such. > > This module is best posted in the snippets here > http://drupal.org/node/23220 > > See also here http://drupal.org/handbook/customization/php-snippets > > On Thu, Apr 30, 2009 at 4:15 AM, Pierre Rineau > <pierre.rineau@makina-corpus.com> wrote: > Hi folks, > > I made a really, really simple module (3 lines and a JS file). > > It uses the "title" HTML attribute on text and textarea HTML > inputs to > display an empty value in the input, which disappear on focus, > and > re-appear on focus out if input is still empty. > > This is simple, I saw something like 10 or 20 different JS > implementations; I choosed one of them, (one I saw on > Drupal.org's > forums), adapted it a bit the JS file to be more coherent with > Drupal6. > > The real module just does a "drupal_add_js()" in hook_init() > (which > should be compatible with aggressive caching). > > Do you think this is a good idea to commit it in the Drupal > CVS, as a > new project? > > Or do you known some modules which already does the same > thing, in a > better way? > > Regards, > Pierre. > > > > > -- > Khalid M. Baheyeldin > 2bits.com, Inc. > http://2bits.com > Drupal optimization, development, customization and consulting. > Simplicity is prerequisite for reliability. -- Edsger W.Dijkstra > Simplicity is the ultimate sophistication. -- Leonardo da Vinci
I'll happily review your patches for http://drupal.org/project/compact_forms sun
-----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Pierre Rineau Sent: Thursday, April 30, 2009 10:02 PM To: development@drupal.org Subject: Re: [development] Custom module, do you think I should add it to cvs.drupal.org ?
In fact, empty text in form inputs is a really common feature! But it won't be useful if there is no advertisement and if no people use it.
In my company, for each project, we have to write manually the snippet, maybe for other people it wont help, but here, we are really going to use it.
What I'm really looking for commiting it, is the community to help to get some more cool features and more configurability around this stuff.
If anyone seems interested to help me evolving such module, tell me, and I will commit it, else I won't.
Pierre.
Nice! I did not found it because I was looking for D6 module. If you don't have a working D6 version and you want a port, private mail me, I'll do it. Thanks. On Thu, 2009-04-30 at 22:15 +0200, Daniel F. Kudwien wrote:
I'll happily review your patches for http://drupal.org/project/compact_forms
sun
-----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Pierre Rineau Sent: Thursday, April 30, 2009 10:02 PM To: development@drupal.org Subject: Re: [development] Custom module, do you think I should add it to cvs.drupal.org ?
In fact, empty text in form inputs is a really common feature! But it won't be useful if there is no advertisement and if no people use it.
In my company, for each project, we have to write manually the snippet, maybe for other people it wont help, but here, we are really going to use it.
What I'm really looking for commiting it, is the community to help to get some more cool features and more configurability around this stuff.
If anyone seems interested to help me evolving such module, tell me, and I will commit it, else I won't.
Pierre.
On 30-Apr-09, at 4:32 PM, Pierre Rineau wrote:
Nice! I did not found it because I was looking for D6 module. If you don't have a working D6 version and you want a port, private mail me, I'll do it.
http://drupal.org/node/243952 This is great, yet another case where my custom code can be eliminated :) --Andrew
And I did some patches, look at your issue queue. This module is great, keep going! On Thu, 2009-04-30 at 22:32 +0200, Pierre Rineau wrote:
Nice! I did not found it because I was looking for D6 module. If you don't have a working D6 version and you want a port, private mail me, I'll do it.
Thanks.
On Thu, 2009-04-30 at 22:15 +0200, Daniel F. Kudwien wrote:
I'll happily review your patches for http://drupal.org/project/compact_forms
sun
-----Original Message----- From: development-bounces@drupal.org [mailto:development-bounces@drupal.org] On Behalf Of Pierre Rineau Sent: Thursday, April 30, 2009 10:02 PM To: development@drupal.org Subject: Re: [development] Custom module, do you think I should add it to cvs.drupal.org ?
In fact, empty text in form inputs is a really common feature! But it won't be useful if there is no advertisement and if no people use it.
In my company, for each project, we have to write manually the snippet, maybe for other people it wont help, but here, we are really going to use it.
What I'm really looking for commiting it, is the community to help to get some more cool features and more configurability around this stuff.
If anyone seems interested to help me evolving such module, tell me, and I will commit it, else I won't.
Pierre.
participants (5)
-
Andrew Berry -
Daniel F. Kudwien -
David Rothstein -
Khalid Baheyeldin -
Pierre Rineau