Forum closed. New forum available at http://community.wymeditor.org/

Image Tool (I've made one)

Discuss features, code, contributions, ideas, suggestions, ...
For bugs, patches and feature requests, please post on the Trac:
http://trac.wymeditor.org/

Image Tool (I've made one)

Postby chris on Thu Jul 05, 2007 12:27 pm

Hello,

I've created an image manager for WYMeditor.

It works by replacing the code for the image popup to incude an iframe. I then use jquery to add events to every image in the iframe. You simply click on an image, then click submit and its added to the document.

I am moving to code to a separate, js file, and soon it will be in a state where the source for the iframe is set as an option. You could even just load a static page of images, and it will just work. Or you could set the iframe to be generated by a gallery script.

My version has tabs, where there is a list of images on one tab, and a file upload on another.

Works really well for me.

I couldn't have done it without the fine folks who made jQuery and WYMEditor.

I'd like to send to code over (once I've tidied it). Where should I send it?

Thanks,

Chris.
chris
 
Posts: 2
Joined: Thu Jul 05, 2007 12:15 pm

Image manager

Postby bermi on Fri Jul 06, 2007 12:42 pm

Hi Chris,

We were planning this feature for WYM and will be discussing today at 15:00 GMT+1 (Paris, Madrid time) at chat.freenode.net #wymeditor

I would be nice if you can assist to the IRC chat so you can share your approach with the development team.

In order to post your code, you can apply your changes to current WYM trunk and open a ticket with your patch at http://trac.wymeditor.org.

Thanks for taking the time to make WYM better for everyone :D
--------------------------
http://www.bermi.org
http://www.akelos.org
bermi
 
Posts: 7
Joined: Wed May 02, 2007 6:11 pm
Location: Barcelona

Postby chris on Fri Jul 06, 2007 1:28 pm

Great, see you there.
chris
 
Posts: 2
Joined: Thu Jul 05, 2007 12:15 pm

Postby rhino on Fri Jul 20, 2007 7:10 pm

I am currently building a hack similar to what you describe. I have already built a dynamic image gallery with PHP / CodeIgniter and the jCarousel and Thickbox jQuery plugins. What I want to do is hack WYMEditor and my image gallery to work together i.e. when you click an image thumbnail in the gallery it inserts the full image into WYMEditor.

What I'm currently trying to do is to integrate my gallery scripts into the Image dialog by adding a couple external .js files to the header of dialogHtml in jquery.wymeditor.js. I am using AJAX and some mySQL queries to build the images list then I plan to inject the incoming list into the dialog. As of now I plan to have the thumbnails automatically fill in the URL, alt text, and Title dialogs based on the thumbnail info, which is in turn based on the database.

I'm not sure if this is the best way to execute this functionality however. I would rather integrate my gallery into the same page as WYMEditor and then insert images directly, bypassing the image dialog altogether. However I have been going through the wymedit code and I can't figure out how to do this. It seems that if I call exec() or execCommand() using WYM_INSERT_IMAGE it is always going to generate the dialog before inserting the image. I would rather just skip this step altogether and inject the image info directly into wymedit since I already have all the info aggregated in one spot.

Anyway, I'll keep plugging away at this. I am really excited about WYMEditor, it is a superlative piece of software made even more excellent by the fact that it is now jQuery based. I was just wondering what you guys think about this process and if you have any tips on how I could do it better. I am really looking forward to talking with this community further.

thanks!
-Aaron
rhino
 
Posts: 15
Joined: Thu Jul 19, 2007 6:17 pm
Location: Los Angeles

Postby rhino on Fri Jul 20, 2007 7:59 pm

Update: I got the dialog to function just like I described above and it works like a champion. I still works through the dialog but I was able to integrate my customized jCarousel gallery right into the dialog. That was *way* easier than I thought it would be. This is awesome. Thank you to the dev team for making such an incredible product.
rhino
 
Posts: 15
Joined: Thu Jul 19, 2007 6:17 pm
Location: Los Angeles

Postby jfh on Fri Jul 20, 2007 8:15 pm

That's great!

If you have some time, I can give you write access to the wiki so you can explain how you integrated your image gallery.

Anyway, welcome and thanks for your encouragements!
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby rhino on Fri Jul 20, 2007 9:18 pm

I'd be happy to post an explanation of what I did if you think it would help. It gets kind of complicated because I'm integrating WE into my cms framework but I think I could simplify it a bit and post up if you'd like. Let me know how to go about doing that, I registered for WYMEditor Trac yesterday
rhino
 
Posts: 15
Joined: Thu Jul 19, 2007 6:17 pm
Location: Los Angeles

Postby jfh on Fri Jul 20, 2007 9:42 pm

OK, I've created a link 'Image gallery implementation example' on the wiki homepage: http://trac.wymeditor.org/trac/wiki/Wik ... dcookbooks

Please feel free to create the page if you have some time, I've added you to the contributors group.

Thanks!
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium

Postby rhino on Fri Jul 20, 2007 11:03 pm

the page is in place, I think it needs to be modified to show how dialogImageHtml and dialogHtml can be changed outside of the js file, but I don't have time to do it at the moment. Hope it helps somebody: http://trac.wymeditor.org/trac/wiki/Con ... eryExample
rhino
 
Posts: 15
Joined: Thu Jul 19, 2007 6:17 pm
Location: Los Angeles

Postby tolano on Sat Sep 01, 2007 7:21 am

In wich release do you plan to include this feature? Will it be in the near future?
Thanks.
tolano
 
Posts: 2
Joined: Sat Sep 01, 2007 7:20 am

Postby jfh on Sat Sep 01, 2007 7:48 pm

tolano wrote:In wich release do you plan to include this feature? Will it be in the near future?
Thanks.

We're planning an API for media management, but I can't tell you when it will be available.
User avatar
jfh
Site Admin
 
Posts: 370
Joined: Sat Sep 23, 2006 8:43 pm
Location: Belgium


Return to Developers

Who is online

Users browsing this forum: No registered users and 2 guests