# QuickManager+

@author Mikko Lammi, www.maagit.fi (based on QuickManager by Urique Dertlian, urique@unix.am)
@license GNU General Public License (GPL v3), www.gnu.org/copyleft/gpl.html
@version 1.3.4.1 updated 4/2/2010
@requirements MODx 1.0.0+

## Description

QuickManager+ is an alternative to QuickEdit to quick access and control content from front-end.
This is a heavily modified version of the original QuickManager plugin with extensive set of configuration options.
Known issues:

- Parent selection doesn't work at all with QuickManager+ due missing menu tree frame.
- Couple harmless JavaScript errors due missing menu tree which is normally present in MODx manager.

## Installation

If this is an update from earlier version delete first your old QuickManager+ plugin and all files at "assets/plugins/qm/".

### 1. Extract all files from package to site root.

NOTICE: If you are using Mac OS X don't extract files to the site root or you will overwrite your whole assets folder.

### 2. Create plugin with

- Name: QuickManager+
- Description: <strong>1.3.4.1</strong> Enables front-end content editing support

### 3. Copy paste plugin code:

$show = TRUE; if ($disabled != '') { $arr = explode(",", $disabled ); if (in_array($modx->documentIdentifier, $arr)) { $show = FALSE; } } if ($show) { include_once($modx->config['base_path'].'assets/plugins/qm/qm.inc.php'); $qm = new Qm($modx, $jqpath, $loadmanagerjq, $loadfrontendjq, $noconflictjq, $loadtb, $tbwidth, $tbheight, $hidefields, $hidetabs, $hidesections, $addbutton, $tpltype, $tplid, $custombutton, $managerbutton, $logout, $autohide); }

### 4. Check events:

- OnWebPagePrerender
- OnDocFormPrerender
- OnDocFormSave
- OnManagerLogout

### 5. Copy paste plugin default configuration:

&jqpath=Path to jQuery;text;assets/js/jquery-1.3.2.min.js &loadmanagerjq=Load jQuery in manager;list;true,false;true &loadfrontendjq=Load jQuery in front-end;list;true,false;true &noconflictjq=jQuery noConflict mode in front-end;list;true,false;true &loadtb=Load modal box in front-end;list;true,false;true &tbwidth=Modal box window width;text;80% &tbheight=Modal box window height;text;90% &hidefields=Hide document fields from front-end editors;text;parent &hidetabs=Hide document tabs from front-end editors;text; &hidesections=Hide document sections from front-end editors;text; &addbutton=Show add document here button;list;true,false;true &tpltype=New document template type;list;parent,id,selected;parent &tplid=New document template id;int;3 &custombutton=Custom buttons;textarea; &managerbutton=Show go to manager button;list;true,false;true &logout=Logout to;list;manager,front-end;manager &disabled=Plugin disabled on documents;text; &autohide=Autohide toolbar;list;true,false;true

### 6. Save plugin.

## Configuration

Go to plugin configuration tab.

Configuration option | Default value | Possible values | Instructions
Path to jQuery | assets/js/jquery-1.3.2.min.js | text | Path to your jQuery script.
Load jQuery in manager | true | true || false | Prevent loading jQuery twice if you are already using some other plugin which loads jQuery such as ManagerManager.
Load jQuery in front-end | true | true || false | Prevent loading jQuery twice if you are already using it in your site template.
jQuery noConflict mode in front-end | true | true || false | Define if jQuery should use noConflict mode. NoConflict mode is useful if you use other JavaScript libraries in front-end such as Mootools.
Load modal box in front-end | true | true || false | Prevent loading modal box (ColorBox) twice if you are already using it in your site template.
Modal box window width | 80% | number || percent | Define modal box (ColorBox) window width, for example: 800 or 75%.
Modal box window height | 90% | number || percent | Define modal box (ColorBox) window height, for example: 500 or 75%.
Hide document fields from front-end editors | parent | text | Separate fields with commas, for example: parent,template,menuindex Parent selection doesn't work at all with QuickManager+ due missing menu tree frame, so it should be hidden from front-end editors. Possible fields to hide: content, pagetitle, longtitle, menuindex, parent, description, alias, link_attributes, introtext, template, menutitle NOTICE! Hiding document fields may not work if fields are moved to other tabs with ManagerManager plugin.
Hide document tabs from front-end editors |  | text | Separate tabs with commas, for example: meta,settings Possible tabs to hide: general, settings, meta NOTICE! Hiding tabs may not work if tab order is changed with ManagerManager plugin.
Hide document sections from front-end editors |  | text | Separate sections with commas, for example: content,access Possible sections to hide: docsettings, content, tvs, access NOTICE! Hiding sections may not work if you are hiding sections with ManagerManager plugin
Show add document here button | true | true || false | Define if it's possible to add documents with QuickManager+.
New document template type | parent | parent || id || selected | How to determine a new document template: - parent: Use parent document template - id: Use template based on id number - selected: Define template based on parent document "inheritTpl" template variable used by "Inherit Selected Template" plugin http://modxcms.com/extras.html?view=package/view&package=214. You don't have to install the plugin, but you still have to have "inheritTpl" template variable on parent document with correct template id number.
New document template id | 3 | number | Define which template id to use with new documents. Used only if new document template type is id.
Custom buttons |  | text | Define custom buttons, for example add document to site root or add news document - Define new document button: 'button title','new','parent id','template id','visible for user role ids' - Define link button: 'button title','link','http://www.example.com','','visible for user role ids' - Define modal button: 'button title','modal','http://www.example.com','','visible for user role ids' Visible for user role ids: leave empty to accept all roles, role 1 = Administrator Separate different buttons with || Example: 'New root document','new','0','3',''||'Add news','new','10','4','4,5,6'||'Site statistics','link','http://www.google.com/analytics/','','1,4'||'Site statistics','modal','http://www.google.com/analytics/','','1,4'
Show go to manager button | true | true || false | Define is go to manager button visible.
Logout to | manager | manager || front-end | Define where to logout: to manager login screen or to active document on front-end.
Plugin disabled on documents |  | text | Document id numbers where the plugin is disabled. Separate fields with commas, for example: 34,22,7,19
Autohide toolbar | true | true || false | Define if toolbar hides automatically or is always visible (manually close the toolbar by clicking MODx logo or X button)

