Avatar of Leevi Graham

NSM Publish Plus v1.1.1 Improve your ExpressionEngine workflow with drafts, revisions, notes and fine-grained member publishing privleges.

Collaborative workflow with entry drafts, live in-template previews, workflow state, revision notes and advanced email notification.

Need to assign weblog posting privileges to members rather than groups? Create, proof and approve existing entry drafts before they go live? Leave notes for fellow editors and publishers? NSM Publish Plus is the can't-live-without extension for collaborative publishing!

Purchase a commercial license for a single domain (unlimited sub-domains) and receive email and forum support while feeling good about supporting independent ExpressionEngine developers.

Only $149.95 $89.95 (holiday special) per license. Register to purchase!

Table of contents

1. Overview Top

NSM Publish Plus is a Multi-Site Manager compatible ExpressionEngine extension that improves ExpressionEngine's native publishing workflow.

1.1. The problem Top

There is no doubt that ExpressionEngine is an excellent publishing system, but it does lack workflow concepts such as drafts, live previews and fine grain member publishing permissions. These omissions make it difficult to implement a smooth collaborative publishing workflow.

The major issue most users have with the current ExpressionEngine workflow is that there is only a simple approval process for entries. The recommended way requires the publisher to switch the status of an entry between open and pending while editing. This technique is fine for unpublished entries, but can "break" the site if a previously published entry is being edited; ie: the entry is is not rendered in the default {weblog:entries} tag unless the status parameter is set accordingly.

What is needed is a way to have the most recent, open version of an entry visible on the site, but have the most updated version (draft) awaiting approval and hidden from general viewing until approved. The draft should also be available to preview in it’s final template context. Publish Plus adds this functionality plus much much more.

1.1.1. Common publishing scenarios NSM Publish Plus solves Top

Time for a couple of common publishing scenarios which are not possible with a standard ExpressionEngine install. They are all possible with NSM Publish Plus:

  1. Marketing (publishers) manages the content on the website. They want to allow someone from another department, say human resources (editors), to edit their own entries. Marketing wants to be able to approve human resources content changes before they show up on the site.
  2. A website has many members who contribute articles (editors). The website owner (publisher) needs to preview and approve articles before they "go live". If an article does not meet the website’s submission requirements and is denied, the website owner needs to leave a note for the contributor and notify them via email regarding the entries state.
  3. A website has many members assigned to a different member groups. The website owner only wants a small number of those members to have publishing rights, regardless of their group permissions.
  4. The "publisher" needs to be notified when an "editor" makes a change so they can decide wether to approve or deny the article.

2. Features Top

NSM Publish Plus has many features to enhance ExpressionEngine's native workflow. They include:

  • Fine grained weblog assignment - Assign weblog posting privileges to members not only member groups.
  • Publishing Roles - Assign roles (publisher, editor) to members further limiting a members weblog posting privileges.
  • Entry drafts - Create and edit drafts for published entries without updating the live site.
  • In-Template Previews - View standard previews, drafts and old revisions in template context (requires LG Live Look).
  • Entry specific notes - Easily communicate updates with other team members through entry specific notes.
  • Draft specific notes - Track individual draft edits with draft specific notes.
  • Workflow states - Assign states to entries to track their position in the workflow.
  • Filter entries by workflow state - Easily see which entries are approved, pending approval, denied.
  • Advanced notification system - Send email notifications when various actions are taken by members.
    • Notifications can be sent to any combination of the following:
      • entry editor
      • draft authors
      • member groups
      • NSM Publish Plus editors (filter by weblog)
      • NSM Publish Plus publishers (filter by weblog)
      • comma-separated list of emails
    • When:
      • an entry is created (further filter using workflow state / entry status)
      • an revision is created (further filter using workflow state / entry status)
      • a new draft is created (further filter using workflow state / entry status)
      • an entry is submitted for approval (further filter using workflow state / entry status)
      • an entry is deleted
      • a new note is created

It's also:

3. Screenshots Top

4. Publishing roles and workflow Top

4.1. Publishing roles Top

NSM Publish Plus introduces the concept of publishing roles. Each member must assigned a default publishing role for every weblog. Publishing roles can be set explicitly in the member's preferences or implicitly through member group roles.

Members are assigned one of the following roles:

  • Publisher - Publishers can update an entries state and status, create notes and create entry previews, drafts and revisions (approving entries).
  • Editor - Editors can preview entries, save drafts and submit them for approval. They cannot publish to the live site or change an entries status or state.
  • No Access - Members are restricted from posting in this weblog.

