image upload module for tinymce (IMCE)

ufku - August 10, 2006 - 17:51

i want to share a module that i use for uploading images with tinymce. it's a very lightweight module working with 4.7.x.
Features:
- doesnt require any other image related modules since image handling is minimal. no image nodes. no thumbnail creation.
- allows only .jpg, .png, and .gif formats.
- upload, list, view and delete images.
- uploads images to personal directories. (system_file_directory/u.userid)
- configurable upload limits: Filesize per upload(default:100kb), image dimensions(default:500x500), total quota per user(default:500kb).
- upload and administer permissions for user roles. administer permission removes upload limits.
- detects tinymce action and automatically throws necessary .js to activate image browser. it uses tinymce's "file_browser_callback" setting to be activated in tinymce's image popup window. By this method, nothing needs to be done in order to use the module except enabling the module in modules page.

Installation:
- download imce.module
- extract to modules directory.(files should be in modules/imce)
- go to admin/modules page and activate imce.
- to change default settings go to admin/settings/imce

after activating the module you should see the browse icon in tinymce's image popup window. Click it and upload images. you can view images in the list by clicking rows. you can add path and dimension information to tinymce's popup by clicking the add link or the image in preview area. here's a screenshot of working module from my local site.

Excellent!

eagereyes - August 14, 2006 - 02:36

Great stuff! Simple and useful, I love it. Just one thing: Would it be hard to use the username for the directory, instead of u<userid>?

Edit: Actually, I just hacked it to just use a static directory, which works better for my purposes anyway. It would be nice to be able to configure the path, e.g., like pathauto, where you could enter a static path, or one with placeholders like [user], [uid], etc.

imce better than img_assist

blalond - August 14, 2006 - 17:39

I think that imce works a lot easier than img_assist for the main reason that imce is easier to get up and running. Thanks ufku. Any plans to get this into the contributed modules section on this website?

I too figured out the hack that eagereyes applied. This allows you to have all users (in my case, it's just the "editors" that I'm allowing to add images anyway) work out of a static directory (in this case it's files/images).

<?php
//old line (lines 46 and 66 in imce.module):   
$dir = file_directory_path().'/u'.$user->uid;
?>

<?php
//new line (lines 46 and 66 in imce.module):
 
$dir = file_directory_path().'/images';
?>

Thanks again!

New location for project... http://drupal.org/project/imce

burnett - January 30, 2007 - 23:42

New location for project... http://drupal.org/project/imce

Just one word : exactly what

ALPH - August 14, 2006 - 20:37

Just one word :
exactly what I expect from an image uploader.
Thanks

hi

asdasd08 - March 1, 2008 - 15:47

www.resimupload ücretsiz resim upload servisi.free image upload service.

more praise

joemoraca - August 15, 2006 - 00:02

It was just what I was looking for ... my latest client is totally not interested in any "geeky" stuff just wants to type blog posts and add pictures.

Thanks

Joe Moraca
http://www.moraca.org

thanks for the

ufku - August 15, 2006 - 00:19

thanks for the comments.

eagereyes; i think username is not very reliable for personal folder names since users may be allowed to change their names. some flexibility can be added for the "u" part. but ID is indispensible for differentiating the folders.
and the static folder issue; at first sight, making it optional doesnt seem to be a big deal. I didnt think about this thoroughly, but using a shared folder will probably require a delete permission to prevent misusage.
ok, i'll look into these issues.

blalond; about drupal module conribution. first i should have enough free time and then learn how to contribute and then i can do it :)

Good points

eagereyes - August 15, 2006 - 01:44

I didn't really think this through. I guess if you choose one (global) folder, nobody (except user 1) would be allowed to delete or overwrite anything, otherwise you could do all kinds of code insertion by just replacing an image with some php code or something similar (not sure if that would really work, but I recently read something about cross-site scripting, and now I'm getting paranoid). My site only has one editor for the time being, so I was really only thinking of myself. This might not be practical for a true multi-user environment.

But don't get me wrong, I've been using your module since I found it, and can't imagine living without it anymore. ;)

File type restrictions

Adam Messinger - January 29, 2007 - 03:43

I'm no security expert, but I think the XSS issue is addressed by the restrictions on which file types can be uploaded.

Leave the "Non-image file support" field blank, and only image files are supported by the module. If you add other extensions, just make sure .php isn't one of them.

Can anybody back up my assumptions on this?

Is the site temporarily

jbjaaz - August 16, 2006 - 15:44

Is the site temporarily down, or has this "module" been undownloadable for awhile? I really really hope not.

~John

Works for me

eagereyes - August 16, 2006 - 15:59

I just tried it, and had no problems downloading the file. Send me a message and I'll email it to you if you can't get through to the server.

I just tried it again... it

jbjaaz - August 16, 2006 - 16:00

I just tried it again... it was temporarily down. I should of been more patient :-)

~John

Awesome

jbjaaz - August 16, 2006 - 16:24

This module is exactly what I was looking for. I've been struggling most of this morning trying to get image && image_assist to work. They worked, but the UI was just horrible. Plus creating an image as a node just doesn't seem right.

What would be really cool is if you made a clone of this module for file uploading and selection. I quickly looked through imce.module to see if there was a way to make it hook into the Insert/Edit Link dialogue, but I'm a drupal newbie and haven't yet dived into the world of creating modules.

