My company uses Drupal with both TinyMCE and the MCImageManager (also from Moxiecode - http://www.moxiecode.com/products_imagemanager.php ). I noticed that when we switched from the basic TinyMCE to the TinyTinyMCE module, the "access tinymce imagemanager" permission was missing from the access control page.

To solve this, we added a new line below line 92 of tinytinymce.module as follows:

/**
* Implementation of hook_perm
*/
function tinytinymce_perm () {
    return array(
        'administer tinytinymce',
        'use tinytinymce advanced',
        'use tinytinymce simple',
        'use tinytinymce imagemanager'    // new line
    );
}

I realise that this is not completely failsafe, because the name of this permission might change in future releases of MCImageManager, but it does make this permission available and I couldn't think of a better way of achieving this.

Along with MCImageManager there exists an MCFileManager from Moxiecode, so this will probably need a similar permission adding, but since we don't use this, I couldn't tell you what it might be.

Comments

chriscohen’s picture

Oops, we changed the name of the permission internally, but since this is not advised, the code below uses the original, unmodified perm name.

/**
* Implementation of hook_perm
*/
function tinytinymce_perm () {
    return array(
        'administer tinytinymce',
        'use tinytinymce advanced',
        'use tinytinymce simple',
        'access tinymce imagemanager'    // new line
    );
}
Steve Lockwood’s picture

The TinyTinyMCE module now supports the Drupal IMCE module, which offers an Open Source way of uploading and navigating image files.

For users that want to use MCImageManager, I have documented your patch in the INSTALL.txt file which will go into a future release.

Here is what I have written:

INTEGRATION WITH MCImageManager
===============================
(Support for the Drupal IMCE module is built in.  Alternatively, if you wish to use Moxiecode's MCImageManager, you will need to apply the following patch - thanks to chris.cohen.)

Modify tinytinymce.module as follows:
   /**
   * Implementation of hook_perm
   */
   function tinytinymce_perm () {
       return array(
           'administer tinytinymce',
           'use tinytinymce advanced',
           'use tinytinymce simple',
           'access tinymce imagemanager'    // new line
       );
   }

If you think there is anything else I should be adding (any other modules needed?) please let me know.

Steve

Steve Lockwood’s picture

Status: Needs review » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.