These roles override the standard ExpressionEngine publishing privileges.

4.2. Revisions & drafts Top

4.2.1. Revisions Top

Entry versioning is required when using NSM Publish Plus.

Revisions allow publishers and editors to store previously published versions of an entry and review them at any time. They can be accessed from the Revisions Tab in the publish form.

When a previous revision is selected from the Revisions Tab the data will be loaded into the Publish Form which can then be edited. If any changes are saved, a new revision will be created which does not affect the previously loaded revision.

Revisions are created when:

  1. A publisher explicitly saves a revision by updating an entry
  2. An editor creates a new entry (unsaved) and then saves it as a draft or submits it for approval

In the later case the revision is assigned the default entry status of the weblog. This revision is then used as a base for all future drafts and revisions. See: User Guide › Configuration › Default entry status for more information.

4.2.2. Drafts Top

Drafts perform the exact same way as revisions but with two major differences — both publishers and editors can create drafts and saved drafts are not shown on your public site until approved by a publisher.

If an entry has drafts that were created after the last revision, the latest draft content will be automatically loaded into the Publish Form the next time the entry is edited. The latest draft will continue to be loaded until a new revision is saved by a publisher.

Drafts are created when:

  1. An editor or publisher explicitly saves a draft
  2. An editor submits any entry for approval

4.3. Entry lifecycle Top

4.3.1. New entries Top

Every entry starts as a blank publish form. The first time an entry is saved, either as a draft, submitted for approval or published a new revision is created.

If an editor creates a new entry (unsaved) and then saves it as a draft or submits it for approval the new revision is assigned the default entry status of the weblog. This revision is then used as a base for all future drafts and revisions. See: User Guide › Configuration › Default entry status for more information.

4.3.2. Saving drafts Top

When an entry is saved as a draft the data is stored separately from the last revision. The live entry is not updated and the site will continue to serve the last saved revision. The most recently created draft will be automatically loaded into the edit form every time the entry is edited until a publisher creates a new revision.

If an editor saves the new draft the workflow state will automatically be set to changed.

4.3.3. Submitting for approval Top

Once an entry has been edited the editor may choose to either save the entry as a new draft or submit it for approval. Submitting an entry for approval will create a new draft and set the workflow state to pending.

4.3.4. Approving drafts Top

Only publishers can approve drafts and it is their responsibility to check every aspect of the entry before it is saved as a new revision.

To approve a draft:

  1. Check all the entries data is correct
  2. Check the entries status, drafts created by editors are automatically set to the default entry status assigned to the weblog
  3. Set the entries state to approved
  4. Save the entry as a draft (optional)
  5. Save the entry as a new revision

5. Demonstration screencast Top

Now you know all the features of; and concepts behind collaborative workflow with NSM Publish Plus see it in action. Fullscreen HD version available on Vimeo.

6. User guide Top

6.1. Requirements Top

NSM Publish Plus is an ExpressionEngine extension that has been tested on version 1.6.5+. Live in-template previews require ExpressionEngine 1.6.7+ and LG Live Look 1.1.0+

Entry versioning must be enabled for every weblog in the site. Entry versioning preferences can be found under Weblog Preferences in you sites CP.

To function correctly javascript must enabled and the jQuery javascript library must be loaded in the control panel. jQuery can easily be included using CP jQuery which is packaged with ExpressionEngine 1.6.6+

The user must also be using a modern web browser (any thing better than IE6).

6.1.1. Important core hack Top

This extension requires one small modification of the ExpressionEngine core files.

In /system/cp/cp.publish.php search for:

if (is_numeric($version_id))
{
$entry_id = $IN->GBL('entry_id');
$revquery = $DB->query("SELECT version_data
                       FROM exp_entry_versioning
                       WHERE entry_id = '{$entry_id}'
                       AND version_id = '{$version_id}'
                     ");

if ($revquery->num_rows == 1)
{
 $_POST = $REGX->array_stripslashes(@unserialize($revquery->row['version_data']));
 $_POST['entry_id'] = $entry_id;
 $which = 'preview';
}
unset($revquery);
}

and append:

if (is_numeric($IN->GBL("draft_id")))
{
$which = 'preview';
}

6.2. Compatibility Top

3rd party extensions which do not support previewing, quick saving or versioning entries may be incompatible with the draft functionality of NSM Publish Plus. If you are using an incompatible extension contact the extension author and inform them of the issue.

6.3. Download Top

NSM Publish Plus can only be downloaded from your member account after it has been purchased.

6.4. Installation Top

To install NSM Publish Plus follow the instructions below:

  1. Purchase and download the latest version of NSM Publish Plus
  2. Extract the .zip to your desktop or similar folder where you can find it easily
  3. Copy /system/extensions/ext.nsm_publish_plus_ext.php file to your ExpressionEngine /system/extensions/ directory
  4. Copy /system/languages/english/lang.nsm_publish_plus_ext.php file to your ExpressionEngine /system/languages/english/ directory
  5. Copy the contents of /themes/site_themes/cp_themes/default/ to your ExpressionEngine /themes/site_themes/cp_themes/default/ directory
  6. Copy the contents of /themes/site_themes/cp_global_images/ to your ExpressionEngine /themes/site_themes/cp_global_images/ directory
  7. Apply the required core hack to your ExpressionEngine files

6.5. Activation Top

  1. Open the Extensions Manager in your sites control panel
  2. Enable Extensions if not already enabled
  3. Enable NSM Publish Plus
  4. Configure and save the extension settings for each of your sites
  5. Update the default entry status for each weblog

6.6. Configuration Top

6.6.1. Extension settings Top

Extension access
Enable Publish Plus for this site? [required]
Yes|No

Enabling NSM Publish Plus will add a new "notes" and "workflow + drafts" tab in the publish / edit form.

Group settings

Each member group must assigned a default publishing role for every weblog. Publishing roles include:

  • No Access - Group members are restricted from posting in this weblog.
  • Publisher - Publishers can update an entries state and status, create notes and create entry drafts.
  • Editor - Editors can save drafts and create entries, they cannot update the status of an article. If an editor creates a new entry, the entry is saved with the default entry status assigned to the weblog and a new draft is created.
Entry notification templates

Email notifications can be sent when a member "actor" performs any of the following actions:

  • an entry is created (further filter using workflow state / entry status)
  • an entry is edited (further filter using workflow state / entry status)
  • a new draft is created (further filter using workflow state / entry status)
  • an entry is submitted for approval (further filter using workflow state / entry status)
  • an entry is deleted
  • a new note is created

When an action is performed notifications can be sent to any combination of the following members:

  • the entry editor
  • the entries draft authors
  • members of specific ExpressionEngine member groups
  • members assigned the "Publisher" role in specific weblogs
  • members assigned the "Editor" role in specific weblogs
  • comma-separated list of "other" email recipients

The following variables can be used notification subject and message:

  • {site_id}
  • {site_title}
  • {action}
  • {actor_name}
  • {status}
  • {old_status}
  • {state}
  • {old_state}
  • {entry_id}
  • {weblog_id}
  • {weblog_title}
  • {weblog_url}
  • {weblog_description}
  • {author_id}
  • {author_name}
  • {title}
  • {url_title}
  • {entry_date}
  • {edit_date}
  • {expiration_date}
  • {edit_entry_url}

Note: {weblog_id}, {weblog_title} and {weblog_description} will respect your ExpressionEngine settings. For example, if you have changed your ExpressionEngine settings to use "section" instead of weblog the variables will be: {section_id}, {section_title} and {section_description}

URL triggers

URL triggers tell NSM Publish Plus to load a specified draft or revision based on the segment after the trigger. The following url will load the draft, with an ID of 7 for the related entry: http://yoursite.com/blog/entry/18/draft/7/. Naming a url trigger the same as an existing template may cause unexpected behaviour and should be avoided.

Draft url trigger [required]
draft
Revision url trigger [required]
revision
Preview url trigger [required]
preview

For more information about url triggers see: Viewing drafts, revisions and entry previews in template context.

Check for updates
Would you like this extension to check for updates and display them on your CP homepage? [required]
yes|no

If you allow it NSM Publish Plus can call home and check for recent extension updates. This feature requires LG Addon Updater.

6.6.2. Member preferences Top

Roles can also be assigned on a per member basis allowing even more fine grain control over weblog posting privileges. Super admins can assign roles to members in their account preferences under the my account tab.

6.6.3. Default entry status Top

The following has been previously mentioned many times in the documentation:

If an editor creates a new entry (unsaved) and then saves it as a draft or submits it for approval the revision is assigned the default entry status of the weblog.

NSM Publish Plus protects your sites security by setting the revisions status to "closed" if the weblogs default entry status is "open".

Default entry status can be set per weblog under: Weblog Management › Edit Preferences.

Setting a default status of "Pending" or "Draft" is recommended so that new drafts can be previewed using LG Live Look.

6.7. Viewing drafts, revisions and entry previews in template context. Top

When enabled on an ExpressionEngine 1.6.7+ install, NSM Publish Plus allows publishers and editors to view their changes before saving saving a draft or revision.

This is achieved by replacing the entries content with the preview, draft or revision content before it is rendered in the template. This approach has the following pro and cons:

Pros:

  1. Changes can be previewed in template context before a new draft or revision has been saved.
  2. Drafts can be previewed in template context before a publisher approves the entry.
  3. Only the entry that matches the preview, draft, or revision id will be modified with applicable data.
  4. No need to change an entries status to pending to make changes before approval.
  5. All standard ExpressionEngine custom field types and many third party extensions can be previewed.
  6. Transparent LG Live Look integration

Cons:

  1. The entry must requested by the template before the existing data can be replaced by the preview, draft or revision data. This can make previewing unpublished entries difficult if the entry status is set to closed or pending, more on that later.
  2. There is some advanced ExpressionEngine functionality is not triggered until a new revision has been saved and therefore cannot be previewed. This is the case with Solspace's Tag module and LG Better Meta.

6.7.1. URL structure Top

Preview, draft and revision urls are created by appending the corresponding url trigger segment followed by a preview, draft or revision id. URL trigger segments are defined in the extension settings.

Preview id's are stored internally which means that LG Live Look is required to view them, however you can view drafts and revisions without LG Live Look. The revision and draft id's are displayed in the "Workflow + Drafts" tab and Revisions tab respectively.

Example URL's constructed using trigger segments assuming that the trigger segments are draft, preview and revision:

  1. http://yoursite.com/blog/post/my_url_title/draft/18/ - Loads draft 18 for entry with the url title equalling "my_url_title" in a single entry template
  2. http://yoursite.com/business/details/36/revision/5/ - Loads revision 5 for entry 36 in a single entry template
  3. http://yoursite.com/news/preview/55/ - Loads preview 55 for the entry associated with the preview in an index template.

In the last example NSM Publish Plus is smart enough to load the preview data for the correct entry. Using traditional ExpressionEngine template_group/template conventions the url would render the "preview" template in the "news" template group. NSM Publish Plus removes the last two segments from ExpressionEngine's template parsing so the parsed url is http://yoursite.com/news/. This allows you to preview entries in both the single entry context and index page context.

6.7.2. LG Live Look Top

The good news is that if you are using LG Live Look to preview your entries or drafts you do not need to worry about the url structure! LG Live Look will automatically create the urls for previews, drafts and revisions.

It's important to remember that NSM Publish Plus requires that the entry is visible in the template before the existing data can be replaced by the preview, draft or revision data.

More information about setting up Live Look templates can be found in the LG Live Look documentation.

Still having trouble? You should contact support smile .

6.8. Upgrade notes Top

There are no upgrade notes available for this version.

7. Release notes Top

7.1. Version 1.1.0 Top

  • LG Live Look integration!
  • Added preview saving for LG Live Look integration
  • Added revision id to revisions table
  • Fixed localisation bug

7.2. Version 1.0.4 Top

  • Changed the edit_entry action to create_revision
  • New drafts are automatically created when a new revision is created, but email notifications are not sent

7.3. Version 1.0.3 Top

  • Fixed notification bug regarding members who had not had roles specifically assigned

7.4. Version 1.0.2 Top

  • Added draft specific edit notes.

7.5. Version 1.0.1 Top

  • Changed all references of "dirty" to "changed".

7.6. Version 1.0.0 Top

  • Initial Release w/ documentation

8. Other topics Top

8.1. Support Top

Technical support is available primarily through my contact form (I'll reply with an email) and the ExpressionEngine forums. Leevi Graham and Newism do not provide direct phone support. No representations or guarantees are made regarding the response time in which support questions are answered.

8.2. Upgrades Top

Although we are actively developing NSM Publish Plus, Newism makes no guarantees that this extension will be upgraded within any specific timeframe.

8.3. Refunds Top

Not happy with NSM Publish Plus? Don't worry this extension is covered by a 30 day money back guarantee. If you having any problems with the extension please contact me to report the issues and your payment will be refunded.

9. License Top

NSM Publish Plus is a commercial product and therefore is subject to the commercial license agreement.

My mum: Newcastle massage - Remedial, sports, relaxation & Bowen therapist - BodyKneads.com.au