Absolute awesome job!

~John

should contribute

ufku - August 16, 2006 - 18:21

i have some hosting problems nowadays. the file may not be avaliable time to time. sorry for that.
anyway i decided to contribute to drupal modules. as soon as i finish reading the contributers guide i'll apply for a cvs account. than the module will probably be avaliable at project pages.

jbjaaz; if you want to enable link browser. just delete the line
if (type!='image') return;//work for only images
in imce_set.js file. imce can work as a file browser too. but not supporting files other than images. Extending imce as a file uploader... ummm... lets say simple is better for now :)

I agree it would make imce

jbjaaz - August 16, 2006 - 20:12

I agree it would make imce rather complicated. Thats why I suggested making a second module which was strictly for file uploading.

~John

I am also not able to

jeffleeismyhero - August 18, 2006 - 22:16

I am also not able to download this file. Please email it to me at jeff@fireball3d.com.

I can also re-host it if you want.

100%

JonathanDStopchick - August 16, 2006 - 18:34

100% pure awesome in a nice little package. This module is true to the way modules should be. Simple, efficient, compatible!

.o.oOo.o.

Me I'm dishonest, and a dishonest man you can always trust to be dishonest. Honestly it's the honest ones you have to watch out for, you never can predict if they're going to do something incredibly stupid. -Jack Sparrow

Just like everyone has been saying

bonobo - August 16, 2006 - 18:48

This module ROCKS!

It integrates cleanly with TinyMCE, and it makes sense to use. Very nice work.

Cheers,

Bill

-------
http://www.funnymonkey.com
Tools for Teachers

Good module

elv - August 17, 2006 - 01:04

It works, it's quite simple.
I'm not sure about the storage in different user folders though. It could be an option, in case you need several people to be editors of the website, and have a common image repository.

finally

ufku - August 19, 2006 - 02:59

fnally in projects!
http://drupal.org/project/imce

differences from this unofficial release:

- added configurable prefix for personal directory names. default is "u".
- added support for a common(shared) directory( to be used instead of personal directories) for all users. it can be activated in the configuration page.
- user permissions changed: view files, upload files, delete files, limitless upload.
- added non-image file uploading/browsing support that can be activated by defining allowed extensions in configuration page.

if you upgrade you'll only need to assign new permissions to user roles. no other configuration chages required.

Excellent module. This will

jeffleeismyhero - August 19, 2006 - 03:21

Excellent module. This will allow my users to maintain their own sites easier than before.

Imce --- Invalid argument supplied for foreach() in imce.module

publishing - September 14, 2006 - 21:01

Hello All,

Ufku, thank u for the imce module. Got everything installed including tinymce which can be a bit tricky. However, when going to image icon, in tinymce, then clicking "browse" button, I get the below error messg, instead of being redirected to say, my local directory where an image may be selected for upload:

======
Warning: Invalid argument supplied for foreach() in /home/bfnnetwo/public_html/drupal/modules/imce/imce.module on line 73
======

Has anyone experienced this????? -- thank u in advance for your help.

check directory

ufku - September 14, 2006 - 21:30

most probably the directory of your choice (personal or shared) is not accessible(not exists or not readable). try changing the directory name(if you use a shared folder) or prefix(if you use personal folders) in settings page. check(by ftp) if drupal creates the directory you want. (note: the directory is created after you run imce.)

My directory settings @ files/images

publishing - September 15, 2006 - 07:39

Ukfu,

Thank u for your time and reply. As a news site whereby there are multiple contributors and syndicated content, I thought it more appropriate for us to utilize a shared directory as opposed to each contributor having a personal directory.

As such, I utilized the "files/images" directory format (files permission 777-files/images permission 777) in my imce settings which is similar to the format utilized by Drupal/ftp ---- I just thought that since Drupal (image.module) already recognized this format, that I would continue to utilize even though at the same time, I discontinued the utilization of the image.module. Imce seemed to provide users with some leeway to establish personal/shared directory, so it was my thinking that the files/images setting would be ok.

"the directory is created after u run imce" ----- I do not really understand this process, could u expound a bit? If the directory is created after imce is run, does this mean that the field in imce settings, can be left blank???

Please advise and again thank u for your time and reply,

? -- Maybe I made a simple module complicated

publishing - September 15, 2006 - 10:21

Ukfu,

I was jus thinking that maybe I have acted to make a simple module complicated. Maybe instead of utilizing a imce directory setting of files/images, I should of maybe just used files or images, singularly.

Would this make a diffence in terms of the invalid argument ???

Thanking u in advance for your time and reply,

imce first gets the shared

ufku - September 15, 2006 - 16:50

imce first gets the shared folder. if it is not declared it uses personal folders. these folders are relative to your files directory(to use "files/images", just enter "images").
"the directory is created after u run imce" ; when you click the browse button, imce creates the directory if it isnt there.

in your case, a folder with permission 777 wouldnt be a problem. what about the chmod of image files in that folder? are they accessible by php?

Ahhh! I see, I follow U!

publishing - September 15, 2006 - 23:29

Ufku,

In my case, I had entered files/images in imce @ "use a shared folder" and images @ personal folder.

have updated my settings to: personal folders = blank; use shared folders= images

I WILL ATTEMPTED TO UPLOAD AN IMAGE WITH NEW SETTINGS AND CHECK RESULT. I am sooooooooo anxious to use this most wonderful module.

