On my CMS I have already a temp folder where I put all temporary files (session, compiled smarty template,...) and this folder is not under my "image" folder. e.g. /home/www/image <==== all image /home/www/tmp <=== all temporary file
If I set $CFG->thumbdir = '../tmp', the result is : /home/www/image/..tmp/ and not /home/www/tmp/
Hi, Thanks for the update, imgLib is very effective to browse my file in the CMS but I encouter troubles :
-------------------------------------- When select a file I get a JS error on selectFile() method in index_ckeditor.html (in FF 3.6)
var file_url = selected_file.wwwPath; temp_array = window.location.search.substring(1).split('&'), params = {}, tmp, i ;
replaced by (work for me with this update)
var file_url = selected_file.wwwPath; var temp_array = window.location.search.substring(1).split('&'); var params = {}; var tmp; var i;
------------------------------------- imgLib not working fine with file with accents - On upload : nénuphars.jpg => become n%E3%A9nuphars.jpg in the file list. - On select "n%E3%A9nuphars.jpg": Javascript error on tmp variable in index_ckeditor.html - On folder creation folder enchanté => creation ok but folder name becomes enchant%C3%A9
-------------------------------------- Cut a folder and paster in an other folder is broken : folder to cut : New_Folder2 localized in w:/var/www/dummy/New_Folder2 in folder to paste : New_Folder my config : $CFG->imguploaddir = 'w:/var/www/dummy/'; $CFG->imgurl = 'http://127.0.0.1/dummy'; When paste, I get an error : "Operation failed. Error code is 0" and a folder is generated like this %3A%5Cvar%5Cwww%5Cdummy%5CNew_Folder2
-------------------------------------- Copy a image to another folder Now working, I get : "Operation failed. Error code is 0" Config : $CFG->imguploaddir = 'w:/var/www/dummy/'; $CFG->imgurl = 'http://127.0.0.1/dummy';
-------------------------------------- WHen rename an image, I get an error message "Operation failed. Error code is 0" but the rename is done.
- resize image : I get an error after a resize : "Error : OK" The resize is well done when checking on the filesystem directly (image + thumbnail) but when closing the image tools popup, the thumbnail is not updated automatically as if in thmb folder the image is updated, seem to be a browser cache issue. - crop : I get an error after a crop : "Error : OK". The cropped image doesn't appear in image tools (only old image with crop selection zone). When click on close, same problem with thumbnail not updated. - rotate/flip image : I get an error after a resize : "Error : OK" Same problem with thumbnail not updated.
--------------------------------------- Parameter $CFG->maximgresize seems not working. $CFG->maximgresize=4096; I guest maximgresize is a width in pixel; if an uploaded image is greater than this parameter, you resize the image to 4096. If lesser than 4096, then keep the image with own size.
--------------------------------------- How to use this new feature "Image Tools support enable if add new argument "imgtools_config=1" to config call" ? imgtools_config is not defined in config.php
--------------------------------------- After a rename or delete, the thumbnail is not deleted.
--------------------------------------- $CFG->thumbdir = 'thmb' can be only a folder in current folder. Could be great is could defined like this : $CFG->thumbdir = 'w:/var/www/thumbnail/';
Is there a way to set the image paths dynamically?
I have several forms where users can upload images. e.g. the is a form for articles, a form for reviews and so on. So let's say a user wants to upload an image via the "article" formular - then it would be nice, if the image browser directly switches to the relevant "article" directory - so users do not have to navigate to the relevant directory first.
I already tried to add a "path" string to the URL the imgLib is called from: filebrowserBrowseUrl : '../imglib/index.html?path=articles
Yes, you can set the any exist folder as start browsing folder by add the path parameters, but the path parameters must be start by "/". In you case the
But you must know, the imglib remember the last browse folder to browsing session end (clear on browser close) and ignore the path parameters by second open. The you version
is not best by the security reason: user can set the "path" like "../../../../some_folder" and browse the any folder on server. And if you change the $CFG->imgUploadDir you must change the $CFG->imgURL too.
The solution is will be check the resulting path if is subdir of the you root dir.
if (strpos(realpath($CFG->imgUploadDir.$path), realpath($CFG->imgUploadDir)) !== 0) {
$path = '';
}
Thanks for your reply and for pointing out to some security issues...
But you must know, the imglib remember the last browse folder to browsing session end (clear on browser close) and ignore the path parameters by second open.
Alright, I see. So is there a way to disable this behaviour? Or to overwrite the session path dynamically?
My Problem: If a user just uploaded some images to e.g the /articles/ folder - and then switches to the "reviews" section and wants to upload some images there, all files will still be uploaded to the /articles/ folder. (if the user doesn't take care - and that is fairly common - where the files will be uploaded to).
Something I would really like to prevent if possible...
In this moment not exist the elegant solution. But, you can clear information about the saved last path on file select, for this add this code to your index_ckeditor.html (or index.html if you rename file) file after line 37.
setCookie('imglibinf', '', -1000);
in result you must have code similar to this
if (params.path) {
imgLib.setStartPath(params.path);
// Clear the information about the last visited folder and view type
setCookie('imglibinf', '', -1000);
}
This is not best solution, but it works. Maybe in future i realize more flexible solution.
Alternatively, you could use that code inside an "elseif" loop ("elseif($CFG->maxImgResize > 0)") after the current resize "if" statement (at line 1222), to make the code a bit more streamlined.
As I said, you could have a new configuration option specifically for auto-resizing. This seemingly would work and be quite a straight forward addition. I admittedly have not tested this, so if you know of any reason why it wouldn't work (you of course know the code better than anyone else), then I'd be interested to know why.
I also know that you mentioned a dialogue once an image has been uploaded that you were thinking about, so maybe this would be made unnecessary if you added that to imgLib.
I would be interested to know your thoughts on this.
Hi, I've tried to download your latest version of imglib, but on depositesfiles I get only the previous one. Where can I download the latest version ? regards F.
Currently its only a demo. The code in not perfect state. Demo is used to test the browser compatibility. In short time the lastest version has been available to download. But its not release until make corrections of errors found.
About the problem in Safari - i found the source of problem - Mozilla Firefox. It automatically unescape the window.locatin.hash. So fixed version is already in the site.
Re: imgLib - yet another image manager
Re: imgLib - yet another image manager
e.g.
/home/www/image <==== all image
/home/www/tmp <=== all temporary file
If I set $CFG->thumbdir = '../tmp', the result is :
/home/www/image/..tmp/ and not /home/www/tmp/
F.
Re: imgLib - yet another image manager
Cheers.
F
Re: imgLib - yet another image manager
Sory for the long fixing.
Sience 17.02.2010 the new build is aviable on the home site in download section.
Re: imgLib - yet another image manager
Hi,
Thanks for the update, imgLib is very effective to browse my file in the CMS but I encouter troubles :
--------------------------------------
When select a file I get a JS error on selectFile() method in index_ckeditor.html (in FF 3.6)
var
file_url = selected_file.wwwPath;
temp_array = window.location.search.substring(1).split('&'),
params = {},
tmp,
i
;
replaced by (work for me with this update)
var file_url = selected_file.wwwPath;
var temp_array = window.location.search.substring(1).split('&');
var params = {};
var tmp;
var i;
-------------------------------------
imgLib not working fine with file with accents
- On upload :
nénuphars.jpg => become n%E3%A9nuphars.jpg in the file list.
- On select "n%E3%A9nuphars.jpg":
Javascript error on tmp variable in index_ckeditor.html
- On folder creation
folder enchanté => creation ok but folder name becomes enchant%C3%A9
--------------------------------------
Cut a folder and paster in an other folder is broken :
folder to cut : New_Folder2 localized in w:/var/www/dummy/New_Folder2
in folder to paste : New_Folder
my config :
$CFG->imguploaddir = 'w:/var/www/dummy/';
$CFG->imgurl = 'http://127.0.0.1/dummy';
When paste, I get an error : "Operation failed. Error code is 0"
and a folder is generated like this %3A%5Cvar%5Cwww%5Cdummy%5CNew_Folder2
--------------------------------------
Copy a image to another folder
Now working, I get : "Operation failed. Error code is 0"
Config :
$CFG->imguploaddir = 'w:/var/www/dummy/';
$CFG->imgurl = 'http://127.0.0.1/dummy';
--------------------------------------
WHen rename an image, I get an error message "Operation failed. Error code is 0" but the rename is done.
--------------------------------------
On image edition :
config :
$CFG->imguploaddir = 'w:/var/www/dummy/';
$CFG->imgurl = 'http://127.0.0.1/dummy';
- resize image :
I get an error after a resize : "Error : OK"
The resize is well done when checking on the filesystem directly (image + thumbnail) but when closing the image tools popup, the thumbnail is not updated automatically as if in thmb folder the image is updated, seem to be a browser cache issue.
- crop :
I get an error after a crop : "Error : OK".
The cropped image doesn't appear in image tools (only old image with crop selection zone). When click on close, same problem with thumbnail not updated.
- rotate/flip image :
I get an error after a resize : "Error : OK"
Same problem with thumbnail not updated.
---------------------------------------
Parameter $CFG->maximgresize seems not working.
$CFG->maximgresize=4096;
I guest maximgresize is a width in pixel; if an uploaded image is greater than this parameter, you resize the image to 4096.
If lesser than 4096, then keep the image with own size.
---------------------------------------
How to use this new feature "Image Tools support enable if add new argument "imgtools_config=1" to config call" ?
imgtools_config is not defined in config.php
---------------------------------------
After a rename or delete, the thumbnail is not deleted.
---------------------------------------
$CFG->thumbdir = 'thmb' can be only a folder in current folder.
Could be great is could defined like this :
$CFG->thumbdir = 'w:/var/www/thumbnail/';
---------------------------------------
regards
F.
Re: imgLib - yet another image manager
I reupload files today with fixed CKeditor index page.
Lodge an apology to those 7 people who downloaded the files with errors.
Re: imgLib - yet another image manager (updated 2010.22.03)
Re: imgLib - yet another image manager (updated 2010.22.03)
Is there a way to set the image paths dynamically?
I have several forms where users can upload images.
e.g. the is a form for articles, a form for reviews and so on. So let's say a user wants to upload an image via the "article" formular - then it would be nice, if the image browser directly switches to the relevant "article" directory - so users do not have to navigate to the relevant directory first.
I already tried to add a "path" string to the URL the imgLib is called from:
filebrowserBrowseUrl : '../imglib/index.html?path=articles
and then do something like this in config.php
but that didn't work for me... so can you help me here please? thank you!
Re: imgLib - yet another image manager (updated 2010.22.03)
But you must know, the imglib remember the last browse folder to browsing session end (clear on browser close) and ignore the path parameters by second open.
The you version
is not best by the security reason: user can set the "path" like "../../../../some_folder" and browse the any folder on server. And if you change the $CFG->imgUploadDir you must change the $CFG->imgURL too.
The solution is will be check the resulting path if is subdir of the you root dir.
and result code for config.php
But the best way - use the exist solution.
Re: imgLib - yet another image manager (updated 2010.22.03)
Alright, I see. So is there a way to disable this behaviour? Or to overwrite the session path dynamically?
My Problem:
If a user just uploaded some images to e.g the /articles/ folder - and then switches to the "reviews" section and wants to upload some images there, all files will still be uploaded to the /articles/ folder. (if the user doesn't take care - and that is fairly common - where the files will be uploaded to).
Something I would really like to prevent if possible...
Re: imgLib - yet another image manager (updated 2010.22.03)
But, you can clear information about the saved last path on file select, for this add this code to your index_ckeditor.html (or index.html if you rename file) file after line 37.
in result you must have code similar to this
This is not best solution, but it works. Maybe in future i realize more flexible solution.
Re: imgLib - yet another image manager (updated 2010.22.03)
I know this is something you discussed in the past and I think it could be really simple to implement.
In the "process_upload" function, after the following line (line 1206):
You could simply add some code to resize the uploaded image if it is larger than "maxImgResize" (or a new config option):
Alternatively, you could use that code inside an "elseif" loop ("elseif($CFG->maxImgResize > 0)") after the current resize "if" statement (at line 1222), to make the code a bit more streamlined.
As I said, you could have a new configuration option specifically for auto-resizing. This seemingly would work and be quite a straight forward addition. I admittedly have not tested this, so if you know of any reason why it wouldn't work (you of course know the code better than anyone else), then I'd be interested to know why.
I also know that you mentioned a dialogue once an image has been uploaded that you were thinking about, so maybe this would be made unnecessary if you added that to imgLib.
I would be interested to know your thoughts on this.
Thanks again for all the hard work!
Re: imgLib - yet another image manager (updated 2011.09.02)
After some time of develop new version need to be tested before release.
The new in version 0.1.2:
Features:
Re: imgLib - yet another image manager (updated 2010.22.03)
I'll check out the beta and get back with any feeback.
Thanks!!!!
Re: imgLib - yet another image manager (updated 2010.22.03)
I've tried to download your latest version of imglib, but on depositesfiles I get only the previous one.
Where can I download the latest version ?
regards
F.
Re: imgLib - yet another image manager (updated 2010.22.03)
Re: imgLib - yet another image manager (updated 2010.22.03)
See below:
Attachments:
Re: imgLib - yet another image manager (updated 2010.22.03)
Re: imgLib - yet another image manager (updated 2010.22.03)
Re: imgLib - yet another image manager (updated 2010.16.02)
Re: imgLib - yet another image manager (updated 2010.16.02)
New build 0.1.2 r53 is available as demo and in download section on site.
New:
Re: imgLib - yet another image manager (updated 2010.09.04)
Re: imgLib - yet another image manager (updated 2010.09.04)