I'm trying to use IMCE 6.x-1.x with TinyMCE 6.x-1.x and pressing "Insert/edit image" shows dialog that doesn't have the button that starts IMCE. I think I've done everything needed for configuring both modules. Any directions what to check? I'm using PostgreSQL 8.3 and this may be an issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Eugene.Korneev’s picture

i have same issue... (d6.1, IMCE 6.x-1.x, TinyMCE 6.x-1.x (tinymce 2.3.1), mysql, standart Garland theme with $closure etc... all profiles and permissions ok)
but not browse button ?!
maybe need add integration ?!

ufku’s picture

Category: bug » support
  1. add this function to your current theme's template.php file.(create it if you don't have it. make sure it has <?php at the beginning.)
    function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
      static $access, $integrated;
    
      if (!isset($access)) {
        $access = function_exists('imce_access') && imce_access();
      }
    
      $init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);
    
      if ($init && $access) {
        $init['file_browser_callback'] = 'imceImageBrowser';
        if (!isset($integrated)) {
          $integrated = TRUE;
          drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
        }
      }
    
      return $init;
    }
    
  2. Go to admin/settings/performance and Clear cached data (at the bottom).
  3. Make sure your users have access to IMCE (admin/settings/imce)
  4. Clear your browser's cache and start testing.
  5. In case of a failure, try alternative themes or browsers and report back with details.
ogi’s picture

After adding this function, the button is shown and works!

Eugene.Korneev’s picture

works fine (for me...)

ufku’s picture

here is a better implementation which fixes repeating code inclusion when there is multiple instances of tinyMCE.
Besides, it uses window focus/blur instead of open/close, which prevents consecutive page loads for multiple image insertion.

ausvalue’s picture

Is IMCE going to be integrated with TinyMCE properly?

Please, please, pretty please,please implement properly.

I like to set up my users (Club admins, association admins, small biz) with a large number of available themes that they can try out for themselves. Sometimes they may even download more themes and try them out.

These user administrators etc need to be able to just download a theme and try it out. They don't have enough experience to go modifying source code for each one.

Is there any date for when this is likely to be done?

Also, until it is integrated into TinyMCE again, can you please add a note into the IMCE README.txt. For those of us that were use to IMCE being automatically compatible with TinyMCE, the lack of any note in this README.txt that it was currently downgraded took up a lot of my time before I found these posts.

Thanks

TheRawGod’s picture

ufku,
yours implemetation does get the proper button shown and working on tinymce add image / add link dialogs, but does not get "Send to TinyMCE" link shown on opened imce's browse page...
At least for me :)

ufku’s picture

@TheRawGod; can you give more details? Browser? errors?
@AusValue; you can add it to phptemplate.engine, though it would be a core-hack.

crutch’s picture

Correct. Experiencing the same. The code above initiates, and makes usable, IMCE from TinyMCE but it does not allow IMCE to write back URL for image to TinyMCE. Would this be a TinyMCE issue or IMCE issue?

Thanks! I enjoy both modules.

RwDwR’s picture

I cannot make this code work for IE 7. I do get the IMCE button and the window opens. But the imceOnLoad doesn't seem to be executed as I added alerts in the code that show in firefox but not in IE7. This is a problem because I'm not getting the "Send to TinyMCE" button....

ufku’s picture

At last, someone providing at least the browser info, thank you RwDwR.
Issue was IE handling the onload function as an object. Fixed and commited to 6-1 branch.

drgonzo121’s picture

Category: support » bug

http://www.jotiethooft.be/node/24

here is a pic of the pop-up box of tinymce, any ideas what can be wrong?

thanks

the IMCE looks to work.

thx

CyberThijs’s picture

It looks like you forgot to install the ducht language pack.. You can download this languagepack on http://services.moxiecode.com/i18n/ .

crutch’s picture

Status: Active » Fixed

I've updated and it is now working with "Send to TinyMCE" link in file browser and it properly sends link to TinyMCE. Much thanks!!

Best regards,
Crutch

pellegrino’s picture

it worked for me too. uber ghetto.

HHHoagie’s picture

I have this stupid question. I'm using the pushbutton theme and I can't find the template.php file. I see that file in the garland theme. Am I overlooking it or what?
Thanks for any advice.
Bob

ag4apple’s picture

Ummm . . . maybe I'm doing something wrong. I have tried both of these functions (separately, of course). And neither one works. I'm using the Four seasons theme 6.x-1.18, Drupal 6.2, IMCE 6.x-1.x-dev, and TinyMCE 6.x-1.1-dev. When I add either of the above functions to the Four seasons template.php file, I refresh the view on my site, and my browser displays . . . nothing. Not a blessed thing. Totally white. Viewing the source of the page also reveals nothing . . . no code at all.

