|  | 
  Kaurov Eugene - 2005-05-09 18:41:14I was asked:Just one question, the insert image option uploads the file to the server? I made a quick test and couldn't see it but I don't know if there is anything to adjust in the class or anything.
 
 
 Answer:
 No, uploading not supported. You may only include global link ant this time.
  Alvaro Calleja - 2005-05-10 22:36:02 - In reply to message 1 from Kaurov EugeneHi Kaurov, I was the one that asked you this question. I found no way of automatic uploading the image to the server, the MSDN info on execCommand didn't provide any clue on this.
 I think maybe something like this could be done: another icon named "Upload image" open a pop with a form that submits the image, giving it a descriptive name. It would be then stored in the server, and the "Insert image" icon would open another pop with a list of uploaded images, the user would select one and it would be inserted in the content.
 
 The only drawback I see is that another two files would be needed (or one with different parameters) and the simplicity of use of the class would suffer from this (now it's great, just a couple of lines and it's working). But for some users the added functionality would be enough reason to work a bit more.
 
 What do you think about this?
 
 Regards, and great work!
  Kaurov Eugene - 2005-05-11 06:16:09 - In reply to message 2 from Alvaro CallejaGood idea.I see this in such way:
 adding six parameters ..., $incom_path='', $view_path='', $pw='', $ph='', $bw='', $bh='')
 where
 $incom_path='' path to look for images and where to upload new
 $view_path='' this same path but from output page (if wesarea used in folder)
 $pw='' - prewiew image width,
 $ph='' - prewiew image height,
 $bw='' - big (natural) image width (maximum),
 $bh='' - big image height (maximum).
 
 When you click "insert image" icon, script have to show window (like color or table windows) with three blocks: global link, upload new, list of existing images in $incom_path.
 
 You may insert global image, or to upload new (tag must be inserted automatically for uploaded image) or to choose existing image.
 
 To upload image: XUpload class
 To resize image: ImageResizeClass
 Both files already at phpclasses
 
 
 Do you want to realise this idea youself or I have to make changes?
 If I'll do this, It take time becouse I want to port JS for Mozilla.
  Alvaro Calleja - 2005-05-11 06:36:50 - In reply to message 3 from Kaurov EugeneIt's a nice approach! Much easier for the user than what I had thought. I'll try to implement it myself, although I'm not sure how long will it take since I'm quite busy at the moment. Great news the port to Mozilla! |