1

Topic: FileManager, Drupal 6.11, and WYSIWYG

Hello!

I've been looking all over for documentation to match the current Drupal wysiwyg methods. I don't know if you're familiar with it or not yet, but I believe you'll find many people are adopting it.
The wysiwyg api module can be found here: http://drupal.org/project/wysiwyg
All that does is enable support for loading different editors, and plugins for each.

The major change that might affect you is that it discourages adding or editing any file from the tinymce install. Everything gets loaded into it externally through calls. They look a bit like this:
<?php
/**
* Implementation of hook_wysiwyg_plugin().
*/
function tinymce_filemanager_wysiwyg_plugin($editor, $version) {
  switch ($editor) {
    case 'tinymce':
                        return array(
                                'tinymce_filemanager' => array(
                                        'path' => drupal_get_path('module', 'tinymce_filemanager') .'/filemanager/editor_plugin.js',
                                        'buttons' => array('tinymce_filemanager' => t('File Manager')),
                                        'url' => 'http://wiki.moxiecode.com/index.php/MCFileManager:Index',
                                ),
                        );
      break;
  }
}
?>

I'm trying to write one for your filemanager, but I'm running into issues.
I've configured the filemanager on the machine and the sample page works exactly as it needs to, so the gap is the loading.

I can confirm that the above code does load the javascript for your filemanager, but the scripts aren't adding the browse button to the link popup. But the wysiwyg api can over write any setting from the settings files.

Getting a drupal module people could just install and plug your code into would likely boost sales. Care to lend a hand and I'll help out?

2

Re: FileManager, Drupal 6.11, and WYSIWYG

I have no experience with the new wysiwyg API however it seems very promising. Try checking with firebug that the editor_plugin.js file is loaded correctly. Do you have a URL where I can see this live?

Best regards,
Spocke - Main developer of TinyMCE

3

Re: FileManager, Drupal 6.11, and WYSIWYG

I have mailed you login credentials for the soon to be live site. You'll have rights to login, and create a page, which brings up the editor.

Firebug verifies the js is being loaded from the module directory. There's some init code missing.

The only working external plugin I know is image_assist: http://drupal.org/project/img_assist
You'll find its code loaded on the same page I sent you.

Last edited by lance.gliser (2009-05-03 17:48:44)

4

Re: FileManager, Drupal 6.11, and WYSIWYG

Could be that the filemanager is some what renamed it's supposed to be called "filemanager" in both the load part and the tinyMCE.init part. It's now called tinymce_filemanager.

Best regards,
Spocke - Main developer of TinyMCE

5

Re: FileManager, Drupal 6.11, and WYSIWYG

Aye. That was it.
I had to rename not just the array returned by hook_wysiwyg_plugin, but the entire module to match. It could cause some compatibility issues with other modules, but it does work.

If you'd to take the module as your own, it's mind boggling simple. I'm sure you could keep maintenance on it. I'll drop it in your email.
You should put out the word. Your last explicitly stated drupal version is 5.2, you're gold on 6.11 now.

In addition to what I sent you, you should add these lines to the .module:

function filemanager_perm(){
    return array('access tinymce imagemanager', 'access tinymce filemanager');
}

That adds the permissions your drupal_auth.php checks against when the module is enabled.

Last edited by lance.gliser (2009-05-04 17:51:06)

6

Re: FileManager, Drupal 6.11, and WYSIWYG

lance.gliser , could you please share how you did this please?

I've already awasted 2 hours of Drupal **** this morning and if you;ve already done it, that would be very useful.

Thanks,

Phil

7

Re: FileManager, Drupal 6.11, and WYSIWYG

Phil I sent a mail with the files Lance did for the project. I haven't had the time to go though it but it should be pretty easy to install. We will look into having a special drupal package for the download later on.

Best regards,
Spocke - Main developer of TinyMCE

8

Re: FileManager, Drupal 6.11, and WYSIWYG

Hi Spocke,

After many hours of more Drupal pain,  I have got to this point:

Page loads with Text Area and TinyMCE attaches itself and works as expected, however in the console we see:

GET http://***/sites/all/modules/filemanager/filemanager/pages/fm/index.html
syntax error
* <!DOCTYPE html PUBLIC "-//W3C//DTD XHTM...3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">\n

which is the result of the GET above it.

I can stil use TinyMCE as expecred. and FileManager loads, I can select an image, and click insert but get the following error:

s is null
* var s = this.callSettings, elements = s.target_elements.split(','), i, elm;

Which I have tracked down to filemanager/filemanager/js/moxiecode/manager/basemanager.js:125

Needless to say but the path to the image is not returned to the Image Popup.

I hope you can help,

Thanks,

Phil

Last edited by PhilCarter (2009-05-12 18:13:58)

9

Re: FileManager, Drupal 6.11, and WYSIWYG

Nice. Sorry that it's a pain we will look into making some more automatic process in the future.