Remove the function and saving the file returns everything back to normal. But, I can't get IMCE to work of course without this function . . .

I'm still kind of a newbie at Drupal, so does anyone have any thoughts as to what I'm doing wrong?

ausvalue’s picture

It appears that not all themes have a template.php file. I got one of my Vers 6 Drupal themes to work with TinyMCE and IMCE by pasting the recommended code into an empty text file, naming it template.php and adding it to the theme.

Regards
Ken

HHHoagie’s picture

Oh! good Idea, Ken. I'll do that... Thanks
Bob

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

rachmaninovbs’s picture

quote
Ummm . . . maybe I'm doing something wrong. I have tried both of these functions (separately, of course). And neither one works. I'm using the Four seasons theme 6.x-1.18, Drupal 6.2, IMCE 6.x-1.x-dev, and TinyMCE 6.x-1.1-dev. When I add either of the above functions to the Four seasons template.php file, I refresh the view on my site, and my browser displays . . . nothing. Not a blessed thing. Totally white. Viewing the source of the page also reveals nothing . . . no code at all.

Remove the function and saving the file returns everything back to normal. But, I can't get IMCE to work of course without this function . . .

I'm still kind of a newbie at Drupal, so does anyone have any thoughts as to what I'm doing wrong?
quote

I've the same problem.... who have the solution?

pindaman’s picture

TinyMCE works with IMCE,
But when i press "save" button i return to a blank page.

What am I Doing wrong?

robdinardo’s picture

This worked for me too! I used then shorter integration method (which uses the open/close) Thanks.

visionmark’s picture

I just installed this and it's not working. Im in Drupal 6 with IMCE 6.x-1.0. Everything works fine, but theres no signs of any IMCE in my TinyMCE WYSIWYG. No errors. No nothing. It just doesnt appear. I put the code in my template.php file and I've cleared the cache from performance, theme, in the browser, and directly in the database. Nothing.

Any ideas?

schnabis’s picture

Assigned: Unassigned » schnabis

I have same problem. TinyMCE works with IMCE,
But when i press "save" button i return to a blank page. Ther is no image.

What am I Doing wrong?

marcelosite’s picture

I'm using TinyMCE 6.x-1.1-dev
http://drupal.org/node/240936

I put the code in my template.php file and I've cleared the cache from performance, theme, in the browser, and directly in the database. Nothing.

I just installed drupal, TinyMCE, IMCE right now
Get the latest files frow web.

Please help.

ogi’s picture

Assigned: schnabis » Unassigned

Please be careful not to change fields accidentally.

pgfowler1’s picture

I am trying to use IMCE 6.x.1.x-dev with Tiny MCE and have followed the steps to get it working outlined above but with only partial success. On 2 PC's it works fine - but on one PC - no link graphic appears. All the PC are using Firefox versions 2.14 and/or 3.0. On a Mac again no icon using safari and Firefox.

I am working on a collaborative project, so consistency is needed.

Am very keen to get it working properly as it is a great module

Any ideas?

pgfowler1’s picture

Status: Closed (fixed) » Active

Note this issue status is closed.

Suggest it is made active again.

thijsvdanker’s picture

I'm not seeing the button either
TinyMCE 6.x-1.1-dev and IMCE 6.1.1 on firefox 3, IE 6 and IE 7
--Edit--
My bad, I'm using Garland as the admin theme, and tried to enable it in my_own_theme's template.php...
Editting it in de Garland template.php got it to work!

AdrianB’s picture

Using the first example from comment #2 I solved this problem for me using the latest version of TinyMCE module (6.x-1.1-dev), TinyMCE engine (3.0.9) and IMCE (6.x-1.0) with Drupal 6.2. I simply pasted the code in a new template.php file (since there were none) and placed it in my active theme directory.

Is this by design or will this be fixed?

I know the README.txt has a link to comment #2 (although I discovered it afterwords), but from a user perspective one would wish it worked right from start.

thecorkboard’s picture

Do I need to edit the PHP function above with anything? This is the code I used:

<?php



/**
* IE detector
*/
function greenNblack_ie_detect()
{
    if (isset($_SERVER['HTTP_USER_AGENT']) && 
    (strpos($_SERVER['HTTP_USER_AGENT'], 'MSIE') !== false))
        return true;
    else
        return false;
}

/**
* Add pngFix script to fix .png transparensy bug in IE6
*/

