CVS edit link for mikeker

I wish to contribute a new module to drupal.org. This module, Better Exposed Filters, provides an easy way to use checkboxes or radio buttons for exposed Views filters. This is a common request in the support forums, the Views issue queue and a Views 3.0 feature request. However, there is no satisfactory solution.

When this module is enabled, each exposed filter is given a "Display exposed filter as" option allow the user to select the default (select box) or a checkbox/radio button option. Checkboxes or radio buttons, depending on the "force single" setting, replace the standard single/multi-select box.

The module in its current form passes the Coder code review checklist with only two minor warnings.

Thank you for your time and consideration.

- Mike

CommentFileSizeAuthor
#7 bef.tar_.gz2.27 KBmikeker
#1 better_exposed_filters.zip2.49 KBmikeker

Comments

mikeker’s picture

Status: Postponed (maintainer needs more info) » Needs review
Issue tags: +checkboxes, +views exposed filters
StatusFileSize
new2.49 KB

Attaching the module.

mikeker’s picture

Sorry, just realized I'm not supposed to change the Tags field...

avpaderno’s picture

Issue tags: +Module review

There is a module that has the same purpose: http://drupal.org/project/views_filter_pack.

mikeker’s picture

It has a similar purpose to VFP, however it takes a completely different approach to solving the problem (theming vs. rewriting SQL). I have entered bugs against VFP, but there hasn't been any work on that project in the last three months. In addition, VFP generates incorrect SQL.

I understand that the CVS application guidelines discourage duplication and that it is preferred to fix similar existing modules than to creating new ones. However, because VFP takes such a vastly different approach patching or co-maintaining that module is not an option.

I don't believe this is a case of "Module 'Foo' is just too complex so I have written a much simpler version." That guidance is written from the perspective of the UI. The difference between VFP and this module is in the code. With all due respect to Peter Boeren, VFP's author, his solution -- to rewrite the already-complicated SQL from Views -- is fraught with peril. I believe allowing the theme layer to handle this problem is a more sustainable and simple solution.

Thank you for your consideration

- Mike

avpaderno’s picture

Thanks for the reply.

The difference between the modules seems very important, IMO. Altering the way the page is themed is the better solution, in this case. I agree that altering the SQL query made from Views is not required, when the purpose is simply to alter a form field.

merlinofchaos’s picture

I agree with Kiam. A different methodology is generally an acceptable grounds for duplication.

mikeker’s picture

StatusFileSize
new2.27 KB

This one properly handles exposed taxonomy filters. Let me know if you'd prefer this as a patch to the original upload...

Thanks.

- Mike

DanielJohnston’s picture

Subscribing, apologies for comment spam. FWIW, I agree that this module seems like a more elegant and stable solution to exposing a checkbox filter in Views.

avpaderno’s picture

Status: Needs review » Fixed

I apologize if I didn't approved before this application.

@mikeker: Welcome on board!

DanielJohnston’s picture

Status: Fixed » Needs review

Quick question: I've installed the module in #7 and created a view with an exposed filter selecting on node type. Can't find the "Display exposed filter as" setting anywhere in the view edit screen. Don't know if I've hit a bug, if there's something deliberately missing in this version, or if I'm just looking in the wrong place. Displaying as node teasers rather than fields, and I'm on Views 2.6. Happy to post an export of the view in question or a screenshot if that's any help. Can also hold back until after publishing and post as an issue then if you'd prefer.

DanielJohnston’s picture

Status: Needs review » Fixed

Oops. Didn't mean to change status!

mikeker’s picture

DanielJohnston@10: Glad to see folks are already using this! Node type is already formatted as a set of checkboxes so I don't expose the "Display exposed filter as" option.

Now that I've got CVS access (thanks KiamLaLuno!) I'll post this as a project. If you still feel node type should have the display options presented we should discuss it there.

Thanks.

- Mike

Status: Fixed » Closed (fixed)
Issue tags: -Module review

Automatically closed -- issue fixed for 2 weeks with no activity.

mikeker’s picture

Component: Miscellaneous » new project application
Issue summary: View changes
Issue tags: -Module review

Not sure why the 'bot replaced a tag that had been removed... Removing it again.