Hi,

I'm struggling with imce + tinymce in drupal 5.

Default installation, everything done like it was requested in manuals, and still doesn't work.

I can't see imce menu/button neither in tinymce nor when tinymce is disabled, and I'm trying to upload image on the server.

While I was searching for a solution, I've found many topics related to that issue and none of them have been solved so far.

I would really appreciate any help with that.

Kind Reagrds

Michael

CommentFileSizeAuthor
#1 Picture 1.png58 KBsteinmb

Comments

steinmb’s picture

StatusFileSize
new58 KB

What Drupal version of 5 are you using?
This my settings in admin/settings/imce. What is yours? I'm pointing the IMCE to the image folder since I have many images uploaded there with the image module. The setting "Enable inline image/file insertion into plain textareas" is relating to body field to a node. I you have a custom field created in CCK this setting will not work.

--
Stein Magne

chapi’s picture

I added these php lines into tinymce.module and works perfectly!

if (is_dir(drupal_get_path('module', 'imce')) && user_access('access imce')) {
$init['file_browser_callback'] = "imceImageBrowser";
}

********
Paste after these lines (near line 528):

$tinymce_mod_path = drupal_get_path('module', 'tinymce');
if (is_dir($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/plugins/imagemanager/') && user_access('access tinymce imagemanager')) {
// we probably need more security than this
$init['file_browser_callback'] = "mcImageManager.filebrowserCallBack";
}
if (is_dir($tinymce_mod_path . '/tinymce/jscripts/tiny_mce/plugins/filemanager/') && user_access('access tinymce filemanager')) {
// we probably need more security than this
$init['file_browser_callback'] = "mcImageManager.filebrowserCallBack";
}

Sorry for my bad english :-)

roosvdc’s picture

Thanks for your solution chapi! It 's finally working for me now!

darekw’s picture

Thanks! It now works for me, too!

richardjg’s picture

This seems to be a problem with the imce_set_tinymce.js file.

function imceInitiateTinyMCE(cycle) {

//... snip

  var cycle = (cycle || 0)+1;
  if (cycle < 5) setTimeout('imceInitiateTinyMCE('+ cycle +')', 2000);
}

$(document).ready(imceInitiateTinyMCE);

Because the imceInitiateTinyMCE function is invoked via jquery, it gets passed a jquery object as cycle and the function only runs once instead of 5 times.

Adding this check fixes the problem:

function imceInitiateTinyMCE(cycle) {

  if (typeof(cycle) == 'function') {
  	cycle = 0;
  }

ufku’s picture

the cycle thing is new in 5.x 1.1, and yes richard you're right about jquery calling the function with a parameter. I think this is added to jquery after 1.0 release because i couldn't reproduce the issue with core drupal-5. Only the ones who upgrade jquery can experince this issue.
In short, 5.x 1.2 is coming.

1kenthomas’s picture

version 1.2 seems to address. Can we close this?

ufku’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

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