views:

33

answers:

3

I am making a drupal website and have a content type "quotation". The standard way of taking input in drupal is going to the create content in the menu which is not very user friendly considering your normal user.

I want to have an option to create content (i.e quotation) like in facebook, twitter or any other social networking site. A share box where someone can type in his status and can directly create content.

Also, I have two vocabularies associated with my content type and I want to accommodate them as well while using minimum space. So, how should I go about the problem.

Is there any module in Drupal which can help me in doing so or I have to write Jquery code myself.

A: 

This should be possible: http://drupal.org/node/464906

I've never tried it myself though.

slavalle
I don't want to embed the create content form in a page. The embedding part can be done by Form Block Module as well. I want to have a "Share Box". And no other thing around it. When user clicks anywhere inside the "share box" he should be able to see other options something like facebook share box.
Abhishek Gupta
+2  A: 

two vocabularies associated with my content type and I want to accommodate them as well while using minimum space.

Lol, sounds tough. If you want to use minimal space you'll need to simplify the workflow, ie, remove a vocabulary or 2.

You can also do something like this:

$('#node-edit').focus(function (){
// set your node form vocab to display:none and then show them when user actually uses the form
    $('.vocab-wrappers').show();
// set your node form  buttons to display:none and then show them when user actually uses the form
    $('#node-form buttons').show();
});

To hide the vocabularies/buttons until the user is editing the content.

To get a facebook like effect, I suggest you use: http://drupal.org/project/formblock This should get you the form and the ability to place it anywhere.

You can use form alter to hide certain parts of the form, or a form alter module, there's various options if you look in drupal modules. http://drupal.org/project/nodeformcols

You also want http://drupal.org/project/auto_nodetitle to make the title optional, and hidden from the form.

Lastly, theme the node form in CSS/JS, making the texarea smaller and whatever other stuff you would like, recommend setting display:none on the field labels.

This should give you the correct idea for making a decent facebook-like form setup.

Mark
I have already used auto_nodetitle as title may look a little odd with the quotation.Same with formblock.I am trying your code for hiding the vocabularies/buttons until the user is CREATING the content.I already have all my fields collapsed for the form. You can have a look at the under construction website at thewittyshit.com/tws
Abhishek Gupta
You know how to use css? Set display:none on elements.
Mark
Actually, when I hide the buttons, i need them back once user clicks on the content box. But on doing display:none or the nodeformcols they are hidden permanently.
Abhishek Gupta
if you use node form cols they are hidden, but display:none doesn't actually hide them permanently. See my jquery snippet for how to unhide them.
Mark
Where should one place the above code snippet.
abhishekgupta92
@abhishekgupta92 the snippit is not going to work out of the box. You need to use firebug or some equivalent to figure out the selector for what you're trying to show. This can depend on your form configuration, so I can't tell you what it is. Once you have that you would put the code into your theme or module js file. Usually you have a script.js in your theme.
Mark
A: 

Where should I place the above code. My requirements are little different but this may help me too.

I have the same question. Where should the above code be placed so as to get the desired effect.
abhishekgupta92

related questions