[drupal-devel] [feature] Proposal for new hook: hook_settings()

nysus drupal-devel at drupal.org
Sat Feb 26 13:44:03 UTC 2005


 Project:      Drupal
 Version:      cvs
 Component:    node system
 Category:     feature requests
 Priority:     normal
 Assigned to:  Anonymous
 Reported by:  nysus
 Updated by:   nysus
 Status:       patch
 Attachment:   http://drupal.org/files/issues/node_27.patch (506 bytes)

Oops, node.module patch was reversed.  Here's proper patch for
node.module


nysus



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

February 26, 2005 - 08:20 : nysus

Attachment: http://drupal.org/files/issues/poll_1.patch (683 bytes)

I was checking out the CVS version of Drupal and noticed that when
creating a poll, the first field on the form is labeled "Title".  If
our goal is to make Drupal usable, then clearly it should be labeled
"Question".  This problem occurs for other modules, like Flexinode. 
The first field is always called "Title" which is rarely appropriate
for the Flexinode.
I think Drupal needs the flexibility to change this kind of thing.  So
I'm proposing a new hook called hook_settings().  I thought about
creating a new hook called hook_title_label() but figured a more
generic hook named "hook_settings()" would have others uses.  For
example, you could also use it to replace the hook_node_name().
Attached is patch for the poll module to give an example of this hook
in action.  I'll also upload a patched node.module that takes advantage
of this hook.


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

February 26, 2005 - 08:41 : nysus

Attachment: http://drupal.org/files/issues/node_26.patch (506 bytes)

Attached node.patch to see how it might use hook_settings()


-- 
View: http://drupal.org/node/18003
Edit: http://drupal.org/project/comments/add/18003





More information about the drupal-devel mailing list