Installing MCImageManager on Drupal 6.12

This is a quick note on how to install MCImageManager on Drupal 6.xx in combination with TinyMCE and WYSIWYG API editor.

My directory structure is as follows:

sites\all\modules\wysiwyg\tinymce\jscripts\tiny_mce\plugins\imagemanager

So, looking at that structure, you can see that the WYSIWYG API extension needs to be inside the modules folder. TinyMCE needs to be inside of that. And way down the line, the MCImageManager needs to be inside the plugins folder.

Next, you need to edit this file:

sites\all\modules\wysiwyg\editors\tinymce.inc

I added the code that is in bold:

'advimage' => array(
'path' => $editor['library path'] .'/plugins/advimage',
'extensions' => array('advimage' => t('Advanced image')),
'extended_valid_elements' => array('img[src|alt|title|align|width|height|hspace|vspace|border|style|class|onmouseover|onmouseout|id|name]'),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advimage',
'internal' => TRUE,
'load' => TRUE,
),
'imagemanager' => array(
'path' => $editor['library path'] .'/plugins/imagemanager',
'buttons' => array('insertimage' => t('Image Manager')),
'extended_valid_elements' => array('img[src|alt|title|align|width|height|hspace|vspace|border|style|class|onmouseover|onmouseout|id|name]'),
'url' => '',
'internal' => TRUE,
'load' => TRUE,
),

'advlink' => array(
'path' => $editor['library path'] .'/plugins/advlink',
'extensions' => array('advlink' => t('Advanced link')),
'extended_valid_elements' => array('a[name|href|target|title|class|onfocus|onblur|onclick|ondlbclick|onmousedown|onmouseup|onmouseover|onmouseout|onkeypress|onkeydown|onkeyup|id|style|rel]'),
'url' => 'http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/advlink',
'internal' => TRUE,
'load' => TRUE,
),

then go into the wysiwyg api control panel in drupal, choose your input format -> Buttons and plugins and you will have an option to enable image manager.

you will still need to edit the config.php inside the image manager folder to set the authentication. See this page for more details. Basically you will need to make these changes:


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

You will also need to copy the sites\all\modules \wysiwyg\tinymce\jscripts\tiny_mce \plugins\imagemanager\plugins\ExternalAuthenticator \auth_drupal.php file to the site’s doc root, or wherever the drupal installation is (above it is installed in docroot/drupal_6_2)

Related Posts:

  • No Related Posts
This entry was posted in Web Development and tagged , , . Bookmark the permalink.

3 Responses to Installing MCImageManager on Drupal 6.12

Leave a Reply

Your email address will not be published. Required fields are marked *