Search code examples
joomlacomponentsfilepickerjoomla1.6

Use Media Manager as filepicker in component


I'm developing a component in Joomla 1.6, is a Document Manager and I have all the funcionality, but now I want to include the Media Manager as File Picker.

In Joomla 1.6 Media Manager is prepared to be use like a Image Picker (as we can see in the Article Manager where you can select a Image for the content), but I want to know if it's possible to reproduce the same action with all filetypes without modifying the Media Component.

I know how to use the media manager as Image Picker in my component. In fact I answered to this question.

use joomla com_media image selection in my custom component

Can someone help me? :)

Byes


Solution

  • Ok, after the study of the component i got the fact that is not an easy question.

    How can we use another filetypes?

    /administrator/components/com_media/models/list.php

    on line 116 exists a switch which works as a filter

    If we want to add a new functionality (with a button)...

    Where can we add the button?

    /administrator/components/com_media/views/images/tmpl/default.php

    Where can we add the javascript functionality?

    /media/media/js/popup-imagemanager.js

    Doing that we have some problems

    1) we need to hardcode in every joomla.

    2) I'm not sure, but the changes might be delete after a Joomla Updated.

    Another chance is make a fork of the media component with theses changes ready to install.

    Byes

    Thanks to the tumbleweed badget to encourage me to write the response.