if (greenNblack_ie_detect()){
drupal_add_js(drupal_get_path('theme', 'greenNblack') . '/js/jquery.pngFix.js', 'theme');
}

/**
 * Sets the body-tag class attribute.
 *
 * Adds 'sidebar-left', 'sidebar-right' or 'sidebars' classes as needed.
 */
function greenNblack_container($L, $R) {

$class ='container';
    if ($L) {
      $class .= ' container-left';
    }
    if ($R) {
      $class .= ' container-right';
    }
 
 
    return ' class="'. $class .'"';
  
}

function greenNblack_footer($message){
$message.='<div id="author_link">Design by <a href="http://cmstuning.com/">CMStuning</a></div>';
return $message;
}



/**
* Altering search form
*/

function phptemplate_search_theme_form($form) {
$form['#prefix']='<div id="search" class="container-inline">';
$form['#suffix']='</div>';
unset ($form['submit']);
 
$form['search_theme_form']['#title'] = t('Search');
 
return drupal_render($form);
}
function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
  static $access, $integrated;

  if (!isset($access)) {
    $access = function_exists('imce_access') && imce_access();
  }

  $init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

  if ($init && $access) {
    $init['file_browser_callback'] = 'imceImageBrowser';
    if (!isset($integrated)) {
      $integrated = TRUE;
      drupal_add_js("
function imceImageBrowser(field_name, url, type, win) {
  tinyOpenerWin = win, tinyTargetField = field_name;
  if (typeof tinyImceWin == 'undefined' || tinyImceWin.closed) {
    tinyImceWin = window.open(Drupal.settings.basePath +'?q=imce', '', 'width=760,height=560,resizable=1');
    tinyImceWin['imceOnLoad'] = function () {
      tinyImceWin.imce.highlight(url.substr(url.lastIndexOf('/')+1));
      tinyImceWin.imce.setSendTo(Drupal.t('Send to @app', {'@app': 'TinyMCE'}), function(file) {
        window.focus();
        tinyOpenerWin.focus();
        $('#width', tinyOpenerWin.document).val(file.width);
        $('#height', tinyOpenerWin.document).val(file.height);
        $('#'+ tinyTargetField, tinyOpenerWin.document).val(file.url).focus();
      });
    }
  }
  else {
    tinyImceWin.imce.highlight(url.substr(url.lastIndexOf('/')+1));
  }
  tinyImceWin.focus();
}
", 'inline');
    }
  }

  return $init;
}
?>

and I get this error:

Parse error: syntax error, unexpected T_STATIC in /home/.scooper/kjatomic8/drupal.thecorkboard.org/themes/greenNblack/template.php on line 66

swirt’s picture

Ran into same issues with tinymce and imce. Could not resolve them. Switched to using FCKeditor and Imce and the are both playing together nicely.

g76’s picture

subscribing...

klaasvanschelven’s picture

I'm not sure if someone is actually looking at this. It seems to be a very long thread with people reporting similar problems and no responses. Anyway, I'll try to put in a more detailed error report.

