Closed (won't fix)
Project:
Util
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Apr 2007 at 17:05 UTC
Updated:
19 Dec 2008 at 06:01 UTC
I think that a hook_form_alter coupled with a "number of textarea lines" input could be leveraged into the Utility module without too much fuss. The idea would be to increase the number of lines in each body_textarea from the default of 10 lines to x lines. This would allow a site developer to use the Preview button as a "save my text" button without forcing them to resize the body input area after every save.
I'm going to try my hand at writing the form_alter line, but I'll leave it up to someone else to create the "how many lines should node_body inputs be?" code.
If this works, I'll bet a lot of bloggers are gonna want it...
Comments
Comment #1
dmitrig01 commentedI wonder if we could have a hidden field somewhere, and write to that field each time the textarea is resized. Then on node save, we could save the contents of that hidden field to mysql. Then on the next hook_form_alter, we can alter the size to pull from the db. How does that sound?
Comment #2
senpai commentedGreat idea. That would, in essence, become a "remember this setting for me", yet without any user intervention. Uber!
I wouldn't want to have to create another table just for storing the default height of each field of every node or content type. Where could that information be placed so that it keeps Drupal's footprint lean? Also, is it too much trouble to create a custom height for every content type's field? I'm sure you'd have to continually check to see if there were any new content types created, and add a row for storage of it's custom body height. Beyond that, are there any more pitfalls you can think of for this idea?
Comment #3
litwol commentedI have included such functionality in dev release. please test it.
i use jquery ajax to send height information to your site and store it in variables table. it saves height for each textare per content type.
this functionality is still experimental and will probably change later on if it has negative impact on memory footprint with variables or other resource.
if using variables table creates too many problems, i will move settings of the util module into it's own database table.
Comment #4
litwol commentedafter a short IRC conversation with dmitrig01 i realized that this feature needs to be extended a little.
the next step in this module is to do the following:
1) break off the settings/variables of this module into it's own table (due to the amount of data that will be stored)
2) allow per-user textarea heights to be stored
everything else is pretty much the same unless more is revealed during next discussions.
Comment #5
sunHm. I don't want to squash your motivation, but IMHO no one would assume that Util module provides such a feature. All in all, this sounds like a valuable feature request for an existing module of the category "content" or "content display". I have no particular module in mind currently, but I'm pretty sure, there is one that could provide this feature to a much greater crowd.
Comment #6
litwol commentedD5 version is no longer being maintained. marking this as wont fix. will reopen if some one decides to contribute a patch. otherwise stays closed.