chmod? is this the same as changing permissions? permissions for image files, within, file folder is also set @ 777. Should I be looking in another area for chmod settings? -- please advise.

Really appreciate your assistance -- thank U!!!.

chmod=permissions

ufku - September 16, 2006 - 00:24

chmod=permissions. permissions can be set for every single file. previously created files may not be accessible even if your folder is 777. drupal and imce set chmod 664 for uploaded files to make them accessible for everyone.

Thank U!

publishing - September 16, 2006 - 07:14

ufku ---Mucho, Mucho Gracious (thank u very, very much!!!! :)

Imce image upload worked like a charm!

publishing - September 18, 2006 - 17:09

Hello All,

Just wanted to report back. Image upload with imce module worked like a charm once I set "shared directory to "images", instead of, files/images. Since the shared directory is already set relative to the files directory, only the input of "images" was necessary.

Ufku really did a nice job with this module(thank u Ufku!!!!). It was as if he really designed it with the user in mind --- simple and straight forward----. Perhaps IMCE module, in conjunction with Tinymce as an editor, could/should be made part of Drupal core as the core package really should be accompanied by an image tool to really complete it as a basic CMS. The Drupal core install beginning with 4.7,IMHO, is really smooth and becoming better all the time.

Only one word of note: While the imce module is simple, it works in conjunction with and requires the tinymce module, which itself requires installation of the tinymce engine(not included with contributed Drupal, tinymce module). The installation of the tinymce module, in conjunction with the tinymce engine is detailed oriented and the install instructions should be followed closely and carefully ---- it is not hard!!!! you just should follow instructions closely and carefully as depositing the right files/file folders into the right directories is important, and makes the difference(I installed twice before I got it right--I had placed the engine too deep into the module/tinymce directory).

Hint: Generally, when I extract a zip, I extract to my desktop instead of directly to modules for instance. In this process, I will generally create a new folder on my desk top to extract the zip to. Well, this really creates an extra folder for which the extracted folder is actually extracted to. Just make sure when you upload (ftp is best) the folder to your modules that u upload the actual and whole tinymce folder and/or tinymce engine folder's respectively, into the correct directories.

Nice Work (Keep it UP!)

Ranajee - August 21, 2006 - 14:13

It's really a nice work. Very Helpful module

For the Basic Users It is really helpful to give them interface instead of physical work.

This is beautiful!

syedasad - August 22, 2006 - 04:53

When we are developing a site for a community of users, you want to keep it simple so that they can upload/edit their post with a minimum of complexity or fuss.

I think this module accomplishes that.

Thank you for such a great module.

button missing

larss - August 22, 2006 - 09:28

Hi there,

I just installed IMCE but I don't get the "browse" button in the TINYMCE image pop-up window.

Any help appreciated.

Thanks!!

Did you remember...

JonathanDStopchick - August 22, 2006 - 12:37

Did you remember to turn access control for your chosen user on for the imce module?

.o.oOo.o.

Me I'm dishonest, and a dishonest man you can always trust to be dishonest. Honestly it's the honest ones you have to watch out for, you never can predict if they're going to do something incredibly stupid. -Jack Sparrow

where do we go from here?

syedasad - August 23, 2006 - 21:15

Just wanted to discuss the future direction of IMCE. My 2 cents

http://drupal.org/node/79932

I am also pasting it here, so that the whole discussion here is in context.

-------------------------------------------------------------------------------------------------
It will be really useful if users are given the facility to create/delete/organize their files using folders. Just imagine, over a period of time, each user may have hundreds of images, all in one folder. That would be difficult to navigate eventually. So I think, folder management will be great.
Updates
#1 submitted by ufku on August 22, 2006 - 15:15

These kind of features will lead imce to be a comlete file manager. Actually i think that imce shouldnt be a fat full-featured file browser. or should it?
#2 submitted by syedasad on August 23, 2006 - 00:28

I am just thinking from the perspective of an end user. It doesn't matter how one implements it, but as far as the user is concerned, he/she is just able to maintain his own files in a folder hierarchy, navigate using a file manager interface and then insert the image.

This simplifies things for him/her.

Secondly, I am thinking of a point in time, when each user has hundreds if not thousands of images. He/She will need a way to organize all those. This module will be a victim of its own success if it does not scale up and provide a method to organize huge amount of files.

File manager features allows it to scale to handle any number of files.
#3 submitted by syedasad on August 23, 2006 - 21:09 updated

I had been thinking about this a lot. Finally, what you said in your first comment made sense. It's better to create a completely new module which only does file management.

Does drupal have one? At least not that I am aware of and if yes, could it be seamlessly integrated with IMCE for browsing folders of images?

In fact, the TinyMCE project has 2 such plugins

