• Resolved fabrizioarnone

    (@fabrizioarnone)


    Hi David,
    I love your plugin but I’m not able to resolve this issue due to my technical inability.

    In this page (the password to login is: akama) I’ve put a shortcode you give to another user.

    What I’ve obtained:
    – a Att_Tag and keyword research in a dedicated page (https://www.sipotra.it/prova-2/), good ??

    What I would like to obtain:
    – a Att_Tag and keyword research published in a page that already contains a MLA gallery (https://www.sipotra.it/governo-e-parlamento/) based on a Att_Category

    – the Att_Tags that are in the select option must be ONLY the ones assigned to PDFs of the Att_Category the gallery is based on

    – the research shortcode should not show any serp until the research is done, because under the research form there is the gallery of the given category

    – the serp of any research should show only PDFs of the given category

    Can you help me? please!

    Here is the code I use for the page /prova-2/:

    <form id=”attachment-category-form” method=”post” action=”.”>
    <p style=”margin-top:20px; margin-bottom:3px;”>
    Cerca in base alla fonte del documento:
    <div class=”searchlist”>
    [mla_term_list taxonomy=attachment_tag mla_output=dropdown use_filters=true option_all_text=All option_all_value=all show_count=true mla_option_value=”{+slug+}” mla_control_name=tag_dropdown mla_item_parameter=current_attachment_tag]
    </div>
    </p>
    <p style=”margin-top:20px; margin-bottom:3px;”>
    Cerca in base a una parola chiave
    <div class=”searchlist”>
    [muie_keyword_search mla_phrase_delimiter=’ ‘ mla_phrase_connector=’OR’]
    </div>
    </p>
    <input id=”attachment-category-form-submit” name=”attachment_category_form_submit” type=”submit” value=”Search” />
    </form>

    [mla_gallery numberposts=10 add_filters_to=any mla_output=”paginate_links,prev_next” post_parent=all post_mime_type=all option_all_value=all]
    [mla_gallery numberposts=10 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]

    thank you!!!

    The page I need help with: [log in to see the link]

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

    (@dglingren)

    Thanks for your question and especially for posting the details of your source text and links to the example pages; very helpful.

    I believe I understand your goal and I am confident that it can be accomplished, but it will require an additional small custom plugin. You wrote “the Att_Tags that are in the select option must be ONLY the ones assigned to PDFs of the Att_Category the gallery is based on“. Generating a list of only those tags assigned to the PDFs in a category will require a custom SQL database access to compile the list; thus the custom plugin. Also, the additional database access may have some performance issues depending on the size of your site. Are the possible performance impact and the requirement for a custom plugin acceptable?

    I assume the “Att. Category” the gallery is based on can be specified in the source text for the page. Is that acceptable?

    You wrote “he research shortcode should not show any serp until the research is done, because under the research form there is the gallery of the given category“. Does that mean that the gallery generated by the tag selection is in addition to the existing “gallery of the given category” on the page? In other words, is the search form and research shortcode gallery on the “Protetto: prova” page you provided intended to be shown above the existing gallery on the “Governo e Parlamento” page you give as an example?

    Any additional details you can provide will be helpful.

    I am traveling and away from my development system. I want to work out and test a solution before I suggest it to you. I will post an update in a couple of days when I have progress to report. Thanks for your understanding, your patience and your interest in the plugin.

    Thread Starter fabrizioarnone

    (@fabrizioarnone)

    … Generating a list of only those tags assigned to the PDFs in a category will require a custom SQL database access to compile the list; thus the custom plugin. Also, the additional database access may have some performance issues depending on the size of your site. Are the possible performance impact and the requirement for a custom plugin acceptable?

    Yes, the performance impact is acceptable. consider that the site is only dedicated to few dozens of person.

    In other words, is the search form and research shortcode gallery on the “Protetto: prova” page you provided intended to be shown above the existing gallery on the “Governo e Parlamento” page you give as an example?

    I would like to show the search form (in “prova” page) above the gallery (in “governo e parlamento” page). But when a user make a search I think that the user should see only the serp of the search and nothing else (not the gallery that he saw before the searc)

    I hope you’ll understand and sorry for my bad english

    here are two screenshot of what I would like to have…
    https://drive.google.com/open?id=1bFO3wAVLa3dMhvvNia6sQN4AsPew53kc
    https://drive.google.com/open?id=1HqsJyjrjfKdvz60XTO7oYF9MWNdWFODm

    if this requires an extra payment please feel free to let me know!

    Plugin Author David Lingren

    (@dglingren)

    Thanks for your update with the additional information and especially for the links to your annotated screen shots; very helpful. Thanks as well for your patience while I travelled and your offer for extra payment. I no longer accept donations for the plugin or support work; it is my gift to the WordPress community.

    I have been able to work out a solution along the lines you suggested. During my research I came across this earlier topic quite similar to yours:

    Only Show Tags from Specific Attachments in Specific Categories

    The solution for that topic included an enhancement to the core MLA code and did not require an additional custom plugin. I was able to extend the earlier work to meet your requirements, but it required a couple of additions to the MLA code and some enhancements to the “MLA UI Elements Example” plugin.

    I have uploaded a new MLA Development Version dated 20190330 that contains the changes required for your application. You can find step-by-step instructions for using the Development Version in this earlier topic:

    PHP Warning on media upload with Polylang

    Once the Development Version is installed you must update the example plugin to the latest version, 1.11. To update the example plugin, navigate to the Settings/Media library Assistant Documentation tab and click the “Example Plugins” button. Type “elements” in the text box and click “Search Plugins” to filter the table.

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

    Once the updates are installed you can change your form and shortcodes to something like this:

    <form id="attachment-category-form" method="post" action=".">
    <p style="margin-top:20px; margin-bottom:3px;">
    Cerca in base alla fonte del documento:
    <div class="searchlist">
    [mla_gallery attachment_category=page-1 mla_control_name=tag_dropdown mla_item_parameter=current_attachment_tag post_mime_type=application/pdf taxonomy=attachment_tag mla_output=dropdown use_filters=true option_all_text=All option_all_value=all show_count=true mla_option_value={+slug+} mla_alt_shortcode=mla_term_list]
    </div>
    </p>
    <p style="margin-top:20px; margin-bottom:3px;">
    Cerca in base a una parola chiave
    <div class="searchlist">
    [muie_keyword_search mla_phrase_delimiter=' ' mla_phrase_connector='OR']
    </div>
    </p>
    <input id="attachment-category-form-submit" name="attachment_category_form_submit" type="submit" value="Search" />
    </form>
    [mla_gallery attachment_category=page-1 numberposts=10 add_filters_to=any mla_output="paginate_links,prev_next" post_mime_type=application/pdf option_all_value=all]
    [mla_gallery attachment_category=page-1 numberposts=10 add_filters_to=any mla_nolink_text="No items match the current filter selections." link=file post_mime_type=application/pdf option_all_value=all]
    

    The changes I have made are:

    1. The first shortcode in the “searchlist” div is changed from [mla_term_list] to [mla_gallery]. This triggers the database query for the PDF documents that are assigned to a specified term.
    2. An mla_alt_shortcode=mla_term_list parameter has been added. This passes the items selected by the [mla_gallery] database query to [mla_term_list], which composes the dropdown control.
    3. An attachment_category=page-1 parameter has been added to select the items assigned to your “Att_Category the gallery is based on“. You must change page-1 (the term I used for my testing) to the slug value for the Att. Categories term you want to filter on.
    4. A post_mime_type=application/pdf parameter has been added to restrict the query to PDF documents only.

    In the two [mla_gallery] shortcodes for the gallery display and pagination controls I have made two additions:

    1. An attachment_category=page-1 parameter has been added to select the items assigned to your “Att_Category the gallery is based on“. You must change page-1 (the term I used for my testing) to the slug value for the Att. Categories term you want to filter on.
    2. A post_mime_type=application/pdf parameter has been added to restrict the query to PDF documents only.

    If you make the corresponding changes in your prova-2 test page you should get a good result.

    It would be great if you can install the Development Version and the updated example plugin and let me know if they work for you. I will leave this topic unresolved until I hear back from you. Thanks again for giving me an interesting opportunity to enhance MLA.

    Thread Starter fabrizioarnone

    (@fabrizioarnone)

    great!!!
    I need some days to test all your instruction and then be back to you!

    Please leave this topic open untill that

    thank you very very much!!!

    Plugin Author David Lingren

    (@dglingren)

    It has been a month since the last post in this topic.

    I am marking the topic resolved, but please update it if you have any problems or further questions regarding the above solutions. Thanks for inspiring these MLA enhancements.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Search solution’ is closed to new replies.