Skip to content
This repository has been archived by the owner on Jan 6, 2020. It is now read-only.

newism/lg.live_look.ee_addon

Repository files navigation

LG Live Look - View entries in template context from the ExpressionEngine control panel publish tab and edit entry table.

LG Live Look is a Multi-Site Manager compatible ExpressionEngine extension that allows you to view the latest published revision of an entry in the ExpressionEngine control panel.

When enabled, a Live Look tab is added to the CP publish form which displays the entry in a rendered template context. Additionally Live Look links are added to the CP edit entries table.

But that's not all; When installed along side [NSM Publish Plus][nsm_publish_plus], LG Live Look adds the ability to preview unpublished entries, drafts and revisions in template context.

The Problem

ExpressionEngine implemented 'Live Look' entry previews in version 1.6.1. While a welcome addition, it didn’t quite match my development workflow.

IMHO, problems with the native Live Look are:

  • Custom urls are not allowed which forces you to use /template_group/template/entry_id/. Being forced to use the entry_id doesn't suit my site which uses custom url formats including the {url_title} parameter.
  • It doesn't support urls generated by the Pages & Structure modules.
  • There is no way to view the entry in the Publish Form.
  • The third issue, which isn't related to the native Live Look (but is a general entry 'preview' issue), is there is no way to preview updates to an existing entry before it is "live" even using conventional status work arounds. NSM Publish Plus provides the functionality to save drafts without affecting the current live version. LG Live look integrates with NSM Publish plus to provide draft preview in template context.

Features

LG Live Look has many features to enhance your publishing workflow. They include:

  • Publish Form Live Look tab - View published entry revisions in template context from the CP publish form. Previewing unpublished changes to entries, viewing drafts and revisions requires NSM Publish Plus.
  • Edit Page Live Look links - Quick navigation to the live entry from the edit entries table.
  • Hide default preview box - Remove the standard ExpressionEngine entry preview.

It's also:

  • NSM Publish Plus compatible - Real template powered entry previews, drafts and revisions!
  • Multi-Site Manager compatible - Independent extension settings for each site
  • LG Addon Updater compatible - Stay up-to-date with the latest versions of LG Live Look

Screenshots

Publish form entry preview
Publish form entry preview

Extension settings
Extension settings

Requirements

LG Live Look has been tested on ExpressionEngine 1.6.5+, but may work on earlier versions.

Other requirements:

  • PHP5
  • jQuery
  • Previewing unpublished drafts, entry drafts and old revisions require NSM Publish Plus.
  • A modern web browser - Firefox, Safari, Chrome or IE8+

LG Live Look also requires the Morphine Theme for styling.

User Guide

Download

Download the latest stable release from my website or live on the GitHub edge.

Installation

The LG Live Look extension contains an extension and language folder. To install LG Live Look follow the instructions below:

  • [Download][8] the latest stable version of LG Live Look
  1. Extract the .zip file to your desktop
  2. Copy /extensions/ext.lg_live_look_ext.php to your /extensions/ directory
  3. Copy /language/english/lang.lg_live_look_ext.php to your /languages/english/ directory
  4. Download and install the Morphine theme addon
  5. Activate LG Live Look

Activation

  1. Open the Extension Manager
  2. Enable Extensions if not already enabled
  3. Enable LG Live Look
  4. Configure LG Live Look

Configuration

LG Live Look has the following extension settings which need to be entered separately for each Multi-Site Manager site.

Note: All configuration options are site specific. When a new site is created be sure to save the extension settings for the new site to avoid errors.

Extension access

Enable LG Live Look for this site?

Enabling LG Live Look will add a new Live Look tab to the Publish Form and a Live Look link to the Edit Page.

Member group preferences

Which member groups will see the LG Live Look tab and links?

Allowed member groups will see a Live Look tab and link in the Publish Form and Edit Page.

Weblog customisation

Each channel has it's own unique settings to add a Live Look tab in the publish / edit form, add a Live Look link in the edit table and display the default Publish Form preview.

Display tab in the Publish Form?

Displays the Live Look tab in the Publish Form for this weblog.

Display link in the Edit Page?

Displays the Live Look link in the Edit Page entries table for this weblog.

Disable standard EE preview in the Publish Form

Hides the standard un-styled ExpressionEngine preview from the Publish Form.

Preview URL
/blog/post/{entry_id}/{url_title}/

The Live Look tab and link will use the entry preview url.

The preview url setting will have the following variables replaced with entry specific attributes allowing you to create highly customisable urls:

  • {url_title}
  • {entry_id}
  • {channel_id}
  • {title}
  • {author_id}
  • {status}
  • {entry_date_day}
  • {entry_date_month}
  • {entry_date_year}
  • {dst_enabled}
  • {comment_total}
  • {trackback_total}
  • {username}
  • {email}
  • {screen_name}

Check for updates

LG Live Look can call home, check for recent updates and display them on your CP homepage? This feature requires LG Addon Updater to be installed and activated.

Would you like this extension to check for updates?

Enable / disable update notifications.

Version notes

Upgrading?

  • Before upgrading back up your database and site first, you can never be too careful.
  • Never upgrade a live site, you're asking for trouble regardless of the addon.
  • After an upgrade if you are experiencing errors re-save the extension settings for each site in your ExpressionEngine install.

There are no specific upgrade notes for this version.

Changelog

Version 1.2.0

  • Restyled extension using Morphine theme addon
  • Better integration with [NSM Publish Plus 1.2.0][nsm_publish_plus]
  • Rewrote documentation (again)

Version 1.1.0

  • Added [NSM Publish Plus][nsm_publish_plus] integration!!!
  • Added custom field id support for urls eg: {field_id_9}
  • Rewrote documentation

Version 1.0.2

  • Added Quicksave integration including support for new entries (bug)

Version 1.0.1

  • Added Pages Module integration - Entries will use their {page_url} (where applicable) rather than the generated URL based on the extension settings (fr)
  • Fixed LANG file (bug)
  • Separated Javascript from extension file
  • Added jQuery dependency and removed "Scripts" extension setting

Version 1.0.0

  • Initial Release w/ docs

Support

Technical support is available primarily through 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.

Although we are actively developing this addon, Leevi Graham and Newism makes no guarantees that it will be upgraded within any specific timeframe.

License

Ownership of this software always remains property of the author.

You may:

  • Modify the software for your own projects
  • Use the software on personal and commercial projects

You may not:

  • Resell or redistribute the software in any form or manner without permission of the author
  • Remove the license / copyright / author credits

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.