Seems pretty simple and I’m sure someone has done it but I couldn’t find a Field Type for it so I am trying to port the LG ImageManager to Field Frame.
I’ve never created a Field Type before but it looked fairly easy considering this one is mainly JS based. Anyways I got it working for the most part with the mcimagemanager.js path hard coded so I didn’t need to mess with config options.
My problem comes when I add a new row. The input name on the new field increases but the JS attached to the imagemanager button doesn’t increase. So the input name on the new field will be something like field_id_4[1][1] yet the JS attached to the button remains at field_id_4[0][1].
This makes the first row change when I select an image in the second row if that makes any sense.
Any ideas how to increment this or does a field type for this exist already? Thanks!
Hi,
this is great news. I have been looking into this myself but had not started yet. As I looked more into it I thought I would just make my own file/image manager instead of using TinyMCE ImageManager. However, this would be just what I need until then.
Are you planing on releasing your field to the community?
Best, Sammi
Sambo,
Ya it’s always nice to have a visual interface of your photos to select from, even if imagemanager may not be the most useable route to take here. Ngen works great but the ability to create folders and upload is a must for me on this project.
Once I figure this issue out I’ll release it. It’s actually very simple just some JS to add a button that when clicked loads the imagemanager. My issue is that I can’t figure out how to get the $field_name variable to increment when I add a new row so my imagemanager buttons only change the first row.
Any ideas? I’m new to creating extensions and can’t quite figure out how the input fields increment but nothing else does.
Hi,
did you figure this out?
I looked into this and thought it would not be too difficult. But I guess my limited Javascript knowledge is showing because I could not figure it out either. I was trying to manually add Javascript that simply alerted the field name. But I don’t think that works. That will only work for fields that have already been saved - not the ones that are added on the fly.
I think that the solution is to do this similar to what you can see in the nGen File field - that is by using jQuery - because jQuery can find the fields that are added dynamically. Check out that code and see if it helps you.
Best, Sammi
Hi,
I have managed to create a FieldFrame field for MCImageManager and could post it here if required.
It is not production quality but you could possibly use it as a starting point if you haven’t solved your problems already.
I will use it as a starting point for a field for a different filemanager that I am hoping to find. I wan’t a simpler, more elegant filemanager and if I don’t find one that I can use in this field as well as with TinyMCE I will develop one in Flash.
Best, Sammi
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.