1. MCFileManager (http://tinymce.moxiecode.com/paypal/item_filemanager.php)
2. MCImageManager (http://tinymce.moxiecode.com/paypal/item_imagemanager.php)

We seem to have a McDrupalImageManager now. :)

What we need now.....
1. We need a generic file manager module and
2. Integrated with IMCE

---------------------------------------------------------------------------

This is not possible now, is

brenda003 - September 13, 2006 - 05:44

This is not possible now, is it? That's unfortunate, as it seems to be a necessity right now. How difficult would this type of feature be?

thats what i need

sketch1 - October 24, 2007 - 19:53

have they come up with a user folder creation module yet so that users can organize there own files? if so please let me know what it is

I have the same problem.

larrynichols - August 28, 2006 - 21:16

I have the same problem. I've installed, activated and configured the module, and set the access control, but no browse button appears in the image popup in tinymce. Is anyone else having this problem? I've tried it on different browsers, and tried clearing the cache. Pretty sure I have the most recent version of imce, and am running tinymce for 4.7. Can't figure out what else to try.

any other image browser?

ufku - August 28, 2006 - 22:07

make sure you dont have any other image browser plugins like ibrowser. make sure you dont have plugin names as "imagemanager" or "filemanager". these are tinymces default browsers. and imce doesnt replace them if they are active in order to prevent conflicts.

Same problem - No browse icon

Scolo - August 29, 2006 - 09:29

I can't see the browse icon in image or link popup of tinymce. I followed the steps in install.txt. Tried earlier versions of TinyMCE. Tried FF and IE browsers. I've tried a new install of drupal 4.7.3, without any other plugins or modules, the icon just won't show up.. What to do?

xtemplate?

ufku - August 29, 2006 - 18:10

are you using xtemplate?

Problem with the theme

Scolo - August 29, 2006 - 18:38

Okay i found the problem. With bluemarine theme it's working, but with the ADC theme its not.. its the same engine: phptemplate. There are two .js files in adc theme, maybe it has conflict with the theme's js?

any js error?

ufku - August 29, 2006 - 19:47

do you see any javascript error with the other theme? if not, do you see imce_set.js is present in the source code?
why i asked about xtemplate is that imce_set.js is never added to the page becouse xtemplate calls header/footer functions in different order. i fixed this in cvs version.

no errors, but imce_set.js is missing

Scolo - August 29, 2006 - 20:47

No JS errors, but imce_set.js is missing from the source. I've installed the CVS version, same problem.

closure

ufku - August 29, 2006 - 21:21

make sure you have the $closure variable in your page.tpl.php file. it contains the html that footer hook returns.

My java console shows a

larrynichols - August 31, 2006 - 03:49

My java console shows a variety of "Unknown property" errors pertaining to the editor_content.css in my tinymce/tinymce/jscripts/tiny_mce/themes/advanced/css folder. I have no idea what this means. I'm a bit lost. My theme is chameleon. Anyone come up with any solutions for this?

This worked for me...

Rob T - September 2, 2006 - 07:47

I use a modified version of Aqua-soft. Sure enough, the closure statement wasn't in the page.tpl.php file. Once I added it, the browse button appeared.

Thanks.

For us newbies

drea - September 16, 2006 - 18:36

Can you copy the exact code we should put in that file, and where we should put it?

Thanks,
Andrea

Not working for me either

hsfdrupal - September 13, 2006 - 08:33

I've been using the ADC theme and I also don't see the IMCE browse button. Has anyone identified the problem? It looks like the template has the call to closure. . .

Thx,

-Bob

Images not showing

vm - August 27, 2006 - 18:04

Images do not show in Image Preview window and on page, only image frame. Path is correct and I have checked the restrictions, they should be adequate: upload and imce: image size 2000x2000 pixels etc...
I do not have any other image modules.

Experienced the same

GiorgosK - September 13, 2006 - 09:06

Check to see that the input format for the node allows images or does it
strip them away,
Filtered HTML for example by default does not allow img tags
Full HTML on the other hand does

(FYI: Its a generic setting it has nothing to do with tinyMCE or IMCE)
--
Chios Greece sightseeings

Image Browser not required

gargsuchi - August 31, 2006 - 04:34

This is an excellent module - does exactly what i need - except for one issue.
My site takes in articles from anonymous users - and they need to upload images accordingly. Now - i dont want them to see all the images. Is it possible to change the module a bit so that there is no image browser - just an "Upload" Button instead of the browse button on the default tinyMCE image pop up.

Inline module?

elv - September 3, 2006 - 14:25

If you users always upload new images, and never use existing ones, you could have a look at inline module.
They upload images like any other atached file, but you can choose to display images automatically in the content.

I've already posted this in

mejmo - September 3, 2006 - 21:38

I've already posted this in development thread but one more time :)

When the dimensions of an image are larger than allowed values and Scale if necessary is checked, it gives me an error Error scaling image. Do you know where would be a problem ?

Even though, I think this module really rocks ! Img_assist was quite complicated for lame user, this is simple, robust, useful, ... Thanks buddy

Just agreeing with everyone

fronbow - September 4, 2006 - 12:48

Just agreeing with everyone else! This is a better module than img_assist. (I've been having trouble with img_assist not cooperating with tinymce so finding this was a bonus)

And it's brilliant. Cheers for writing+releasing it!

No Browser Button on certain themes

drupalluver - September 5, 2006 - 14:52

I just installed this program to my drupal and couldn't find the browser button in tiny mce.

Based on a comment above, I changed the theme to bluemarine and it showed up!

But it wouldn't show up in chameleon or marvin. I really wish to use the marvin theme. Is there anything that I can do?

Thank you.

theme closure

ufku - September 5, 2006 - 16:42

you should have closure in your theme. it is inserted in different ways. some themes use theme_closure() function directly, and some use $closure varible. almost all themes including marvin and chameleon have the closure by default. if it's not there add 'theme_closure()' just before the body closing tag.

Thank you for your reply. I

drupalluver - September 5, 2006 - 20:59

Thank you for your reply. I looked for a page.tpl.php but it didn't exist. I did find default.tpl.php and added the closure line that you recommended.

Unfortunately, it didn't fix the problem. Do you have any other suggestions?

chameleon.theme

ufku - September 5, 2006 - 22:57

theme file for chameleon is chameleon.theme

Don't know how much use this

larrynichols - September 5, 2006 - 23:57

Don't know how much use this will be, or if it just goes without saying, but run try running update.php if the browse button isn't showing up. I'm using chameleon too, and nothing else would get imce working. Maybe the system thinks it's an update for tinymce. I've since installed it on three sites, with the same result each time. It doesn't work at all until I run the update, and then it works perfectly. Sorry again if this is obvious stuff. Just didn't see it mentioned above so I thought I'd throw it out there.

btw, i didn't need to do anything with the theme file or the closure line.

I tried adding the closure

drupalluver - September 6, 2006 - 00:46

I tried adding the closure line to chameleon.theme as well as running update.php

Neither are working for me under chameleon or marvin themes.

use cvs

ufku - September 6, 2006 - 20:46

strange! my chameleon works fine. if you are not using latest version download it from project page. otherwise, if including imce_set.js in every single page doesnt bother you, include it manually in your theme using the correct path.

Just to be certain, is the IMCE/CVS version correct?

publishing - September 7, 2006 - 16:06

ufku, first off, thank u for your interest, time, effort and the 'can do spirit' in putting together the imce module. It is an absolute blessing for many.

Just to be certain as to the correct version of imce, is the 4.7 version or the cvs version dated 8/30/06 the correct and most updated version of the imce module which users should be using at this time?

Please advise

Thanks again,

Please put this on your chest: (SH) --- You are our SuperHero!

cvs is 4.7.x

ufku - September 7, 2006 - 23:18

cvs is 4.7.x + some extra features (file sorting, higlighting of new files, scaling of big images) + a fix for xtemplate + a fix for view permission. i'm using the old 4.7 version and had none of the problems that users reported. It's about user's server, themes, etc. I'm trying to make imce work with as many configurations as possible. Therefore, your feedbacks are valuable. If you have problems with 4.7 you can safely try cvs version which has a few fixes for some configuration differences.
thanks.

Thanks!

christefanø - October 1, 2006 - 09:52

I was a little confused by the odd timestamps on the project page, but I downloaded and installed the CVS version anyway. The browse button is back. Thanks!

imce error: undefined function: drupal_add_js()

Ashford - September 6, 2006 - 16:00

Below is the error I get and the section of the imce.module it references. I am using the CivicSpace theme (phptemplate theme engine).

One more question. Do I need to create a new database table or field for the user_id and image relationship?

Fatal error: Call to undefined function: drupal_add_js() in /home/www/path/to/docs/modules/imce/imce.module on line 19

/**
* Implementation of hook_footer().
*/
function imce_footer() {//set imce if tinymce is in action
if (strpos(drupal_set_html_head(), 'tinyMCE.init') && user_access('view files')) {
drupal_add_js(drupal_get_path('module', 'imce').'/imce_set.js');
}
}

4.7

ufku - September 6, 2006 - 20:48

imce doesnt work with versions before 4.7

Imce --Warning: Duplicate entry error--has anyone experienced?

publishing - September 7, 2006 - 19:45

The Imce module is sweet! Thanks again, ufku --- I have experienced the below error upon going to -- admin/settings/imce --- configuring, then pressing enter key. Has anyone experienced this error? -- what is the corrective solution?

Please advise ---

Thanking all in advance for your reply.

=======error below=====
Warning: Duplicate entry '190' for key 1 query: INSERT INTO menu (mid, pid, path, title, description, weight, type) VALUES (190, 11, 'admin/settings/imce', 'imce', '', 0, 22) in /home/bfnnetwo/public_html/drupal/includes/database.mysql.inc on line 120

other modules in settings

ufku - September 7, 2006 - 23:27

do you experience the same problem with other admin/settings/module pages?

Imce error messg

publishing - September 8, 2006 - 05:35

ufku, I have not experienced any problems currently, but yes, along the way, I have seen a similar issue with a few other modules. While not always the same, it is usually the result of a specific issue with scripts and/or settings which cause a conflict, and thus the error messg. The issues are not always the same. However, I have found that the specific issues are generally experience by multiple users. Thus, I have reached out to ascertain if any have had the same problem.

Everything else re the imce module and its installation seems to have gone smoothly. Have this issue sort of keeps u from confirming the initial settings for the module. For instance, when u go to save the imce settings, the below error messg is returned:

=====
Warning: Duplicate entry '194' for key 1 query: INSERT INTO menu (mid, pid, path, title, description, weight, type) VALUES (194, 11, 'admin/settings/imce', 'imce', '', 0, 22) in /home/bfnnetwo/public_html/drupal/includes/database.mysql.inc on line 120

Warning: Cannot modify header information - headers already sent by (output started at /home/bfnnetwo/public_html/drupal/includes/database.mysql.inc:120) in /home/bfnnetwo/public_html/drupal/includes/common.inc on line 266
=====

As always, I appreciate any information on this matter that anyone has.

Thanks,

Some upgrades require you to run update.php

Ashford - September 8, 2006 - 16:18

No idea if that is the cause of your errors, but here's a Documentation link for you.

http://drupal.org/upgrade/do-i-upgrade-the-db

Thank U for the Link!

publishing - September 8, 2006 - 22:10

Ash, Thank u for the link. I actually did/have run the update.php script, yet the error still displays. I will have a look at the link as a chance to really get clear on the whole update.php process. I am 8 months deep into the Drupal process, starting as a new, and I have come a long, long, long way.

Again, thank u for your time, interest and reply.

Duplicate Entry Error --- found solution! -- fixed

publishing - September 10, 2006 - 06:30

First off, while the duplicate error could be caused by the imce module, it is an error which can and does involve any module in relationship with its database table, in conjunction with the specific module's id sequence # located in the sequences table in the database.

The explaination of the problem is straight forward and the solution to adjust is fairly simple. Both can be found at: drupal.org/node/69722.

How this helps someone get over a small speed bump, smoothly and quickly.

Drupal ver came with CivicSpace: What do I upgrade for imce?

Ashford - September 8, 2006 - 16:07

Civicspace 0.8.5
----------------------------
- Includes Drupal patches from 4.6.8

I downloaded CivicSpace as a package. My understanding was it is the basic Drupal program with the recommended modules for a community web site. What do I need to upgrade to keep all the current modules working and use imce?

U need tinymce module-- IMCE module only for 4.7 or higher

publishing - September 8, 2006 - 22:22

Ash,

Just to add Imce to your base 4.6.8 install, you will need to install tinymce.module which is a contributed module. Also, you will need to install the tinymce engine (this is a separate product from the tinymce.module) which u can/will find information as to location in the tinymce install/readme file.

regarding installing the tinymce engine, please pay careful attention to the install of the, tinymce engine plugin, "Drupalimage directory", as it was initially installed in the wrong folder ---- don't be intimidated with this, just follow the instructions. it is just a matter of uploading the "Drupalimage" directory to the correct folder.

Also, FYI, the Imce module on ly works with Drupal 4.7 or higher. I would recommend if you are only doing a basic Drupal install, with not many contributed modules to load, that u consider a fresh 4.7 install. If not, you will have to make use of some of the other image modules, which I have personally found very difficult to get functioning properly.

imce without drupal

the_goose - September 7, 2006 - 21:27

hey guys,

this sounds like that what i am lookin for ;-)
is there a way to integrate the module in the TinyMCE without using Drupal? i use the editor for my own CMS and need this file browsing module very irgent!

thanks in advance to all of u

"after activating the module

whatistocome - September 15, 2006 - 02:56

"after activating the module you should see the browse icon in tinymce's image popup window."

how do I access TincyMCE's image popup window?!? I don't have an option to turn it on in admin/settings/tinymce" -> "button and plugins". Is it another module I have to download from moxie/3rd party/drupal.org?

- Jason

It should be automatic, do

JonathanDStopchick - September 15, 2006 - 13:12

It should be automatic, do you have a populblocker on?

.o.oOo.o.

Me I'm dishonest, and a dishonest man you can always trust to be dishonest. Honestly it's the honest ones you have to watch out for, you never can predict if they're going to do something incredibly stupid. -Jack Sparrow

What do you mean by automatic?

whatistocome - September 15, 2006 - 15:20

I don't have an image button on my TinyMCE toolbar when editing a text box. Is "advimage" the image plugin I should be using that comes with TinyMCE? If so, I can't get that to show; even after enabling it in /admin/settings/tinymce. If it is this module, please share your lines in plugin_reg.php to get this working (and any other steps necessary), if it's a different module/steps, please share.

no need for a plugin

ufku - September 15, 2006 - 17:04

you dont need advanced image plugin.
in your tinymce profile page, there should be an image button under "buttons and plugins" section.
note: tinymce simple theme does not show this button.

man, i knew i was missing

whatistocome - September 16, 2006 - 02:15

man, i knew i was missing something that everyone else has with no problem. a clean re-install of tincymce/tinymce module gave me the image icon plus fixed A LOT of other little issues I've been having with TinyMCE for months.

So, now that I've used imce module, I can add to the chorus - bravo to ufku - it's perfect in it's usage and simplicity - it just works. i've finally found my drupal image solution i've been looking for.

- Jason

imce safe themes

marafa - September 28, 2006 - 23:29

hi
i was hoping someone could tell me what themes are "imce safe themes"

i know bluemarine is, but what else?

Perfect

zeeman - October 2, 2006 - 10:43

A small but perfect imageuploader.
Great!

Thanks

important!

ufku - October 4, 2006 - 22:51

recently, imce has been announced to have some security vulnerabilities. especially if you give delete permission to someone who you may not trust, you should download the 4.7 version from project page
CVS versions before $Id: imce.module,v 1.6 2006/09/29 13:50:57 ufku Exp $ are vulnerable.

--
ufku
Geneticists from METU

Imce error

scillyguy - October 6, 2006 - 09:38

I get the following error on clicking the browse/insert icon in IMCE

warning: getimagesize(): Read error! in /home/parry/public_html/drupal/modules/imce/imce.module on line 243.

Could anyone advise why I might be getting this error, please.
Thanks

permissions

ufku - October 6, 2006 - 12:05

If accessing the image is impossible, or if it isn't a valid picture, getimagesize() will return NULL and generate a warning.
if the image is uploaded by drupal/imce there wouldnt be any problem regarding access permissions.

--
ufku
Geneticists from METU

Hi Ukfu I can access the

scillyguy - October 6, 2006 - 15:24

Hi Ukfu
I can access the image even though i get the error message and indeed it appears in the tinymce text area but it doesn't appear in the published page/story. I'd really like to sort this out as I think the imce module is ideal for what I need (good work ufku).
Look forward to your reply. Thanx.

input format

ufku - October 6, 2006 - 19:12

this is generally due to input formats. check yours if it allows img tags.

--
ufku
Geneticists from METU

for the read error

ufku - October 6, 2006 - 20:08

How can I use this module in

j0k3z - October 9, 2006 - 06:11

How can I use this module in additon to setting up user galleries on my website?

I want each user to be able to organize photos in their own personal galllery and also be able to easily insert those images into blog posts/forums topics. This module seems to do the latter but is there a way to get it to share images that are in their gallery?

Please help, im so confused.

Fatal error: Call to undefined function: drupal_get_token()

PhilipReed - October 20, 2006 - 19:04

I'm getting this upon install:

Fatal error: Call to undefined function: drupal_get_token() in /drupal-4.7.3/modules/imce/imce.module on line 71

Did I miss a step in installation?

--

http://philipreedtech.com

redownload

ufku - October 20, 2006 - 22:02

redownload the module please.

--
Geneticists from METU

Quick ? imce image capabilities

publishing - October 23, 2006 - 20:49

Hello ufku,

I have the imce module in place and operating and have recently installed the video module which states that the image module must be installed as well in order for the video module to function.

My ? is: are u aware if the image capabilities of imce can work in the place of the image module for this function. My past experience with the image.module was not very successful. In fact, I aborted the install in favor of the much efficient and less time consumer imce module.

Please advise when u get a chance. Thanks again for imce module, it is so sweet.

imce has minimal image

ufku - October 24, 2006 - 09:29

imce has minimal image capabilities(resizing and image info) and this is not enough for video module. You can enable image.module and prefer not to use it. you may let only the video module or other image dependent modules use it.

--
Geneticists from METU

Enable, Not use it!

publishing - October 24, 2006 - 17:15

Enable it and not use it! Makes sense, I didn't think of this.

Thanks Ufku!

Thanks

PhilipReed - October 27, 2006 - 23:52

Thanks. After I posted, I learned that this was a bug fix, apparently within 24 hours of my download.

Are there any plans to attach a version number to imce for easier reference?

Thanks,

Philip

http://philipreedtech.com

there is a new project

VeryMisunderstood - October 27, 2006 - 23:57

there is a new project release module going to be incorporated into drupal.org which will open up and benefit the entire community. it may roll out with 5.0 from what i've read in the dev areas

Recurrence

PhilipReed - October 31, 2006 - 23:33

Ack! This error is recurring, same line number.

Now, I had the then-latest imce working and was testing it fairly heavily. I had missed the "limitless upload" access control setting, so the last thing I did before seeing this error recur was to UNCHECK that setting for a certain profile. Then, still logged in as admin (but I think with that same profile), I started getting a recurrence of this error. RECHECKING the setting doesn't appear to be fixing it either, nor does logging in as a user that I know has this profile I'm changing.

For all I know the setting could have nothing to do with it and something else salient changed in my configuration, but at any rate the access control / limitless upload was the last thing to have changed.

I'll hack away and see what I can find, but meanwhile any background info on drupal_get_token would be helpful. TIA.

http://philipreedtech.com

To state shortly,

ufku - November 1, 2006 - 02:14

To state shortly, drupal_get_token is a security related function to make sure the user views a form before submitting it. it comes with 4.7.4 and wont work with previous releases. current version of imce doesnt use this function and works with all 4.7.x.

--
Geneticists from METU

One can always

Heine - November 4, 2006 - 19:39

One can always use:

<?php
if (function_exists('a_function')) {
 
a_function($parameters)
}
?>

--
The Manual | Troubleshooting FAQ | Tips for posting | How to report a security issue.

My browse button is fixed now

ssace - October 28, 2006 - 15:46

Well thanks to this thread I am straight.

My image browse button was not working in the Bluemarine theme...hehe (everything should work in that theme). It was not a theme problem.

Here's what I did:

1) added images folder to my files folder: /files/images (chmodded both to 777)
2) In IMCE settings, I left "personal folder names" blank; and set "use a shared folder" to: images
3) In TinyMCE settings - Buttons & Plugins section, I unchecked "Advanced Image". (For me everything else is checked)

