インストール

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

3. Copy paste plugin code:

/**
* QuickManager+
*
* @author Mikko Lammi, www.maagit.fi/quickmanager-plus
* @license GNU General Public License (GPL), http://www.gnu.org/copyleft/gpl.html
* @version 1.5.3 updated 12/10/2010
*/

// In manager
if (isset($_SESSION['mgrValidated'])) {

$show = TRUE;

if ($disabled != '') {
$arr = explode(",", $disabled );
if (in_array($modx->documentIdentifier, $arr)) {
$show = FALSE;
}
}

if ($show) {
// Replace [*#tv*] with QM+ edit TV button placeholders
if ($tvbuttons == 'true') {
$e = $modx->Event;
if ($e->name == 'OnParseDocument') {
$output = &$modx->documentOutput;
$output = preg_replace('~[*#(.*?)*]~', '<!-- '.$tvbclass.' $1 -->[*$1*]', $output);
$modx->documentOutput = $output;
}
}
// In manager
if (isset($_SESSION['mgrValidated'])) {
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, $editbuttons, $editbclass, $newbuttons, $newbclass, $tvbuttons, $tvbclass);
}
}
}

4. Check events:

NOTICE: Make sure QuickManager+ is the first plugin on OnParseDocument event: Elements > Manage Elements > Plugins > Edit Plugin Execution Order by Event > OnParseDocument

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;false &loadfrontendjq=Load jQuery in front-end;list;true,false;true &noconflictjq=jQuery noConflict mode in front-end;list;true,false;false &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; &1=undefined;; &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 &editbuttons=Inline edit buttons;list;true,false;false &editbclass=Edit button CSS class;text;qm-edit &newbuttons=Inline new resource buttons;list;true,false;false &newbclass=New resource button CSS class;text;qm-new &tvbuttons=Inline template variable buttons;list;true,false;false &tvbclass=Template variable button CSS class;text;qm-tv

6. Save plugin.

+ 7. Rich text editors (optional)

If you don't need inline template variable buttons you can skip this.

You don't need to change anything if your rich text editor version is at least:
- TinyMCE 3.3.6r2 for MODX
- CKEditor 3.3 for MODX alpha 3

Now the hardest part. To get rich text editors to work properly with QuickManager+ inline template variable buttons you will need to edit the rich text editor plugin code. If you won't do this change the rich text editors will use web theme buttons when editing richtext template variables.

TinyMCE 3.2.4.1 (MODX 1.0.2 and below):

In MODX manager go to: Elements > Manage Elements > Plugins > TinyMCE

Replace line:

if(isset($forfrontend)||$modx->isFrontend()){

With:

if(isset($forfrontend)||($modx->isFrontend()
&& (intval($_GET['quickmanagertv'] != 1) &&
!(isset($_SESSION['mgrValidated']))))){

TinyMCE 3.3.2 (MODX 1.0.3) and 3.3.5.1 (MODX 1.0.4):

In MODX manager go to: Elements > Manage Elements > Plugins > TinyMCE

Replace line:
if($modx->isBackend())

With:
if($modx->isBackend() || (intval($_GET['quickmanagertv']) == 1 && isset($_SESSION['mgrValidated'])))

PR

  • KAGOYA
  • ASP at AKIHABARA Japan
  • CMS AWARDS 2007 Winner
ページトップへ