Hello,

One of the contributors to my Drupal site had a comment that inspired me to an idea for
a very nice enhancement ... This idea is also an alternative solution for what I was talking
about in http://drupal.org/node/12746

When creating or editing a node ( event, page, story, forum topic, image, etc. ),
I'd like to have radio buttons at the bottom, where you can choose "What would you like to do next ?"

For instance :
- Continue editing this event/page/story/etc.
- Submit another event/page/story/etc.
- View the calendar ( applicable for events - goes to the month of the just-posted event )
- Go to the home page.

Perhaps this should be entirely or partly configurable by the admin, so the admin can define
which next steps are available for which node types and what drupal path corresponds
to a next step. I'm sure this idea will greatly reduce the number of mouse clicks required
when populating f.i. an entire site, an image gallery or an event calendar.

- What do you think of this idea ?
- Where would be the best place to implement it ? The node module ? A new contributed module ?

In case you think it should be a new module, if it's not too difficult, then I might try to develop it myself, so ...
- Would it be difficult to implement such module ?
- Do you have any hints for me, for instance hooks that I can use ?

Best regards,

Eric

Comments

eveltman’s picture

Subject says all.

eveltman’s picture

I've taken a look at the code of the attachment module, which does a trick that I want to do too ( extend the node submit form for every node type ) and I've found hook_nodeapi. I guess that's what I need to extend the form and catch user input ?

I also found that the node module calls drupal_goto, which calls the exit hook of all modules. I could probably use the exit hook to redirect to the correct "next step", but I don't think the exit hook is meant for that ;-) Anybody knows a cleaner way ?

killes@www.drop.org’s picture

You are right about nodeapi.

You could add a form through nodeapi('insert') using drupal_set_message().

--
If you have troubles with a particular contrib project, please consider to file a support request. Thanks.