Thanks again :)

Thank you!

spiney@linux.sp... - October 29, 2006 - 20:38

I've been using Drupal quite some time now, but one of the reasons why one of my installations is still running an ancient version (plus security updates) is that I had not found an alternative to the version of HTMLArea (plus some ImageManager extension) that I was using and hacked up to do something similar to the one-directory-per-user thing like this module does. Alas, my "hack" happened not to work with newer HTMLArea versions anymore (and lacking time I didn't update), and other solutions like image.module etc. were not to the taste of my users.

So thank you very much for providing me with an upgrade path. :)

imce api

ufku - October 29, 2006 - 22:06

the next version will introduce a small api like feature that will allow custom imce calls. if you open imce in any pop-up that has a name (window.open('imce/browse', 'popupName')), imce will search for your custom finishing function named as popupNameImceFinish and call it with parameters of image path, image width, image height, and imce window when the user clicks the add link. You will be able to do anything with these parameters in your custom function. This will make imce work with any wysiwyg editor or even with plain textareas(inline img or link insertion). tinymce, fckeditor and plain textarea support will be included as default.

--
Geneticists from METU

More on resizing / size limits

PhilipReed - October 30, 2006 - 18:44

From the above discussion about IMCE versus image module, I got the impression that IMCE doesn't really support resizing. If I'm misunderstanding, please correct my understanding.

