[drupal-devel] [feature] common.inc Move textarea pre hook between title and textarea

TDobes drupal-devel at drupal.org
Wed Apr 6 07:21:10 UTC 2005


Issue status update for http://drupal.org/node/18828

 Project:      Drupal
 Version:      cvs
 Component:    base system
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  jbond
 Updated by:   TDobes
 Status:       patch
 Attachment:   http://drupal.org/files/issues/textarea_updated.patch (1.97 KB)

The patch no longer applied, so I updated it.  I also tested it with:
* Quicktags
* TinyMCE
* Areatags (mentioned earlier by jbond)
It worked with all three... +1 for applying Dries' cleaner patch.
jbond: Your module's browser detection code does not work on my server.
 You seem to expect a $HTTP_USER_AGENT global variable, which does not
exist... I think you should instead be using
$_SERVER['HTTP_USER_AGENT'].  Perhaps your code was created with the
assumption that "register_globals" is turned on in php.ini?  That
setting is off by default, so I wouldn't rely on it.


TDobes



Previous comments:
------------------------------------------------------------------------

March 13, 2005 - 03:52 : jbond

Attachment: http://drupal.org/files/issues/common.inc_10.patch (1.8 KB)

This patch moves the textarea hook for 'pre' between the title and the
textarea. This makes it easier for simply textarea enhancements like
quicktags to add a toolbar just above the textarea. It doesn't appear
to have any effect on the fckeditor or htmlarea modules. It doesn't
introduce any new hooks.


------------------------------------------------------------------------

March 13, 2005 - 11:56 : killes at www.drop.org

Guess that is a patch.


------------------------------------------------------------------------

March 14, 2005 - 07:38 : Bèr Kessels

+1 From me.
Any module that adds something, will want to add it after the title. I
really cannot think of any case where aditional content should sit
above the title, but I can think of loads of cases where content needs
to sit between the title and textarea.


------------------------------------------------------------------------

March 14, 2005 - 17:20 : stefan nagtegaal

Indeed, nice and simple patch! +1 from me either..


------------------------------------------------------------------------

March 15, 2005 - 08:13 : jbond

http://www.voidstar.com/node.php?id=2263 [1]
If this patch gets accepted I'll drop this into contrib. It's similar
to quicktags but *I* like it better. ;-)
[1] http://www.voidstar.com/node.php?id=2263


------------------------------------------------------------------------

March 29, 2005 - 04:09 : TDobes

+1... I'm pretty sure the current positioning was accidental anyway...
it was always meant to go directly above the textarea.


------------------------------------------------------------------------

March 29, 2005 - 08:33 : Bèr Kessels

Dries,
All people who use this, seem to agree. Any chance this gets in soon?
Bèr


------------------------------------------------------------------------

March 29, 2005 - 10:23 : Dries

Attachment: http://drupal.org/files/issues/textarea.patch (1.88 KB)

Ber: while all people seem to agree, it is unclear how many people
tested/reviewed this patch.  One ought to be careful.  For example, the
patch introduces a new variable, $form_element, without properly
initializing it ...
How about the attached patch?  It is slightly cleaner, slightly faster
and properly initializes all variables.  I haven't tested it with the
WYSIWYG editors but maybe someone else (Julian?) can?  Will commit
after it has been tested.


------------------------------------------------------------------------

April 3, 2005 - 06:38 : Dries

Anyone to test this?





More information about the drupal-devel mailing list