1

What hook would I use to add a new content status under the path admin/content? See image below.

enter image description here

I am trying to give my content type(s) a new status so that I can do some more filtering on it. Specifically, I want to create a new "draft" status. Any pointers on where to start and API's to look at? Or are there any existing modules that do this that I can take a look at the code?

EDIT: I would like the user filling out the form to set their own status as 'draft'. The reason is that I am using the save_draft module (http://drupal.org/project/save_draft) that allows the user to save values in a form without submitting it. The problem is that Drupal considers the node to be unpublished. My editors should not see the content type if it is in "draft" mode, but since Drupal saves it as "unpublished", my editors see this and they are not sure if the content is ready to be edited or if the end user is just saving their work and finishing it up later.

The save_draft module gives me 2 buttons (Publish and Save as Draft). This allows the user to select their own status. I would also like this new "save as draft" status to be searchable/sortable so my editors could find out who hasn't finished submitting their unfinished draft, if need be.

  • 1
    the purpose od the save draft module is just to make the unbublish option a bit more friendly. So what it does it to save the content as unpublished and nothing else. so I would suggest to go with either workflow are with workbench as mentioned by Mohammed Ali Akbari. Both would do what you want. There are lots of option to control the workflow of content creation. – Mohammed Shameem Jan 19 '13 at 16:02
  • Thanks, Mohammed Shemeem. I took a quick look at the Youtube video on Workbench and it looks like it could work. I will give it a try and report back. – user785179 Jan 19 '13 at 16:05
  • Unfortunately the Workflow and Workbench modules is not able to do what I want since I want the user to self select their status to let my reviewers know if it is done or not. THe workflow and workbench module auto sets the status for them upon clicking the submit button (e.g. "draft"), which is not what I want. – user785179 Jan 24 '13 at 21:47
2

You should look at the workflow module. This one is used to create additional work flows and status in your content authoring.

  • I added some more details about in my EDIT section. I don't think the workflow module can allow the user to set their own status. – user785179 Jan 19 '13 at 15:53
0

In addition to Workflow you can use Workbench with Workbench Moderation

Its very difficult to alter Built-in Content administration page (admin/content), the filters hard-coded in modules/node/node.admin.inc

/**
 * List node administration filters that can be applied.
 */
function node_filters() {
  // Regular filters
  $filters['status'] = array(
    'title' => t('status'),
    'options' => array(
      '[any]' => t('any'),
      'status-1' => t('published'),
      'status-0' => t('not published'),
      'promote-1' => t('promoted'),
      'promote-0' => t('not promoted'),
      'sticky-1' => t('sticky'),
      'sticky-0' => t('not sticky'),
    ),
  );
  ....
  return $filters;
}
  • Will the workbench module allow the user filling out the form to set their own workflow status? – user785179 Jan 19 '13 at 15:51
0

I was able to solve my own problem by creating a field that sets the status (e.g. "draft", "to be reviewed").

I then used jQuery to hide this field. Also in jQuery, I made it so that when the user clicks on the "Publish/Save" button, then it sets the value of this hidden field to "to be reviewed". If the user hits the "Save as draft" button, then this hidden field is by default set to "draft".

In other words, my 2 buttons will set the value of this hidden field and the user can decide if their submission is ready to be reviewed or not, and my editors will know based on this hidden field on the form.

0

you can use Custom Publishing Options module for add some status to your content

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.