I need to be able to upload an image and have it resized to some max. size while scaling. I have Gallery2 installed and I'm pretty sure if I dig around the code enough, I'll find a library that is of use -- any suggestions, Gallery users?

Also, it doesn't look like the settings for max height and width are being observed. I have only one profile and I logged in as the user with the profile assigned, so I don't think that's the issue. Should I expect it to complain and not let me do the upload? The settings are right there in plain view (I made them 20x20 to cause an obvious conflict) but the upload goes on without a hitch.

Thanks.

http://philipreedtech.com

imce will only resize an

ufku - October 30, 2006 - 21:46

imce will only resize an image to allowed dimensions if the dimensions exceed the limits. and also "enable resizing" option should be checked. next version will support both thumbnail creation and custom resizing of any image. i plan to make new features avaliable for 4.7 version before releasing 5.0

--
Geneticists from METU

File Path Settings

txcrew - November 1, 2006 - 15:31

Is there any way to insert an image with the full site URL? Reason for this is when I use TinyMCE and IMCE to create a newsletter the images will not show up unless it is an absolute URL.

Let me know when you get a chance.

Thanks,
txcrew

there should be something

ufku - November 3, 2006 - 17:57

there should be something about url conversion in tinymce documentation. since the default settings in tinymce doesnt convert relative urls to absolute ones, i think you'll need to hack it if you want to change the configuration.

