MCImageManager:Drupal

From Moxiecode Documentation Wiki

Jump to: navigation, search

Contents

Installation instructions for Drupal CMS

Drupal 5.2

1. Add the TinyMCE module to your system, follow the instructions that come with the module, you can download it on the Drupal Website.

2. Unpack the MCImageManager into the "\sites\all\modules\tinymce\includes\jscripts\tiny_mce\plugins" folder.

3. Add "ExternalAuthenticator" to the authenticator option.

4. Copy the imagemanager/plugins/ExternalAuthenticator/auth_drupal.php to the root directory of Drupal.

5. Change the ExternalAuthenticator.secret_key in config.php to something unique.

6. Change the secretKey in the auth_drupal.php file to match the one at the previous step.

7. Change the ExternalAuthenticator.external_auth_url in config.php so that it points to the auth_drupal.php file.

8. Comment out the drupal_add_js($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/plugins/imagemanager/jscripts/mcimagemanager.js'); line in tinymce.module if it should exist.

9. You are done, verify that your user has access to TinyMCE in your Drupal Configuration and try clicking the browse button for inserting an image.

Example of how it might look in the config.php, remember to change the existing options:

$mcImageManagerConfig['authenticator'] = "ExternalAuthenticator";
$mcImageManagerConfig['ExternalAuthenticator.secret_key'] = "thisismysecretkey";
$mcImageManagerConfig['ExternalAuthenticator.external_auth_url'] = "/drupal_5_2/auth_drupal.php";

If you have any problems, visit the forum for help.

Drupal 6.6 with TinyTinyMCE

TinyTinyMCE is a Drupal module that enables easy setup of TinyMCE within Drupal. These instructions should work with any version of Drupal 6, but have only been tested with 6.6.

  1. Follow the TinyTinyMCE setup instructions.
  2. Unpack the MCImageManager into the "\sites\all\modules\tinytinymce\tinymce\includes\jscripts\tiny_mce\plugins" folder. It should end up in a folder called "imagemanager".
  3. Add "ExternalAuthenticator" to the authenticator option.
  4. Copy the imagemanager/plugins/ExternalAuthenticator/auth_drupal.php to the root directory of Drupal.
  5. Change the ExternalAuthenticator.secret_key in config.php to something unique.
  6. Change the secretKey in the auth_drupal.php file to match the one at the previous step.
  7. Change the ExternalAuthenticator.external_auth_url in config.php so that it points to the auth_drupal.php file.
  8. Open "\sites\all\modules\tinytinymce\tinytinymce.module" and find the line that says "drupal_add_js($path.'/tinymce/jscripts/tiny_mce/tiny_mce.js', 'module', 'header', false, true, false);" (line 155 at the time of writing).
  9. Add a line below this, and add: "drupal_add_js($path.'/tinymce/jscripts/tiny_mce/plugins/imagemanager/js/mcimagemanager.js');"
  10. Go to the configuration options for TinyTinyMCE (/admin/settings/tinytinymce) and in the "TinyMCE init script for advanced mode" box, replace the file_browser_callback line (4th line at time of writing) with: "file_browser_callback : "mcImageManager.filebrowserCallBack","
  11. You do not need IMCE installed for this to work. MCImageManager completely replaces IMCE.

Please note that it appears that turning on 'Optimize JavaScript files' in the performance settings will prevent MCImageManager from working properly, possibly due to where its JavaScript has been included.

Older Drupal Versions

The module and other things have changed over various versions of Drupal, in late 4.7.x versions you can add MCImageManager as a plugin above and then configure it to use MCImageManager in the Drupal settings page for TinyMCE module. In other versions some small hack might be needed in the tinymce.module file in order to get the MCImageManager working. If you have problems with your install, ask around in the forum for help.

Install IMCE module

Remember to install and enable the IMCE module from Drupal. Under admin/settings/IMCE tick the checkbox to confirm IMCE support for tinymc

Personal tools