 readm  id readmtxt v 11129 20100201 154258 ufku exp imc is an imag file upload and browser that support person directori and quota imc can easili be integr into ani wysiwyg editor or ani web applic that need a file browser see integr method for more inform featur basic file oper upload delet imag jpg png gif oper resiz creat thumbnail preview support for privat download configur limit for user role file size per upload total directori size quota file extens and imag dimens person or share folder for user userfriend interfac directori and file list file sort by name size dimens date select preview keyboard shortcut up down insert or enter delet builtin support for inlin imag file insert into textarea new in 6x improv ui tab interfac for file oper resiz workspac ftplike directori navig log messag addit keyboard shortcut home end ctrl a r esiz t humbnail u pload multipl file select use ctrl or shift ajax file oper oper on multipl file at a time directori cach themabl layout use tpl file improv configur profil multipl person or share directori assign for user permiss per directori option to use total user quota togeth with the directori quota replac method option for exist file multipl thumbnail definit new integr api for wysiwyg editor instal 1 copi imc directori to your modul directori 2 enabl the modul at admin build modul 3 creat configur profil and assign them to user role at admin set imc 4 test it at user userid imc or imc 5 see integr method to make imc collabor with your applic if it s not alreadi integr note when you configur imc for inlin imag file insert into textarea there should appear an imc link under each textarea you specifi if you are upload file contain unicod charact it is strong recommend to use the transliter modul that sanit filenam by convert charact from unicod to usascii http drupalorg project transliter if you are use cck you may want to check the imc cck imag modul at http drupalorg project imceimag or the file field sourc modul at http drupalorg project filefieldsourc frequent face issu inaccess invalid directori or subdirectori in some server configur manual ftp or direct creat directori may not be writabl by php by imc in this case you have to set the chmod permiss of the directori to 0777 in order to make it writabl by anyon you should also make sure that in each configur profil all of the defin directori are locat under drupal file system path which is usual file and also if safe mode restrict is activ in your server don t expect imc to run flawless disappear imag after node submiss have noth to do with imc it appear mani time in issu queue this is an input filter issu that can be resolv by adding tag into the default input format use full html is anoth solut see admin set filter no brows button in ie ff at all probabl talk about tinymc or fckeditor see integr method to learn to integr it by yourself upload doe not work in opera jqueri form plugin befor version 209 has problem with opera 92 replac drupal misc jqueriformjs with the one at http jquerimalsupcom form download imc may have problem work with googl analyt and secur page modul just make sure to add imc path to the except list of these modul integr method if you are use wysiwyg modul you must also download and instal http drupalorg project imcwysiwyg bridg modul and enabl imc as a plugin in wysiwyg set here are the applic whose user are lucki that they don t have to read the detail of integr method bueditor obvious the author know how to integr imc to his applic user need noth to do fckeditor without wysiwyg anoth modul from anoth bless author which make imc integr as simpl as a singl click fckeditor profil file browser set imc integr note one can also overrid the set at advanc set custom javascript configur here are the line that forc imc integr don t forc unless you need to linkbrows true imagebrows true flashbrows true linkbrowserurl q imc app fckeditor url txturl imagebrowserurl q imc app fckeditor url txturl width txtwidth height txtheight flashbrowserurl q imc app fckeditor url txturl there may be other applic that integr imc alreadi if your applic is not one of them pleas keep read let creat a case and embodi the imc integr on it an applic name myapp has an url field for file url has a brows button with click event this can be a text link or anyth that is clickabl now let go through the integr method and defin the openfilebrows function that open imc and make it fill our url field on file select integr by url when imc is open use an url that contain app applicationnam fileproperti1 fieldid1 fileproperti2 fieldid2 the specifi field are fill with the specifi properti of the select file avali file properti are url name size format width height date format byte integ size in byte time integ date timestamp id file id for newli upload file 0 or integ relpath rawurlencod path relat to file directori path in our case we should open imc use this url q imc app myapp url urlfield which contain our applic name and our url field id function openfilebrows windowopen q imc app myapp url urlfield width 760 height 560 resiz 1 that all we need leav the rest to imc it will automat creat an oper tab name send to myapp that send the file url to our url field click the file in preview do the same thing as well what if we had anoth field for anoth file properti eg size we should have open imc use this url q imc app myapp url urlfield size filesize use imceload you can point a predefin function to be execut when imc load when the url is like app myapp imceload myonloadfunc imc look for myonloadfunc in the parent window and execut it with the window paramet refer to imc window function myonloadfunc win ani method of imc is avail through winimc winimcsetsendto give it to myapplic babi myfilehandl you should also defin myfilehandl use sendto you can point a predefin function to which the select file are sent when the url is like app myapp sendto myfilehandl imc call myfilehandl function of the parent window with file and window paramet function myfilehandl file win urlfieldid val fileurl insert file url into the url field winclose close imc usual sendto method is easier to implement on the other hand imceload method is more flexibl as you manual add your sento oper and also can do ani modif befor imc show up advanc integr in case your applic want to go beyond the simpl give me that file properti interact with imc your applic want imc to send multipl file to it eg a galleri applic your applic want to gain total control over imc then you should consid appli advanc integr the initi step of advanc integr is the same as imceloadintegr abov we open imc and set its onload function windowopen q imc app myapp imceload initiatemyapp width 760 height 560 resiz 1 initiatemyapp win will run when imc load now we defin our initi function in which we do the necessari manipul to imc interfac initiatemyapp function win var imc winimc use imc method to add remov chang thing allright but what do we add romev chang in imc depend on our goal here are some properti and method that can help us to achiev it hook imchookload an array of function that run after imc load they are call with the window paramet imchooklist an array of function that run while process the file list each row of the file list is sent to these function imchooknavig an array of function that run after a directori is load paramet sent are data from ajax or cach olddirectori cach boolean that state the data is from the cach or not imchookcach an array of function that run just befor a new directori is load paramet are cachdata and newdirectori directori relat properti imctree store the directori list where imctree is the root element directori relat method imcdiradd directoriname parentelement clickabl add directoriname under parentelement ex imcdiradd foo imcdir true imcdirsubdir directoriname subdirectori add each subdirectori in subdirectori array under directoriname ex imcdirsubdir foo bar baz file relat properti imcfindex index array of file tabl row that contain file properti imcfid object contain fileid file name file row pair imcselect object contain current select fileid file name file row pair file relat method imcfileadd file add the file object to the list file object has the properti name size byte width height date timestamp fsize format fdate format imcfileremov fiilid remov the file have the fileid from the list imcfileget fileid return the file object have the fileid file object contain name url size byte width height date time id file id for newli upload file 0 or integ relpath rawurlencod path relat to file directori path file oper imcopadd op add an oper tab to the interfac op contain name titl content option func option onclick function imcopen name imcopdis name enabl disabl oper tab miscellan imcsetmessag msg type log a messag of the type status warn error note all url string in the exampl start with consid the base path is in case your drupal is run on a sub directori eg http localhost drupal these url should start with drupal there is a safer solut that doe not requir manual url fix if the drupal javascript object is avali in your page you can use drupalsetbasepath at the begin of url drupalsetbasepath q imc note that this won t work with multilingu path with languag prefix file and directori ids name use in imcjs are url encod form of origin name they are decod use imcdecod and display in the list 