## How to use

Just login, open frontend and enjoy!

## Changelog

1.3.4.1

- Changed: CSS tweaks for IE, opacity now works fine with IE8 but unfortunately with IE7 ugly fonts remain (Thanks again uxello!)

1.3.4

- Added: Autohide toolbar configuration option
- Changed: Updated ColorBox to 1.3.6: http://colorpowered.com/colorbox/
- Changed: CSS tweaks, mainly for IE (opacity removed for IE, it breaks cleartype fonts resulting very ugly looking fonts)
- Changed: Plugin code moved from text file to this file (Installation / 3. Copy paste plugin code)
- Fixed: Document lock problem solved, now document lock is released when cancel button is pressed (Thanks uxello for the solution!)
- Fixed: Toolbar is now valid XHTML 1.0 Transitional code
- Removed: Unnecessary $disabled variable from edit code
- Removed: Images folder, all images are now under css > images

1.3.3

- Added: A fallback to English if the languages are missing in the Manager/user settings
- Added: Little tweaks with QuickManager action buttons: small hide/show animations and possibilty to close the menu by clicking the MODx logo
- Added: New option for custom buttons: modal = any link opened in a modal box (ColorBox)
- Changed: Custom buttons separator is now || instead of # (reserved for URL anchors)
- Changed: Rounded modal box is back, finally resolved bugs with ColorBox CSS in IE and friendly urls
- Changed: qm-colorbox.css renamed back to colorbox.css
- Fixed: Satinitized possible XSS vulnerabilities
- Removed: OnManagerPageInit plugin event removed
- Removed: IE6 support dropped, QuickManager+ is not tested with IE6 as MODx manager doesn't offially support IE6

1.3.2.1

- Fixed: Language file loading

1.3.2

- Added: New configuration option - jQuery noConflict mode in front-end
- Added: Check user manager access permissions to current document and show action buttons according to permissions
- Added: It's now possible to hide QM+ action buttons
- Added: Hide parent frame scrollbars and QM+ buttons when modal box is visible (ColorBox bindings)
- Added: Modal box can't be accidentally closed by clicking the overlay
- Changed: Stylish ColorBox CSS style didn't work properly with IE and crashed too often with Safari, had to replace it with minimalistic style for better cross-browser compatibility
- Changed: Updated ColorBox to version 1.3.1, includes for example IE ClearType fix (no more ugly fonts)
- Changed: colorbox.css renamed to qm-colorbox.css and moved to QM+ css folder
- Fixed: All normal MODx manager actions including template and RTE selection works now just fine (thank you very much Susan O. for your ideas!)
- Fixed: Multiple small CSS fixes for IE
- Fixed: Alias friendly logout code (thanks Mar!)
- Fixed: Language selection a bit more robust and offer a level of fallback
- Removed: Use with ManagerManager plugin -option deprecated

1.3.1

- Added: It's now possible to change template once. After that you can't change the template again but of course you can press cancel button and try again.
  Note: ToDo: Investigate if there is a way to detect parent frame in PHP to solve this problem

1.3

- Added: Support for MODx Evolution 1.0.0 version, better combatibility with MODx Carbon manager theme
- Added: Support for jQuery in noConflict mode by default
- Added: ColorBox modal box support
- Added: Modal box (ColorBox) window width
- Added: Modal box (ColorBox) window height
- Added: Possibility to add custom link buttons
- Removed: Thickbox window max width
- Removed: MODx versions below 1.0.0 are not supported due manager interface changes
- Removed: ThickBox modal box support

1.2

- Added: Plugin disabled option
- Added: Show go to manager button option
- Added: Custom add buttons option
- Added: Hide document sections from front-end editors option
- Added: Hide document tabs from front-end editors option
- Added: Dynamic ThickBox windows size adjustement, window size is calculated without refreshing the window
- Added: ThickBox window max width option
- Added: Logout to configuration option added, needs event OnManagerLogout
- Fixed: Documentation changed to html file
- Fixed: Clearer plugin folder structure
- Fixed: Hiding templates if only one template
- Fixed: Load jQuery in front-end was not working properly
- Fixed: mcc.class.php => hideTab & hideSection
- Removed: ThickBox windows width and height options removed.

1.1.1

- Fixed: Logout function changed. Previous version had a problem with multiple users resulting document locked issues. Now plugin logs user nicely out to the manager login page.