When I do the above (comment #2) everything works fine for Firefox. However, on I.E., the IMCE doesn't open up from clicking the button in the TinyMCE add image dialog box. I.E. also reports a (presumably Javascript) error:

Line: 26
Char: 5
Error: 'Drupal' is undefined
Code: 0
URL: (censored)

This is on I.E. 7.0.5730.11

--
Klaas van Schelven,
www.xaba.nl

klaasvanschelven’s picture

This is what line 25 - 27 of my page (not incl. js.) code look like:

<script type="text/javascript">jQuery.extend(Drupal.settings, { "basePath": "/" });</script>
<script type="text/javascript">
function imceImageBrowser(field_name, url, type, win) {
silvanasono’s picture

Category: support » bug

You are right.
In some themes there is a missing code line.
To be precise, in themes/yourselectedtheme/page.tpl.php, there should be:

<?php print $closure ?>

just before

</body>
</html>

It includes the initialization of the javascript variable imceBrowserURL and the file imce_set_tinymce.js where there is the function for the popup (imceImageBrowser).

Cheers

verres’s picture

I'm using Amadou theme.
I've tried to insert the function into the template.php file but it's not working.

The site loads up with the new template, but when I go to edit a node, I get the following error:

Fatal error: Cannot redeclare phptemplate_tinymce_theme() (previously declared in /home/content/i/c/e/icecricket/html/themes/amadou/template.php:131) in /home/content/i/c/e/icecricket/html/themes/amadou/template.php on line 165

I checked the page.tpl.php file and it has the correct print $closure line.

Does this make sense to anyone - i'm still too new to be able to diagnose the error.

thanks,
C

ufku’s picture

forget about the $closure, it is required for 5.x
Your error message is clear. You can not define the same function twice. delete the second one on line 165.

webchick’s picture

I'm thinking that with the new D6 theme system and its theme registry goodness there has to be a way to do this in IMCE's code without requiring a change to template.php. Or at least I sure hope so, cos I want to feature it in the O'Reilly book and I'd rather not get people digging into template.php in chapter 2. ;)

Will be digging into this today...

ufku’s picture

@webchick: In IMCE 6.x I removed the default support for other modules leaving the integration issue to module developers. I think tinymMCE-IMCE integration should be implemented at tinyMCE side. There are many examples(FCKEditor, BUEditor, WYMeditor..) doing so.

To show how simple it is, here is a two-steps integration
1- define the configuration option file_browser_callback: 'imceBrowser'
2- define the callback function imceBrowser(fid, url, type, win) {win.open('/?q=imce&app=TinyMCE|url@'+ fid)}

verres’s picture

thanks UFKU,

I don't know why I couldn't get that to work before - but I repasted it into the template.php, and as you said...it worked.

Thanks for all the work you've done on IMCE and for responding to my post.

-c

yuriy.babenko’s picture

ufku,

Awesome, thanks so much for the solution.
I've been struggling with this problem for the last 2 hours, and finally found your post! Worked like a charm.

rhlowe’s picture

Category: bug » support

The above method (#2) worked perfect for me in TimeMCE's default locations, e.g.,

node/*
user/*
comment/*

However when I added TinyMCE to 'admin/build/block/*' so tat the editor shows on creation/editing of blocks, it doesn't work there.

D6.2, IMCE 6.x-1.0, TinyMCE 6.x-1.1-dev

rhlowe’s picture

Priority: Normal » Minor

I figured out wat was going on (kinda). I was using an administration theme different from the site's theme, not sure why that made a difference, but it did.

mjourney2’s picture

Title: Can't make it work with TinyMCE » Cannot override phptemplate_tinymce_theme

I included the function phptemplate_tinymce_theme in my template file, but it's not being called. I'm using only one theme. Any idea why that might be the case?

I'm running drupal 6.3. Thanks for any help.

quicksketch’s picture

Title: Cannot override phptemplate_tinymce_theme » Integrate tinyMCE better with IMCE
FileSize
1.41 KB

This patch integrates the code suggested by ufku in #2. Considering the large amount of difficulty users may have getting the two to work together, I'd really like it if this patch could be applied to the project.

quicksketch’s picture

Category: support » feature
Priority: Minor » Normal
Status: Active » Needs review
quicksketch’s picture

Project: IMCE » TinyMCE

Oops, I suppose this should be in the tinyMCE queue. Considering this issue has the most attention, I hope we don't mind if I move it over there for the maintainer to have a look.

keesje’s picture

Patch in #47 confirmed as OK, no issues.

Thanks!

bloke_zero’s picture

thijsvdanker - thanks I was making the same stoopid mistake of changing the wrong template.php file - it's amazing how you can miss the obvious when you're a little fried...

zmove’s picture

Status: Needs review » Reviewed & tested by the community

Patch #47, confirmed too. Thank you quicksketch

+1 For adding it on the next release of tinyMCE.

mikkelwf’s picture

WHAT TO DO TO GET THIS TO WORK..!?!?!?

1. have installed both IMCE and tinymce
2. have patched tinymce.module
3. have granted access to tinymce (IMCE access are granted automatically or what, because there are no options in permissions)
4. have cleared cache

so by now, something should happen (or have i missed something)
NO link or option for IMCE content in tinymce settings.
NO link or option for IMCE content when tinymce renders in a textarea field.

PLEASE HELP..!!

quicksketch’s picture

FileSize
32.4 KB

mikkelwf, you're probably just overlooking the button for the browser. If tinyMCE and IMCE are both installed, after applying this patch IMCE automatically becomes the file browser. Click the "image" button in tinyMCE, then next to the URL field there's an icon that will pop open the file browser. See attached screenshot.

mikkelwf’s picture

#54 Thanks, helped a lot.

Was a little stressed about getting this to worked. I had just spent some time trying to get image assist to work properly with tinymce, but no luck. So i simply missed the tiny button there. :)

misiu9’s picture

work great!!!!!!

thanks a lot :o))

Anonymous’s picture

Using Drupal 6.4 and latest versions of WYSIWYG and IMCE modules. But can't find the tinymce.module file anywhere.
Where should i patch the patch under #47?
Enno

frankcarey’s picture

I'm trying to use IMCE 6.x , and TinyMCE 2.x in Wysywig 6.x.

It looks like Wysywig implements its own module for TinyMCE, (you don't use the Tiny MCE drupal module).

Any ideas on getting it to work there?

sun says:
In above mentioned thread, quicksketch already developed a method that replaces TinyMCE's built-in image file browser with the one from IMCE. However, initialization of this happened inside of tinymce.module, resp. wysiwyg_editor.module, which is discouraged. Wysiwyg Editor not only provides hook_wysiwyg_plugin() now, but also initializes the editor almost completely through jQuery.

I never worked with IMCE (because I'm the maintainer of Image Assist), but it seems like IMCE only needs to add a custom editor configuration setting to the init array (which might need an API enhancement of hook_wysiwyg_plugin(); not sure) and needs to load an external JavaScript [function] (which might need to be turned into a real editor plugin script). I don't know whether that phptemplate function is still necessary then.

http://drupal.org/node/287321#comment-942961

Cheers

cpttripzz’s picture

ff3, os: ubuntu 8.10
images show up in preview but do not show in content

Murz’s picture

Patch in #47 works good on Drupal 6.4 & lastest tinymce+imce & tinymce 3.x with no issues! Thanks!

alternativecatII’s picture

#2
ufku - June 30, 2008 - 16:53

1. add this function to your current theme's template.php file.(create it if you don't have it. make sure it has <?php at the beginning.)

      <?php
      function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
        static $access, $integrated;

        if (!isset($access)) {
          $access = function_exists('imce_access') && imce_access();
        }

        $init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

        if ($init && $access) {
          $init['file_browser_callback'] = 'imceImageBrowser';
          if (!isset($integrated)) {
            $integrated = TRUE;
            drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
          }
        }

        return $init;
      }
      ?>

2. Go to admin/settings/performance and Clear cached data (at the bottom).
3. Make sure your users have access to IMCE (admin/settings/imce)
4. Clear your browser's cache and start testing.
5. In case of a failure, try alternative themes or browsers and report back with details.

Does it matter where you insert this code at?

Is there a recommended section to paste it in?

I added this code to my template.php file in Garland, and then my site would no longer load until I deleted the code.

alternativecatII’s picture

#47
quicksketch - July 14, 2008 - 02:29

I hate to be a block head, but what am I supposed to do with the patch listed in this post?

james_andrews’s picture

Category: feature » bug
Priority: Normal » Critical

Just implemented a bog standard drupal setup using the garland theme which already has the template.php file and I get a "Parse error: syntax error, unexpected T_STATIC in...."

This happens even if I try to add a template.php file to a theme that doesn't have it and switching to that theme.

Any ideas what i should do?

james_andrews’s picture

ok I got it to work so here's a quick rundown of what I did... (mac osx solution)

- copied my tinymce module folder to my desktop
- added the tinymce_imce_integration.patch file to the folder
- opened terminal app
- dropped the folder into the terminal window and typed the following command:
patch < tinymce_imce_integration.patch

Once that's done I uploaded tinymce back to my server and voila! it works!

action2001’s picture

work great!!!!!!

thanks a lot :o))

sun’s picture

Just wanted to point all of you to #287025: IMCE_Wysiwyg API bridge module . Turning this patch into a proper implementation for Wysiwyg API should be possible in no time.

quicksketch’s picture

Ole Martin: I deleted your comment because it was not relevant to the discussion (and very long). Please open new issue for questions about your template.php file.

rhlowe’s picture

@61: You only need the opening and closing php tags if you didn't already have a template.php file. I also should not matter where you put the code.

blue carrot’s picture

I added TinyMCE to my website, and I wanted to integrate it with IMCE so that users can upload photos more easily from their computers, for forum posts etc.

I used the addition into my themes template.php that is found in this thread.

After I did this, tinyMCE shows up with the browse button as expected. However, it also makes my site malfunction in that whenever someone logs on or makes a change or adds a post, they are taken to a blank page rather than to the page they're supposed to go to. If you hit refresh it goes to to the main page or to the page you modified.

I tried using the patch found in post # 47 of this thread, but I could not manage to get the patch to work, it was a bit over my head to be honest. Tried a couple of patch programs but I'm not good with that dos type input format.

Does anyone have any suggestions on this. Either how to fix the problem, or if you have a pre-patched tinymce.module file that I can get, that would also be awesome.

Thanks in advance for any help.

nahkiainen’s picture

I have the same problem as #70 "blue carrot" has. IMCE works, but after submitting the changes, a blank page will load. I have modified the template.php and used the patch from #47 in the way #64 suggested.

Any more ideas?

GreenSkunk’s picture

+2 Subscribe

chum’s picture

Hopefully this will help someone else who has the same problem. I spent hours trying to solve this problem. Everytime I would paste in the code, the whole screen would go blank, i.e. the theme was not loading. I am using Amadou and it already had the Closure statement in the page.tpl.php, so I needed to look at pasting in the code from above into the template.php file. The template.php file already had the first bit, so I had to insert and drop some of the code and than take the closure statement out of the page.tpl.php file. So the code ended up looking like:

function phptemplate_tinymce_theme($init, $textarea_name, $theme_name, $is_running) {
 static $access, $integrated;

  if (!isset($access)) {
    $access = function_exists('imce_access') && imce_access();
  }

  $init = theme_tinymce_theme($init, $textarea_name, $theme_name, $is_running);

  if ($init && $access) {
    $init['file_browser_callback'] = 'imceImageBrowser';
    if (!isset($integrated)) {
      $integrated = TRUE;
      drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');
    }
  }

  switch ($textarea_name) {
sun’s picture

Status: Reviewed & tested by the community » Closed (duplicate)
3rdvalve’s picture

Following the instructions with a Drupal 6 installation worked fine but the button link to open IMCE resulted in a redirect to the homepage in the IMCE pop-up window.

I fixed it by changing this line:

drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'?q=imce&app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');

to this:

drupal_add_js("function imceImageBrowser(fid, url, type, win) {win.open(Drupal.settings.basePath +'imce?app=TinyMCE|url@'+ fid, '', 'width=760,height=560,resizable=1');}", 'inline');

in the template.php file.

For some reason my setup does not like basePath +'?q=imce but prefers basePath +'imce

tsavino’s picture

FileSize
28.49 KB

I did a patch on the tinymce-6.x-1.1-dev to get imce to work and the disable rich-text to work attached is the file

CurroDeNapoles’s picture

Hi, I am trying to get imce to work with tinymce, and I have followed all the instructions and suggestions specified here, unfortunately with no luck.

I've modified the template.php, the closure statement on the page.tpl.php file is fine, and I've tried everything being suggested but obviously I must miss something....

Don't know what to do, can somebody help? Please :)

ausvalue’s picture

Your quickest and easiest solution is to give up on the tinymce module and either use one of the following two modules.

TinytinyMCE

or

Wysiwyg API

TinytinyMCE is stable and specifically designed to make it easy to integrate IMCE with TinyMCE. The Wysiwyg API is a newer bigger grander project that will ultimately take over from the current TinyMCE and probably in the future will be the master Wysiwyg editor project for Drupal.

For User Instructions for any of the TinyMCE editors do check out the following:

Draft TinyMCE User Guide

Still looking for further contributions to this Guide.

AusValue
www.ausvalue.com

CurroDeNapoles’s picture

Thanks for the quick reply!

Unfortunately I did not explain myself properly: I am using the wysiwyg api and I am trying to use the tinymce that comes with it.

found something that might look interesting here:
http://drupal.org/node/287025

but gosh, I don't know how to patch that in using windows!!! :(

I apologize for the confusion... I am new here!

Thanks again

sun’s picture

Quick clarification: Yes, Wysiwyg API is newer, i.e. a modern and future-proof approach of integrating editors into Drupal. And, by doing it that way, it is also much cleaner, faster, and smaller. So the characteristics "big" and "grand" only apply to the project's awesome scope, not to the module. ;)

CurroDeNapoles’s picture

Eheheh! Now it makes sense! Thanks Sun, I'll probably try to use TinyMCE on its own for the time being.. I'll try again the Wysiwyg API when I'll have a better understanding of drupal & maybe in the meantime there will also be an update. :)

cdmorris’s picture

I've tried the template.php suggestion and it still doesn't work. I'm on Drupal 6.9 and I've used Firefox 3.0.5 as well as IE7. I'm using IMCE 6.x-1.1, TinyMCE 3.2 and Wysiwyg API 6.x-0.5. For me the button doesn't even show up when I try to insert an image or insert a link. This worked for me fine with Drupal 5.7 and TinyMCE+IMCE combo. Anyone have suggestions for what I could try, or point out what I'm doing wrong/overlooking?

Thanks

ryivhnn’s picture

Some patches here which apparently have worked for some, try your luck :)

Anonymous’s picture

Are you talking about patching TinyMCE as a stand-alone module, or patching TinyMCE as integrated within the WYSIWYG module?

When I try patching the TinyMCE editor that's within the WYSIWYG module I get this:

" can't find file to patch at input line 8 "

Anonymous’s picture

That was meant as a response to #64.
Thank you #64, it worked.
I decided you were talking about TinyMCE as a stand-alone module.
And the error message was because I hadn't copied the patch to the module folder.

[Setup: Drupal6.9, TinyMCE 6.x-1.1-dev, IMCE 6.x-1.1

(I am also trying WYSWYG/TinyMCE, but haven't got IMCE working that way yet.)

david.archibald’s picture

I'm similar to #85.

Have used the various fixes to get TinyMCE 6.x-1.1-dev + IMCE working with Drupal 6.9 without too much of a problem.

However, have had no joy getting WYSWYG/TinyMCE working with IMCE.

jimmb’s picture

Same here - I cannot get WYSIWYG/TinyMCE working with IMCE either. Can anyone help?!

gleikis’s picture

I've solved the issue with this hack: http://drupal.org/node/287025 Comment #97

jimmb’s picture

Thank you! That worked for me.

Jim

cloxzime’s picture

Category: bug » support
Status: Closed (duplicate) » Postponed (maintainer needs more info)

I am so confused with so many patches and comments.

My problem is, the IMCE icon in TinyMCE > Insert Image is not appeared. Then, how to get the icon appeared in the Insert Image popup window?

Currently using Drupal 6.10 + Wysiwyg API 6.x-1.0 + TinyMCE 3.2.2 + IMCE 6.x-1.2 (NOT WORKS)

Previously using Drupal 6.10 + TinyMCE 6.x-1.1-dev + IMCE 6.x-1.2 (WORKS)

Please, help me with this. Hopefully to hear from you. Thank you.

fist’s picture

to me it does not work ...

Help!

tazir1’s picture

FileSize
31.55 KB

Drupal 6.10 / wysiwyg API 6.x-1.1 / IMCE Wysiwyg API bridge 6.x-1.0 / IMCE 6.x-1.2 / TinyMCE (under Wysiwyg) 3.2.2.1
Cannot upload files.
After installation was possible to upload, now sometime just run uploading bar but nothing happen in the end, or cannot upload at all (see img).

I just find out about 2nd problem (cannot upload at all) the option is there, just the text is white so cannot seen. How to change?

MissyM’s picture

I moved to the TinyMCE module and it works fine!

stevekerouac’s picture

http://drupal.org/node/287025 Comment #97 , as mentioned in post #88 worked for me too.

Although not with FCK, only TinyMCE.

Running Drupal 6.10
imce-6.x-1.1
tinymce_3_2_2_1
wysiwyg-6.x-1.1

Browser Mac Firefox3

hychanhan’s picture

This function is working very well with Drupal6.10 version.
Any way thanks for your help.

ChanHan Hy,

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)
tazir1’s picture

Title: Integrate tinyMCE better with IMCE » Integrate tinyMCE better with IMCE - Simple solution

I trying the code, but was not work for me.
I found simple solution for my case (without the code):
Under: admin/settings/wysiwyg/profile -> Edit -> Buttons and plugins
I have to allow IMCE and specified the buttons to use on the editor box.
So, try this option before applying the code.

olegtr65’s picture

Title: Integrate tinyMCE better with IMCE - Simple solution » IMCE doesn't work with IIS and IsapiRewrite

IMCE works fine on my local system with Apache, but when I installed it on hosting with IIS and IsapiRewrite I found that it doesn't work there.
Browser window openes, files in directory show but when I try to perform any operation - navigate, upload ao delete I get an error:

An HTTP error 404 occurred. imce?jsop=navigate&dir=.

I tried to do a lot with it, but it was no result.
I think the reason is in Isapi Rewrite.
Could anybody help me?

AdrianB’s picture

Title: IMCE doesn't work with IIS and IsapiRewrite » Integrate tinyMCE better with IMCE - Simple solution

I don't think you should change the subject like that.

slsoares’s picture

Dears,

Firstly, I am sure for my English. It is not very good.

I am blind and the tinymce editor is the best editor for us, blind persons, for the accessibility.

But, the tinymce and imce does not work in my site drupal.

I use: drupal 6.2, tinymce and imce the last version.

I saw in a site of my friend, also blind, that hi presses the icon "insert / edit image" and open a pop up that there are general .... .... and upload. Hi clicks in upload and display the fields with brouser for up in the image for server.

Please, can anybody help me?

Thanks,

Anonymous’s picture

Do you mean there's a button for IMCE in 'buttons and plugins'? Where?
I already enabled Image and Link.
thanks

pbirnie’s picture

I finally gave up on tinymce and this WYSIWYG api module -I used FCKEditor and IMCE - I have blogged the process here http://www.zulutime.org/blog/avoid-drupal-wysiwyg-api-module-getting-fck...

hychanhan’s picture

After i cleared cache data, it works.

Thanks you very much.

ChanHan Hy,

millenniumtree’s picture

#7, #10, and whomever encounters this problem in the future.
If your "Send to TinyMCE" button isn't showing up, then here is a possible cause. It took me nearly a whole day to figure it out.

The "Secure Pages" module interferes with IMCE (If the imce window is running as https, then it cannot communicate with the window that TinyMCE is in)

Go here:
/admin/build/securepages

and add this line to the Ignore Pages: box.
*/imce*

Save, and be happy.

sarahjean’s picture

I had the same problem with the "Send to TinyMCE" button not showing up in any browsers, and tried to and */imce* to my ignore pages and it didn't help, so I also took node/*/edit out of "make secure" and now I have the button back. Thanks for the tip.

I'm using:
IMCE 6.x-1.2
IMCE Wysiwyg bridge 6.x-1.0
Wysiwyg 6.x-2.0
TinyMCE Version 3.2.4.1
Secure Pages 6.x-1.8

Drupal 6.13
Firefox 3.0.11
Opera 9.64
IE8
Windows XP Professional SP3

UNarmed’s picture

Title: Integrate tinyMCE better with IMCE - Simple solution » One final step

Hey i have most of this running except for the most important bit haha how to i get it to index the users computer so they can upload there own images?? I keep getting this darn "File browsing is disabled in directory" .

AdrianB’s picture

Title: One final step » Integrate tinyMCE better with IMCE - Simple solution

UNarmed: Please don't change the title like that.

Butenbremer’s picture

#97/tazir:
You are the greatest!
That works very fine to me!!
And it's so simple!!!!

Thank you!
Thorsten

ThaiGringo’s picture

Priority: Critical » Normal
Status: Closed (won't fix) » Closed (works as designed)

I just wanted to reply that to get the button to show up, I had to configure the profile in the WYSIWYG module.

(admin/settings/wysiwyg/profile/1/edit)

Then I had to enable the buttons I wanted to show up in the toolbar, along with the ICME plug-in. Now it works.

That was in addition to the instructions above about the template.php mod, which I applied to the ZEN profile.

poupinella’s picture

Component: Code » Miscellaneous

Hi, I use TinyMCE on my "handmade" website, and I'm trying to integrate IMCE, but the instructions (readme.txt) seem to be made for Drupal - is it possible to use IMCE on a non-Drupal project ? If so, I don't even know where I should copy the IMCE directory; in the tinymce/plugins or ? And what are the next steps ?
Thanks

Anonymous’s picture

I was having trouble with this until I realised I hadn't enabled the IMCE button under the wysiwyg module. Now it works perfectly!

Jane

ShaneOnABike’s picture

Hey guys,

I had the same issues but after installing IMCE_Bridge everything was working ok. The IMCE button appeared within the Wysiwhy configuration as it did before :)

Cheers

Shane

zaglick’s picture

Thank you #97 tazir1, that was the exact instruction that I was looking for.

Dave Kopecek’s picture

RE #90, Missing "Insert Image" button on IMCE popup.

If secure pages module is installed you may need to add:

imce*

to secure pages "Ignore Pages" at: admin/build/securepages

This is documented in FREQUENTLY FACED ISSUES in the imce README file.

gjones’s picture

Thanks!!!

jillpadams’s picture

Just my two cents -- This is working for me now, though I'm not sure if the fix was the comment in #2 or just choosing the proper file directory.

Running:
Drupal 6.20
Wysiwyg 6.x-2.3
IMCE 6.x-2.1
IMCE Wysiwyg bridge 6.x-1.1
and TinyMCE as my visual editor in Wysiwyg profiles, but don't actually have the TinyMCE editor installed.

Added the #2 function to template.php (using an adaptation of Framework theme), and realized that the directory I'd set in IMCE settings for User-1 wasn't writeable. After directing that to the proper dir, and adding the function, all's well. No time to parse out which worked, but hope that's helpful to somebody.

peteranthonywynn’s picture

After weeks of installing and reinstalling #97 was the answer on multiple sites... YOU ROCK, I cannot believe I missed the button .... SIMPLEST solutions are usually the ones you need. With all the updates and fixes we have found most of the Drupal modules play nice, look for the simplest things first before you start playing with PHP.

mattbk’s picture

All that was needed for me was to install IMCE Bridge: http://drupal.org/project/imce_wysiwyg and then to turn on the IMCE plugin (which was not shown before) under WYSIWYG.