stephane chamberland | 11 Feb 2009 03:29
Picon

Re: invoke mediamanager in a plugin

I finally got around to use the mediamanager in a custom form field created by a plugin.
Not sure if the proposed changes in another thread (about securing the access to the mediamanager) will break that.

If anyone is interested, I included it in the bureaucracy plugin from A, Gohr.
I also put a few other additions to the plugin [date picker, link and phone fields, constants, a few more options...]
Most of the plugin is now in the helper part so it can be reused in other plugins. Basic syntax plugin works as before.
You can find this version at:

http://meteokid.ca/wiki-plugins/bureaucracy.tgz

Please note that it is a preliminary version, lot more work needs to be done, mainly to secure it.
If you can help that would be great!

Not sure if A.Gohr wants to include some of these in the official bureaucracy plugin... would be nice ;-)

Thanks!
Stef

On Mon, Feb 2, 2009 at 14:35, Stephane Chamberland <stephane.chamberland <at> gmail.com> wrote:

Does anyone know how/if I can use the media-manager to fill an input field
in a form created by a plugin [kind of an addition to the bureaucracy
plugin]?

After spending some time searching dowkuwiki.org/freelists/source code I
obvisouly didn't get it.
I can fire the mediamanager in a form with an onclick (or other) event.
But I do not know how to do a proper set up so that clicking an image in
the mediamanager fills the field I want (how do I specify the element
id, the opener window id?) then close the pop-up window.

I got 2 errors in the browser console:
1) this.editor is null - on mediamanager  window creation
2) opener.insertTags is not a function - when I click an img in media
manager

Thanks!
Stephane




Gmane