Draft Module Future Improvements

A lot of people have been asking about the Draft module and when more updates will be incorporated into the module. For the last four months I have been working on non-Drupal projects, but am back and want to post a quick update answering some of the most common questions.

Draft version 1 for Drupal 6 incorporated support for Views in the place of a standard PHP page listing for user drafts. The module was very compact and the database table was small utilizing the bare minimum of fields (Draft ID, Node Type, UID, Updated and Data where data was a serialized array).

In the next release of the Draft module we want to break the module into two separate parts. One module will hold all of the core functionality of the Draft module, but removing views functionality and replacing views functionality with a PHP page. The second "sub" Draft module will be purely utilizing the views interface and if it is activated it will unset the core Draft modules draft/list path in hook_menu_alter that way if someone wishes to utilize views in the module they can.

One of the underlying changes to the Draft module will be adding three extra database fields to the main table. The first field will be a title field. If the Draft of the node type has a title field the module will remove this field from the serialized Data array and populate the title field with the title. The second field will be a body field. If the Draft of the node type has a body field the module will remove this field from the serialized Data array and populate the body field with the title. The third field will be called isempty and will be a numeric field holding either 0 or 1. This field is necessary because if we do not have the draft id preset in the system when sending the form to the web browser, Drupal Form API has issues if we inject using jQuery into the hidden field. We tried on numerous web browsers and every browser had the same issue where the draft id would be returned to the browser and injected into the hidden field but when the module was saving the draft no draft id would be sent to the server. This third field will allow us to understand if there are any empty drafts in the system and hence we can easily remove them using a cron job to check for them based on a time frame and if the isempty is set to 1.

The module support for TinyMCE and FCKEditor will be updated to make sure it works correctly if these are enabled in the system.

UI improvements to the module will include removing the large block in the middle of the page when the draft is being saved and moving it to the top right hand corner and making it a similar size to what Google have when using their "Loading" in a yellow div in the center of the screen.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

More information about formatting options