Unified content add box

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
Anonymous's picture

I'm building a site based on Commons (D6) and I want to make it as simple as possible for people to use. I've been looking at http://www.kiltr.com/ which is based on Diaspora (https://joindiaspora.com/) and really like their interface. They have one box where you can share content from, for example a status update:

...or an event:

I've been searching the module list but not found anything similar.

I'm currently working out the "best" way to do this - I think treating the box itself as a container and having plugins for particular content types would be the best, most extensible way forward. At the moment I want to be able to post things like status updates using the in-development facebook statuses for commons (https://github.com/IceCreamYou/commons/tree/master/docroot/profiles/drup...) and events.

I'd be interested to hear any ideas...

Comments

Panels, jQuery_UI_Dialog, Lightbox2

mac2000's picture

Why just not user panels - as i understud they allow insertion of node forms as panel content pieces.
To show panel in dialog there may be userd jQuery_UI_Dialog or Lightbox2.

Re: Panels, jQuery_UI_Dialog, Lightbox2

stevepurkiss's picture

Thanks for your reply. It's more to do with how you use one box for creating content from more than just one content type. I could as you say create a panel with a node/add form in it, but only one at a time, I'd need a switcher between types to say I want to post an update, or I want to post an event. I guess it's hard to see from the images I posted but that's one box/block/input form with a drop-down type selector.

I could use http://drupal.org/project/conditional_fields but that only works for one content type, and I don't want to create one content type with fields for updates, events, etc. then code all the relevant save info etc. as that's just horrible, so I think there needs to be a separate entity which I can plug various extensions in for the types I want to be able to post.

I will most likely be using http://drupal.org/project/dialog for some of the info, for example if you select to post to particular groups then a dialog will pop-up listing the groups and allowing you to select which ones, but that's not what this particular issue is about, this is just about the initial box you see when you want to post something on the site.

Hopefully this isn't too

othermachines's picture

Hopefully this isn't too simplistic, but-- How about adding a checkbox to the content type edit form (e.g. "Add to update switcher?"), the results of which are stored in a variable (array('status','event')), and then using that to pull the node forms into your box? Of course you'd use JS attached to your select to toggle between them.

Interesting, but...

stevepurkiss's picture

Interesting, but the form fields and flow are possibly going to be too different to just putting the whole form in.

For example, you might want to just have two or three of the major fields on display, then for some other fields you might want to just put a link to which when clicked brings a dialog popup which may have one or more advanced entry fields in. So you need to be able to describe a different format as it's not just all being displayed as one potentially big form.

The closest I've seen to something like this is using Display Suite, but using that would create yet another dependency so I'd prefer to use ctools to achieve it.

I found a thread where it

patrickavella's picture

I found a thread where it seems someone wanted to do something somewhat similar:

http://drupal.org/node/178506

Basically you can write your own forms and use node_save, hook_node_view, hook_node_insert and some other hook implementations to create a custom node/add form, then it's just a matter of a layer of javascript to create the front end functionality of choosing what type of node to add.

Re: I found a thread where it

stevepurkiss's picture

Thanks for your reply! Yes, I've created my own forms before and how you suggest with the javascript for the front-end is how I was going to do it, but I thought that there might be a more cunning way of creating something which wouldn't be site-specific. I've a feeling it'll end up being too much to try and make it generic enough, but I thought I'd post here in case anyone thought that it would be possible/worth it.

ahah

mac2000's picture

AHAH may help you accomplish this task.

As example you have your panel with status node form.
Alter it - add radio buttons with ahah callback that will render selected form.
Probably submit button of form also must use ahah

I'm working on Commons at

IceCreamYou's picture

I'm working on Commons at Acquia over the summer and Commons 2.0 (to be released in early August) is moving towards this goal. We won't quite get to a single unified form, but if you'd like to discuss further and see where we can collaborate, please contact me via my contact form.

Contributed Module Ideas

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: