Incompatibility with WP Media Folder
-
Unfortunately MLA does not work together with the WP Media Folder Plugin.
Both plugins are very useful – MLA for metadata wrangling, WP Media Folder for folders. It is sometimes nice to have a general folder based structure to sift through photos just as nice to be able to select “all flower” photos from the library. I would like to use both plugins.
Is there any chance of looking into this? Or are there any plans to add folder support to MLA (making WP Media Folders irrelevant)?
https://www.ads-software.com/plugins/media-library-assistant/
-
Thanks for your report and your question. My search for “WP Media Folder” in the WordPress repository turned up “WP Media Folder for Lightroom”, which led me to:
WP Media Folder, by JoomUnited
Is that the plugin you are referring to? If so, note that this is a “premium” plugin. I hope you will understand that I cannot afford to purchase premium plugins simply to answer MLA support topics.
MLA adds taxonomy support to Media Library items and provides the Att. Categories and Att. Tags taxonomies for organizing your items. WP Media Folder looks like a fine “folder based” alternative to essentially the same organization tasks. Assigning categories like “flowers” is equivalent to organizing by folders.
I’ve tried to make MLA as “WordPress like” as possible, and the taxonomy approach is part of this goal. I do not believe that adding folder support to MLA would provide any unique new capability and it would complicate the plugin.
If there are specific incompatibilities that I can look into let me know. I can contact JoomUnited to see if I can get a copy of their plugin for testing purposes.
I regret that the news is not better, but I am marking this topic resolved simply because I have answered your question. Thanks for your positive feedback on MLA’s metadata wrangling and for your interest in the plugin.
Good answer and I was suspecting as much. Sorry for not providing a direct link to make your search easier.
I do think a combination of both would be great. In my case I do have my photos organized in folders per country. This way I can quickly select to view only photos of the one country. But if I would want to see all “flowers” of all country the folder approach falls short (the old metadata vs. folder debate), hence I would love to able to do both.
Again thanks for replying, maybe I will start looking into it myself and if I can find a solution get back here.
Thanks for your update and your additional explanation with the example. As I wrote, taxonomies and folders are two different approaches to the same classification problem.
If you assigned country values in the “Att. Categories” taxonomy to your items and terms such as “flowers” in the “Att. Tags” taxonomy you can use the Media/Assistant submenu (or the
[mla_gallery]
shortcode) to get the results you want:- Click on the “All Att. Categories” dropdown and select a country, filtering the display when you click “Filter”.
- Click on a value in the “Att. Tags” column to filter the display by tags such as “flowers”.
- Enter a category or tag value in the Search Media Box and check the “Terms” box to filter the display by the term(s).
- Select a country in the “All Att. Categories” dropdown, then click on a value in the “Att. Tags” column. This search connects the two taxonomies with “OR”, giving you “country=Germany” or “tag=flowers”.
- Select a country in the “All Att. Categories” dropdown, then enter a term in the Search Media box (checking Terms). This search connects the two taxonomies with “AND”, giving you “German flowers”.
If you find any other ideas for combining the two plugins, post an update and let me know.
David thanks for the complete writeup. I however still want to use both methods for sifting through images: folders as well as metadata. I believe in both having their value.
The authors of WP Media Folder were so nice to provide the solution which actually involves modifying Media Library Assistant. If you are into diff files (mla-media-modal-scripts.diff):
751a752,753 > > var mlaDrop = wp.media.view.AttachmentsBrowser; 777c779 < wp.media.view.AttachmentsBrowser.__super__.createToolbar.apply( this, arguments ); --- > mlaDrop.prototype.createToolbar.apply( this, arguments );
or in other words in line 753 of mla-media-modal-scripts.js (don’t forget to update the minified file as well) add the line
var mlaDrop = wp.media.view.AttachmentsBrowser;
. Further down replacewp.media.view.AttachmentsBrowser.__super__.createToolbar.apply( this, arguments );
withmlaDrop.prototype.createToolbar.apply( this, arguments );
This way both plugins work together flawlessly. The design is a bit off, but I’ll deal with that myself. Would be great of you to integrate this quick fix in your next update.
Thanks for your update and for pursuing the matter with the authors of WP Media Folder. I have uploaded a new MLA Development Version with the changes you suggested in
mla-media-modal-scripts.js
and its compressed equivalent.I must confess it makes me uneasy to make changes I cannot test without access to a copy of the other plugin, and to read comments such as “The design is a bit off, …” I want to make sure that any changes I make work their best for all MLA users.
To get the Development Version, follow the instructions in this earlier topic:
Shortcode not working in (special) widget
It would be great if you can install the Development Version and let me know if it works for you. Of course, if any other problems emerge I want to know about them as well. Thanks for your help with this issue.
Thanks for working with me offline to do further testing and MLA revisions for WP Media Folders compatibility.
I did a bit more testing with WP Media Folders (WPMF) and MLA. It appears that WPMF uses a hidden taxonomy, ‘wpmf-category’, to implement its folder structure. WPMF hooks into the WordPress WP_Query class and adds clauses to the database queries that filter items by folder. As you know, it also adds UI controls to the Media/Library screens to allow folders and the “filter size” and “fillter weight” to filter the display.
The UI controls are not added to the Media/Assistant screen, so there is no way to select anything except the “root” folder. WPMF does go ahead and add its “root” folder clause to all the WP_Query calls MLA makes to populate the Media/Assistant submenu table, so the only items you can see are those in the “root” folder. The counts in the list of views are not filtered by WPMF, so they reflect the real totals in the Media library. I looked through the WPMF code and did not see any provision for turning this filtering on/off.
I made some modifications to MLA to remove the WPMF actions from the queries that populate the Media/Assistant submenu table. MLA now displays all of the Media Library items regardless of their “folder” location in WPML. This is a compromise, but at least an accurate and useful result. I do not know what work would be required to add the WPMF folders and additional filters to the Media/Assistant submenu screen.
I have uploaded a new MLA Development Version dated 20160313 with all the WPMF fixes. If you get a chance to test the new version, let me know your experience. Thanks again for your help.
I have tried out the MLA Development Version dated 20160313 on my DEV site and everything seems to be working – even the Assistant screen.
I completely agree with your assertion that folders are irrelevant for the Media/Assistant view as users are trying to achieve something different here than work in folders.
For me this issues seems to be resolved at first glance.
Thanks for working with me offline to refine and complete the handling of the WP Media Folders/MLA combination. I have released MLA version 2.25, which contains the fixes required for compatibility with WP Media Folders.
I am marking this topic resolved, but please update it if you have any problems or further questions regarding this plugin combination.
- The topic ‘Incompatibility with WP Media Folder’ is closed to new replies.