--
Geneticists from METU

IMCE 5 is ready

ufku - November 3, 2006 - 18:13

you can check new features and try out a demo at http://drupal.ufku.com.
For drupal4.7 users who want to try 5.0 features there is a special release in the site.

--
Geneticists from METU

When I try to download the

drupalluver - November 3, 2006 - 21:51

When I try to download the 4.7 special release, I get a page not found?

By the way, thank you for this wonderful module. I have used it quite a bit.

corrected

ufku - November 3, 2006 - 23:22

link was incorrect.
thanx.
--
Geneticists from METU

Downloading it now. Thanks!

drupalluver - November 3, 2006 - 23:50

Downloading it now. Thanks!

Fantastic, IMCE supports FCKeditor!

christefanø - November 4, 2006 - 19:31

Fantastic, IMCE supports FCKeditor! That's the best of both worlds. Thanks, ufku!

quota bug?

marafa - November 4, 2006 - 11:28

i set a quota of 500k for a user. it turns out this user is the biggest contributor to my site. suddenly pictures from the earlier articles he posted have begun disappearing.
when i checked his directory on the server, i did not find the earlier pictures. in fact his directory had pictures that had a total disk usage of 488k.

i believe imce deletes older files when the quota is reached. i did not know this would happen. i made the quota for this user 5mb. i need to know how to remove quota for this particular user.

