1

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.

Someone told me to write a module, but I don't know which steps to follow.

  1. Let the current user see the content that it is published by him, which is still not approved.
  2. In addition, create a form to allow the current user to edit the node.

Does anyone know how to write such module?

3

There is a module for that™: Workflow module!

The workflow module allows the creation and assignment of arbitrary workflows to Drupal node types. Workflows are made up of workflow states. For example, a workflow with the states Draft, Review, and Published could be assigned to the Story node type.

In your case you only need to workflow states: review and approved/public.

  • but when i published the article, it shows access denied. i don't want to show this page. – enjoylife Apr 5 '11 at 2:15
  • 1
    @enjoylife: As the node is not published, yet, only the users with the permission to administer nodes can see it. – kiamlaluno Apr 5 '11 at 2:52
  • but if the anonymous write a wrong article he want to correct it. how he to do it? – enjoylife Apr 5 '11 at 3:33
  • and not show the navigation--create content on the left, which used by the anonymous user. i want to put it showing on the primary links part – enjoylife Apr 5 '11 at 3:56
  • 1
    @enjoylife You need to be able to tell anynomous users apart, else everybody could see and edit the unpublished node. Instead of creating your own system, it would be smarter to use the one that Drupal supplies with authenticated users. – googletorp Apr 5 '11 at 7:12
3

I think you should be using Views, Workflow and possibly Rules.

With Workflow you can create a "review" state; this will then have to be reviewed before a publisher can make it viewable as published content. The workflow module comes with Workflow summary which can show all the articles which need to be reviewed. You can use Views to change it to only allow users to see their own content.

Rules always comes in handy, it helps to unpublish/publish nodes depending on workflow states.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.