hjerem
Forum Replies Created
-
Forum: Plugins
In reply to: [Media Library Assistant] Pagination brokenThanks for this quick answer !
I found the error myself, you are right! It’s sad I didn’t see it before…
I sent you an email with few questions, did you receive it ?- This reply was modified 7 years, 11 months ago by hjerem.
Forum: Plugins
In reply to: [Media Library Assistant] IPTC & EXIF Processing & Att. CategoriesIt’s working now, thanks David ! ??
Forum: Plugins
In reply to: [Media Library Assistant] IPTC & EXIF Processing & Att. CategoriesIt would be great if you can install the Development Version and let me know how it works for you.
Unfortunately, it’s not working, att. caterogies are still created even if they exist. In which file is this code located ? How do you perform search ?
- This reply was modified 7 years, 12 months ago by hjerem.
Forum: Plugins
In reply to: [Map Multi Marker] Recherche parmi les marqueursJe vais la développer de mon c?té dans ce cas, directement dans ton plugin.
Forum: Plugins
In reply to: [Media Library Assistant] IPTC & EXIF Processing & Att. CategoriesAs you discovered, WordPress hierarchical taxonomies allow terms with the same name/label to appear as root terms or child terms. You could change your mapping rule and set the parent to “Height”, but then ALL of the IPTC Keywords would become child terms of the Height parent. As I recall, you have other parent/child relationships mixed in as Keyword values; is that right?
That’s right.
If all of your Keywords are unique, a workable solution would be to first search the taxonomy for an existing term with a matching name and use it if it exists. If not, the new term could be added as a root term or, perhaps, under the term you set in the Parent field in the mapping rule. This would require some PHP code that intercepts the hooks provided by the MLA mapping process.
Let me know if my assumptions are correct and if the PHP/hooks solution would work for you.
This solution seems perfect to me ! ??
Thanks.
Forum: Plugins
In reply to: [Media Library Assistant] Use of wptexturize produces broken links and pathsno one has ever noticed this problem until your report
This is strange than no one has ever got this problem because it breaks almost all links, paths and file name for me.
You’re welcome ! That’s the least I can do for your continued support.
What I would like to see is the mla_markup=custom-term-list-checklist template used in your first [mla_term_list] shortcode.
<[+itemtag+] id='[+selector+]' class='term-list term-list-checklist term-list-taxonomy-[+taxonomy+]'> <[+termtag+] class='term-list-term term-list-checklist-term level-[+current_level+] [+popular+]' id='[+termtag_id+]'> <input name='tax_input[[+taxonomy+]][]' id='in-[+taxonomy+]-[+thevalue+]' type='checkbox' value='[+thevalue+]' [+selected+]> <label class='selectit' for='in-[+taxonomy+]-[+thevalue+]'> [+thelabel+] </label> [+children+] </[+termtag+]> </[+itemtag+]>
Have you tried removing the two dropdowns to see if the checklist works without them? You can just change the shortcode name to disable them without losing the content, e.g., [xmla_term_list … ].
Thanks for the tips, I tried and checklist is working fine. In fact, each filter works fine on their own. They also work fine when all combined. The only problem is when I don’t select a value for one filter, then search is broken and displays 0 results. I would like to make all filters optional. To be clear, if a dropdown is set on “All” or if no item is selected in checklist, they should be ignored for the search. And this is this behavior that I’m not able to reproduce.
You said this behavior was working for you right ? If so, what’s the
value
of the select for theoption
“All” ? Because for me it’s likevalue="all"
and this is the reason why the search is broken.I found that if I change this:
option_all_value=all
by this:
option_all_value=0
It’s working as expected. Can you please make some test ? I don’t understand why is it working for you. But to make this work (
option_all_value=0
taken into account), I needed to change this line inclass-mla-shortcode-support.php
line 3518:
'slug' => sanitize_title( $arguments['option_all_text'] ),
by this:
'slug' => sanitize_title( $arguments['option_all_value'] ),
Otherwise, since my dropdown take
slug
value, it doesn’t take the value ofoption_all_value
parameter, no matter what value I put it in.I hope I am clear.
Thanks for all.
- This reply was modified 8 years ago by hjerem.
I copied your text into my system and it is working for me. I do not have your mla_markup=custom-term-list-checklist custom template, so the problem may be somewhere in the template. Also, I added the ,raw format code to the attachment_tag parameter.
Can you post the source text of your custom template?
When I remove parameter, not working either, but here it is:
<[+itemtag+] class='gallery-item [+last_in_row+]'> <[+icontag+] class='gallery-icon [+orientation+]'> <figure> [+thumbnail_content+] <figcaption> <div> <a href='[+downloadlink_url+]' title='Télécharger'> <i class="fa fa-download" aria-hidden="true"></i> </a> <a class='base-image-magnific-popup' href='[+file_url+]' data-rel='magnific-base-image' title='[+parent_title+]' data-file-name='[+file+]'> <i class="fa fa-search-plus" aria-hidden="true"></i> </a> </div> </figcaption> </figure> </[+icontag+]> <p>[+parent_title+]</p> <p><i class="fa fa-arrows-h" aria-hidden="true"></i> [+width+] x <i class="fa fa-arrows-v" aria-hidden="true"></i> [+height+] px</p> <label style='cursor:pointer;'> <input type="checkbox" class="base-image-checkbox" value="checkbox1"> Sélectionner cette image </label> </[+itemtag+]>
You might also try removing the mla_control_name=tag1 and mla_item_parameter=current_tag1 parameters from your first [mla_term_list] shortcode. I discovered that multiple selection is not working when mla_control_name is present.
Done, not working. If I let the two dropdown unselected (All value selected), can’t get at least 1 result.
That’s strange it’s working on your system. Doesmla_debug=true
will help ?Sure.
Thanks for your patience. You are helping me in a totally free way.<form id="mla-search-form" action="." method="post"> <strong>Tags</strong> <div> [mla_term_list mla_output=checklist use_filters=true taxonomy=attachment_tag mla_markup=custom-term-list-checklist exclude="1412,1397,1519,1398,1395,1455,1461,1389,1390,1456,1407,1431,1409,1434,1377,1378,1426,1379,1403,1485,1448,1449,1438,1436,1454,1444" show_count=true mla_option_value="{+slug+}" hierarchical=false mla_control_name=tag1 mla_item_parameter=current_tag1] </div> <div> [mla_term_list mla_output=dropdown use_filters=true taxonomy=attachment_tag include="1412,1397,1519,1398,1395,1455,1461,1389,1390,1456,1407" option_all_text="Toutes les couleurs" option_all_value=all show_count=true mla_option_value="{+slug+}" mla_control_name=tag2 mla_item_parameter=current_tag2] </div> <div> [mla_term_list mla_output=dropdown use_filters=true taxonomy=attachment_tag include="1431,1409,1434,1377,1378,1426,1379,1403,1485,1448,1449,1438,1436,1454,1444" option_all_text="Toutes les hauteurs" option_all_value=all show_count=true mla_option_value="{+slug+}" mla_control_name=tag3 mla_item_parameter=current_tag3] </div> <input id="reset" name="reset" type="reset" value="Effacer" /><input id="submit" name="submit" style="float:right;" type="submit" value="Rechercher" /> </form> <h3>Résultats</h3> [mla_gallery] attachment_tag="{+template:({+request:tax_input.attachment_tag+}|no-term-selected)+}" tax_operator=AND mla_markup=custom-gallery link=download mla_nolink_text="Aucun résultat." [/mla_gallery] <input id="base-image-download" style="float: right;" type="button" value="Télécharger les images sélectionnées" /><input id="base-image-clear" style="float: left;" type="button" value="Désélectionner tout" />
Are you using that example plugin?
Yes I am. In fact,
use_filters=true
wouldn’t work if I didn’t installed plugin right ?First, I did some testing and found that the exclude parameter interacts with the hierarchical parameter in a way I did not anticipate. Since the hierarchical parameter defaults to “true” the exclude parameter is ignored. You can fix this problem in either of two ways: 1) change exclude to exclude_tree, or 2) add hierarchical=false to your shortcode.
It’s working as expected now, thanks.
Second, you wrote “when I change value for dropdown and click on Search, it doesn’t work because it shows me 0 results” This may be because your term contains accented characters.
I don’t have accent in my term names, but I figured out the problem. When I select “All” in dropdown values, it breaks the search (query) because I always have 0 results even if I select a term in
mla_term_list
. I want the filters to be optional, how to do that ?
I searched documentation for theoption_all_value
because I think it’s what I am looking for but there is no info on that plus it’s already defined asoption_all_value=all
which should do what I want right ?I regret the inconvenience caused by my oversights; thanks for your understanding.
The inconvenience ? You are helping me a lot, thanks ??
P.S.
Also, I had a problem with wp_texturize, used a lot in your plugin, I removed it in some of the files of the plugin. I will explain it in another post when I have time.Perfect ! Thanks.
It’s absolutely what I was looking for.
However, there is a problem with your code, I tried it and when I change value for dropdown and click on Search, it doesn’t work because it shows me 0 results (whereas there are for sure because the number of elements corresponding to the tags seleccted in dropdown is displayed higher than 0).Any idea ?
Thanks.Edit:
And I just noticed that tags id inexclude
parameter are not excluded frommla_term_list
, is it working for you ?- This reply was modified 8 years ago by hjerem.
Hi,
tax_operator=AND
was what I was looking for, thanks a lot and sorry for not finding myself…
I think I will have more questions in the future but I will open a new topic.
Thanks for your help.After reading documentation I succeed to do it:
<form id="mla-text-form" action="." method="post" class="row"> <strong>Att. Tags</strong> [mla_term_list taxonomy=attachment_tag mla_output=dropdown mla_option_value="{+slug+}" show_count=true pad_counts=false ] <input id="text-form-submit" name="text_form_submit" type="submit" value="Search" /> </form> <h3>Gallery</h3> [mla_gallery] attachment_tag="{+template:({+request:tax_input.attachment_tag+}|no-term-selected)+}" [/mla_gallery]