I want to allow users to submit the content to my site, but the content must be first approved, and then it can be published.
Is there a module that do this? Which code should I write for such module, if one doesn't exist?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
If you create a workflow you can set it to only allow users to create content in the 1st state, something like "needs review". Then, an admin can come in and progress to the 2nd sate, say to "published".
I used an action and trigger to automatically publish any content placed into the 2nd state.
You can use the form filter to disable the ability to set the content straight as published in the normal node edit form.
Ideally you will want some type of approval queue too, you can use the default Workflow summary but I think this requires views.
Another way to do this is the Revisioning module. If you set the content type to not be published by default, you can use this module to control publication as well as any revisions. It provides a view for administrators showing all revisions that are awaiting publication.
"Workflow" or "Revisioning", depends up on your requirements.
Workflow module provides state based content control, i.e., you can make your content flow across various states (Draft, Pending, Review etc.,) and various users, before you publish it.
Revisioning module creates a new revision for every edit made on a node, and finally you can publish it.
I suggest you to use the combination of both these modules, for a cleaner impact. This slideshare presentation would be helpful for you, read this before you proceed http://www.slideshare.net/mewren/workflow-revisioning-and-rules-in-drupal
But remember, this is a back and forth task. Choose carefully between workflow_node and workflow_field. Also, you may need to work around this issue http://www.ionsden.com/article/problems-workflow-and-revisioning-drupal