• Resolved trinitaa

    (@trinitaa)


    Hi,

    I want to display the media library with the category filter dropdowns to the frontend,like what we have in the media library section backend want to display the same in the frontend.Is the media library assistant plugin support this requirement,if yes please give me what kind of shortcode i have to use it in frontend.Thanks for all your help.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author David Lingren

    (@dglingren)

    Thanks for your question, which has come up in these earlier topics:

    Dropdown taxonomy filtering for PDF gallery

    Limiting search results to attachment tags/”Justifying” gallery grids

    Dropdown taxonomy filtering for PDF gallery

    Dynamic search and filters

    With the current MLA version it is easier to get the example plugin. Navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. You will see a new submenu that lists all the example plugins and give you a “one-click” action for installing them. Type “user” in the text box and click “Search Plugins” to filter the table.

    You are looking for “MLA UI Elements Example” plugin. Find that plugin and hover over the title in the left-most column. Click the “Install” rollover action, then go to the WordPress Plugins/Installed Plugins submenu and activate it as you would any other plugin.

    I hope the above topics and the example plugin will give you what you need. I am travelling and away from my test/development system. If you need more specific help I can work with you when I return home. Thanks for your patience and your interest in the plugin.

    Thread Starter trinitaa

    (@trinitaa)

    Thank you so much for your help.I got an idea from your earlier topics and i have tried to filter the images by using dropdown categories as well as tag search box it’s working fine,but the only issue is the dropdown contains all and some categories list whenever i choose all it show me as no results.I need a help to resolve the issue how to display all the images when i choose all in the dropdown.

    This is my shortcode:

    <form id=”attachment-category-form” method=”post” action=”.”>

    <div class=”catlist”>[mla_term_list taxonomy=attachment_category mla_item_parameter=current_attachment_category mla_output=dropdown option_all_text=All hierarchical=true show_count=true pad_counts=true use_filters=true mla_option_value=”{+slug+}”]</div>

    <div class=”searchlist”>[muie_terms_search mla_terms_taxonomies=attachment_tag mla_phrase_delimiter=’ ‘ mla_phrase_connector=’OR’]</div>

    <input id=”attachment-category-form-submit” name=”attachment_category_form_submit” type=”submit” value=”Search” />
    </form>

    [mla_gallery numberposts=6 add_filters_to=any mla_output=”paginate_links,prev_next” post_parent=all post_mime_type=all]
    [mla_gallery numberposts=6 add_filters_to=any mla_nolink_text=”No items match the current filter selections.” post_parent=all post_mime_type=all]

    Can you please help me resolve this issue?

    Thanks in Advance

    Plugin Author David Lingren

    (@dglingren)

    Thanks for all the work you put in to understanding and applying the earlier topics! Thanks as well for your question and for posting the full source text of your form and shortcodes; very helpful.

    I tested your form and shortcodes and found some defects in the “MLA UI Elements Example” plugin. In particular, entering term text in the “tag search box” always returned “No items match the current filter selections.”

    I have corrected the example plugin and now your form and shortcodes are working as I expect:

    1. On the initial page display, when “All” is in the dropdown control and the tag search box is empty, all of the items in the library are displayed.
    2. If you select a term in the dropdown control and leave the text box empty, all of the items assigned to the selected category are displayed.
    3. If you select “All” in the dropdown control and enter a tag in the text box, all of the items assigned to the tag are displayed.
    4. If you select a term in the dropdown control and enter a tag in the text box, all of the items assigned to BOTH the selected term AND the tag value are displayed.

    I hope that is what you expected. If not, let me know.

    I will release a new MLA Development Version with the updated example plugin soon after I return home, and I will post an update here when it is available. Thanks for your patience.

    Thread Starter trinitaa

    (@trinitaa)

    Thankyou so much for your help and quick reply.This is the exact requirement what we want.We have an emergency to setup this functionality.Is there is any possibility to share the update code? or any other explanation from your side? so that i will try to change the code in plugin files.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your patience. I have uploaded a new MLA Development Version dated 20161027 that contains an updated mla-ui-elements-example.php plugin. To get the Development Version, follow the instructions in this earlier topic:

    Shortcode not working in (special) widget

    Once the Development Version is installed, navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “user” in the text box and click “Search Plugins” to filter the table.

    You are looking for “MLA UI Elements Example” plugin. Find that plugin and hover over the title in the left-most column. Click the “Update” rollover action, then go to the WordPress Plugins/Installed Plugins submenu and verify that the new version is in place.

    It would be great if you can install the Development Version and updated example plugin and let me know if they work for you.

    Thread Starter trinitaa

    (@trinitaa)

    Thankyou so much for your help. It’s working good for me.

    Thread Starter trinitaa

    (@trinitaa)

    Hi,

    I have one more problem to implement the functionality i need a two tag search dropbox with the category and keyword search the output of the filter should be matches with all the one.I can get the output for tag,category and keyword search output as perfect but when i’m trying to add a new tag search dropdown it clashes with the tag search dropdown what we already have.Do you have any idea to resolve this issue.Here is my shortcode.

    <form id=”attachment-category-form” method=”post” action=”.”>

    <div class=”catlist”>
    <p>Category Search</p>
    [mla_term_list taxonomy=attachment_category mla_item_parameter=current_attachment_category mla_output=dropdown option_all_text=All option_all_value=all hierarchical=true show_count=true pad_counts=true use_filters=true mla_option_value=”{+slug+}”]</div>
    <p>Tag Search</p>
    <div class=”searchlist”><div class=”searchlist”>[mla_term_list taxonomy=attachment_tag mla_item_parameter=current_attachment_tag mla_output=dropdown option_all_text=All option_all_value=all hierarchical=true show_count=true pad_counts=true use_filters=true mla_option_value=”{+slug+}” mla_phrase_delimiter=’ ‘ mla_phrase_connector=’OR’]</div></div>
    <div class=”searchlist”><div class=”searchlist”>[mla_term_list taxonomy=attachment_tag mla_item_parameter=current_attachment_tag mla_output=dropdown option_all_text=All option_all_value=all hierarchical=true show_count=true pad_counts=true use_filters=true mla_option_value=”{+slug+}” mla_phrase_delimiter=’ ‘ mla_phrase_connector=’OR’]</div></div>
    <p>Keyword Search</p>
    <div class=”searchlist”>[muie_keyword_search mla_phrase_delimiter=’ ‘ mla_phrase_connector=’OR’]</div>

    <input id=”attachment-category-form-submit” name=”attachment_category_form_submit” type=”submit” value=”Search” />
    </form>

    [mla_gallery numberposts=6 add_filters_to=any mla_output=”paginate_links,prev_next” post_parent=all link=file post_mime_type=all option_all_value=all]
    [mla_gallery numberposts=6 add_filters_to=any mla_nolink_text=”No items match the current filter selections.” link=file post_parent=all option_all_value=all post_mime_type=all]

    Thanks for all your help

    Plugin Author David Lingren

    (@dglingren)

    Thanks for including the full source text of your form and galleries; very helpful.

    I entered your code in my test system and it is mostly working. The only problem I see is that if you select two different tag values in the two “tag search” dropdown controls the value displayed in the two controls is the same. Is that the “clash” you refer to?

    You wrote “matches with all the one“. In the current implementation, if you select two different tag values you will get all the items that that the first value OR the second value (OR both values). Is that what you want, or must the item be assigned to BOTH of the tag values?

    You can replace the two dropdown controls with a single “multiple select” control. That way, the user can select two (or more) values and see items assigned to one or more of the selected values. If you want to do that you must create a custom markup template; would you like to try that?

    Thread Starter trinitaa

    (@trinitaa)

    Hi,

    Thanks for your quick reply.Actually what i need is for example when i select testingmedia from one of the tag dropdown and select active from another tag dropdown the output only displays when it matches two tag dropdown values.I couldn’t use the multiselect option here,so is there is any checkbox option or dropbox option or something.Thanks for your help.

    Plugin Author David Lingren

    (@dglingren)

    Thanks for clarifying how you want your application to work. From a design standpoint, it seems to me that it would be better to have two separate taxonomies, one for “testing media” and one for “active”. However, I do not have enough knowledge of your entire application to have a strong position. Just a thought for other users who might read this topic in the future.

    That said, I have worked out a solution that will accomplish your goal. It requires a new MLA Development Version, an enhanced version of the MLA UI Elements Example plugin, a custom markup template and some changes to the shortcodes in your form.

    I have uploaded a new MLA Development Version dated 20161110 that includes the enhanced example plugin. You can follow the instructions in my earlier posts to install and activate the Development Version, then update the MLA UI Elements Example plugin.

    Once you have installed the Development Version and updated the example plugin you can create the custom markup template:

    1. Navigate to the Settings/Media Library Assistant Shortcodes tab.
    2. Click on the “Term List” view below the Search Templates text box.
    3. Hover over the “term-list-dropdown (default)” entry and click the “Copy” action link.
    4. When the page refreshes, hover over the “term-list-dropdown-copy” entry and click “Edit”.
    5. Change the template Name to “term-list-named”. This is the required name!
    6. Find the Open template section and change the name attribute from ” name=’tax_input[[+taxonomy+]][]’ ” to ” name='[+query:term_list_name+]’ “.
    7. Scroll to the bottom and click “Update”.

    Now you can go to the page containing the form and make some changes. I have copied the entire updated form text below. The changes are:

    1. In the two “search tags” shortcodes the mla_item_parameter= parameters have unique values.
    2. In the two “search tags” shortcodes the mla_phrase_delimiter= and mla_phrase_connector= parameters have been removed; they are not supported by [mla_term_list].
    3. In the two “search tags” shortcodes the mla_markup=term-list-named and term_list_name= parameters have been added. These trigger the new code in the example plugin to process multiple dropdown controls for the same taxonomy in a new way.
    4. In the two [mla_gallery] shortcodes I have added the tax_operator=AND parameter so items must have BOTH of the selected tag terms to be included in the display.
    
    <form id="attachment-category-form" method="post" action=".">
    <div class="catlist">
     <p>Category Search</p>
     [mla_term_list taxonomy=attachment_category mla_item_parameter=current_attachment_category mla_output=dropdown option_all_text=All option_all_value=all hierarchical=true show_count=true pad_counts=true use_filters=true mla_option_value="{+slug+}"]</div>
     <p>Tag Search</p>
     <div class="searchlist"><div class="searchlist">
     [mla_term_list taxonomy=attachment_tag mla_item_parameter=current_tag1 mla_output=dropdown option_all_text=All option_all_value=all show_count=true use_filters=true mla_option_value="{+slug+}" mla_markup=term-list-named term_list_name=tag1]
     </div></div>
     <div class="searchlist"><div class="searchlist">
     [mla_term_list taxonomy=attachment_tag mla_item_parameter=current_tag2 mla_output=dropdown option_all_text=All option_all_value=all show_count=true use_filters=true mla_option_value="{+slug+}" mla_markup=term-list-named term_list_name="tag2"]
     </div></div>
     <p>Keyword Search</p>
     <div class="searchlist">[muie_keyword_search mla_phrase_delimiter=' ' mla_phrase_connector='OR']</div>
    
     <input id="attachment-category-form-submit" name="attachment_category_form_submit" type="submit" value="Search" />
    </form>
    
    [mla_gallery numberposts=6 add_filters_to=any mla_output="paginate_links,prev_next" link=file post_parent=all post_mime_type=all option_all_value=all tax_operator=AND]
    [mla_gallery numberposts=6 add_filters_to=any mla_nolink_text="No items match the current filter selections." link=file post_parent=all post_mime_type=all option_all_value=all tax_operator=AND]
    

    It would be great if you can install the new Development Version, add the custom template, modify the form and let me know if this meets your requirements. Thanks for an interesting challenge!

    Plugin Author David Lingren

    (@dglingren)

    I have released MLA version 2.40, which contains the updated MLA UI Elements Example plugin.

    I am marking this topic resolved, but please update it if you have problems or further questions regarding the multi-tag filtering for [mla_gallery] solution outlined above.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Shortcode’ is closed to new replies.