Try upgrading the FileManager it might not be compatible with older versions of TinyMCE.

Best regards,
Spocke - Main developer of TinyMCE

10

Re: FileManager, Drupal 6.11, and WYSIWYG

So does FileManager works with Drupal 6.11, and WYSIWYG? if so, are there instructions for the required changes?

11

Re: FileManager, Drupal 6.11, and WYSIWYG

"Kind of" we have no official version but a contributed version.

Best regards,
Spocke - Main developer of TinyMCE

12

Re: FileManager, Drupal 6.11, and WYSIWYG

csitter, it does work.

I struggled because my version of FileManager is over a 18months old, and my boss isn't about to sign off a new enterprise licence for it.

Phil

13

Re: FileManager, Drupal 6.11, and WYSIWYG

I emailed you the package we got from a third party developer.

Best regards,
Spocke - Main developer of TinyMCE

14

Re: FileManager, Drupal 6.11, and WYSIWYG

Resent it now.

Best regards,
Spocke - Main developer of TinyMCE

15

Re: FileManager, Drupal 6.11, and WYSIWYG

Well I know have an enterprise licence, and have got it working all but authenticating with Drupal.  For some reason the auth_drupal.php thinks that I'm an anonymous user, rather than reading my cookie and knowing I'm uid 1.

I've seen this behavoiour before, but can't for the life of me remember if I fixed it or, how I did it.


All sorted now!
Phil

Last edited by PhilCarter (2009-05-22 18:31:29)

16

Re: FileManager, Drupal 6.11, and WYSIWYG

I’m having issues getting filemanager to work with Drupal. I don’t see the filemanager  button and get not found error in drupal “Recent log entries”.  The Error I get is http:// sitename.com/drupal611/sites/all/modules/filemanager/filemanager/language/index.php?type=fm&format=tinymce_3_x&group=tinymce&prefix=filemanager_&6

What I did to install

1. Extracted  the 3rd party module “filemanager”  into /html/drupal611/sites/all/modules
2. Moved html/drupal611/sites/all/modules/filemanager/auth_drupal.php to /html/drupal611/
3. Extracted mcfilemanager_php_3_1_0_7_server.zip to /html/drupal611/sites/all/modules/wysiwyg/tinymce/jscripts/tiny_mce/plugins
4. Through Drupal I gave all roles access to “access tinymce filemanager”
5. Through Drupal I gave all roles access to “access tinymce imagemanager”
6. In the Wysiwyg config, all there are no buttons selected so they should all show up.

When I look at the file system, there is not a language folder under filemanager. Am I missing some files? Any ideas?

Thanks

Last edited by csitter (2009-05-27 20:43:39)

17

Re: FileManager, Drupal 6.11, and WYSIWYG

Could be missing files. There should be a language folder. Try using some other zip or ftp program.

Best regards,
Spocke - Main developer of TinyMCE

18

Re: FileManager, Drupal 6.11, and WYSIWYG

spocke -

am trying to integrate mcfilemanager into drupal6.12 .. and am confused about the specifics above.

mostly, where do i get the filemanager module mentioned above?

thanks,

ben

19

Re: FileManager, Drupal 6.11, and WYSIWYG

I send you an email with a package and instructions on how to install it on drupal.

Best regards,
Spocke - Main developer of TinyMCE

20

Re: FileManager, Drupal 6.11, and WYSIWYG

Hi spocke,

Can you send me that code also... Please.

21

Re: FileManager, Drupal 6.11, and WYSIWYG

Sent.

Best regards,
Spocke - Main developer of TinyMCE

22

Re: FileManager, Drupal 6.11, and WYSIWYG

I'm getting a strange error trying to make filemanager and imagemanager work on Drupal 6.12. I followed instructions at:

- filemanager: http://willshouse.com/2009/06/12/instal … upal-6-12/
- imagemanager: http://tinymce.moxiecode.com/punbb/view … 251#p54251

The imagemanager works perfectly on its own.
The filemanager does not load on its own. There simply is no filemanager button in TinyMCE.

When I try to load both in TinyMCE the browser goes into a infinite loop. Firebug says that it is alternating between loading:
- tinymce/jscripts/tiny_mce/plugins/imagemanager/language/index.php?type=im&format=tinymce&group=tinymce&prefix=imagemanager
- GET undefined

Any idea what is wrong?

23

Re: FileManager, Drupal 6.11, and WYSIWYG

We have a special drupal version of the products I could send it to you soon.

Best regards,
Spocke - Main developer of TinyMCE

24

Re: FileManager, Drupal 6.11, and WYSIWYG

spocke wrote:

We have a special drupal version of the products I could send it to you soon.

Is it possible to send me this version also?

Thanks

25

Re: FileManager, Drupal 6.11, and WYSIWYG

It's part of the package now.

Best regards,
Spocke - Main developer of TinyMCE