i would also like to know whenever a user approaches his client. this default action of deleting older pictures is disastrous. the administrator should be able to set the default action or pick an action depending on his preference per user.

thanks

IMCE has no automatic file

ufku - November 4, 2006 - 12:22

IMCE has no automatic file deletion feature. The user himself probably deleted the files.

IMCE 5 supports role based settings. You can define a role for a particular user or a user group and set quota etc. for it. You can also disable deleting.
For 4.7 users there is a special edition of IMCE having latest added features. You can try it at http://drupal.ufku.com.

--
Geneticists from METU

how then

marafa - November 4, 2006 - 14:05

how then is quota implemented?
does it give a warning to the user?
is there a log message?
is there an email sent to user/1 ?

quota exceed warning is

ufku - November 4, 2006 - 14:16

quota exceed warning is displayed only to the user.

--
Geneticists from METU

IMCE & templates

thepeter - November 6, 2006 - 11:11

Hi I like IMCE very much ... and after the security patch I cannot solve one small problem ... its not possible to upload images thru it using my template (means that the button to show directory with uploaded pictures doesn't appear) ... is there some kind of solution? I've tryed to switch template to bluemarine and there it works. if someone know where is problem with template or other modules used it will be great

closure

ufku - November 6, 2006 - 12:50

make sure your template contains $closure variable in it. you can see it in bluemarine at the end of the page.tpl.php

--
Geneticists from METU

that was it

thepeter - November 6, 2006 - 13:06

well thank you ... did I missed some paper where it was explained?
eiitherway THX

in...

ufku - November 6, 2006 - 14:57

in install.txt and in this page :)

--
Geneticists from METU

Browser generating error message

tburton - November 9, 2006 - 10:26

Loaded IMCE and can see browser button but when I click on the button I get this error:

"The requested URL /sites/default/index.php was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

Any thoughts ?