Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter krakra

    (@krakra)

    One last thing that seems to be an issue with the checkboxes. In core.php line 15 the operator used is IN. This somehow was working as an AND until I tested it some more and now it seems to be some sort of a hybrid where the checkboxes and lists are both showing the correct selection however the checkboxes still act as an OR. After changing core.php line 15 to AND the checkboxes do act as an AND.

    However if I select a parent category it will show no results even that there are posts both set for it and its children categories. In the case of the IN operator selecting the parent category alone was showing the correct result, however it was not acting as an AND operator.

    Strangely enough the lists still work as expected!

    Any ideas how to fix this?

    Thread Starter krakra

    (@krakra)

    Thanks to everybody for the input. I changed

    walkers.php line 171 from , to +
    core.php line 242 from , to +
    Util.php line 103 from , to +

    and the checkboxes seem to be using AND now.

    Jason: The site looks great! What other changes did you make and how did you go about implementing Ajax?

    scribu: I think if you can implement AND/OR selection on per widget basis it will make the plugin really powerful. For example you add the widget in the backend and it has an option which taxonomy to use(currently implemented) but also which operator(AND/OR). This way you can add multiple widgets on different taxonomies and have a really powerful and flexible search!

    Also, I noticed the listbox shows the counts not per taxonomy but per result basis. So if I have 3 posts in a category, and I update the selection to show 2 posts from a different category, the category count will read 2 next to the selected categories but 0 next to all other categories in the list.

    Thread Starter krakra

    (@krakra)

    Ok this makes sense. Actually I need all in many which I think is what this plugin is intended for. However the checkboxes and list view are using different operators. Checkboxes use OR and lists use AND. This actually seems to be a bug. With the modification that I made I basically forced both of the views to use OR. I need to use AND, so thanks for pointing this out!

    However If you add two widgets on the page one with checkboxes and one with lists based on the same criteria say Categories you will see that they don’t reflect the Category selection the same way. They should use the same operator and both show the correct category selection!

    I think other people have made the observation already as well, can somebody else confirm this to be a bug?

    Thread Starter krakra

    (@krakra)

    Ok, it seems to be working as expected after making the following changes

    Walkers.php line 41 and 84 change + to ,
    Core.php line 246 chahge + to ,

    Can somebody please give additional information on why this was set differently before as it would be too obvious to be a bug.

    Any other changes that I missed?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)