Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It looks like the fieldset realm was not yet updated to Drupal 7? There is no form_alter or other code, and the widget is missing.
Comment | File | Size | Author |
---|---|---|---|
#12 | faceted_forms.tgz | 6.25 KB | phenaproxima |
#1 | 1132744-1.patch | 709 bytes | pwolanin |
Comments
Comment #1
pwolanin CreditAttribution: pwolanin commentedFor now commenting out that realm to avoid user confusion.
Comment #2
cpliakas CreditAttribution: cpliakas commentedAssigning to myself for re-integration. Will create a feature branch for this task.
Comment #3
cpliakas CreditAttribution: cpliakas commentedComment #4
cpliakas CreditAttribution: cpliakas commentedThis task is dependent on the issue posted at #1176814: Re-implement the widget requirements system.
Comment #5
pwolanin CreditAttribution: pwolanin commentedThe google date-range widget is pretty close to the non-JS fallback I started implementing for a general range filter here: http://drupal.org/sandbox/cpliakas/1160920
One might even imagine a slider for limiting e.g. at most X days ago
In any case, replication the google format of the date wiget ought to be pretty easy, and that's potentially something that could be used in the fieldset/form pre-search as well as after a search. On thing google doesn't have there which would be cool is to do facet queries and actually show the # of results in each of the options.
Comment #6
cpliakas CreditAttribution: cpliakas commentedSounds good. Posting comment over to #830654: Implement a date widget for custom date ranges, because I think the date range topic is more relevant to that thread.
Comment #7
cpliakas CreditAttribution: cpliakas commentedWebchick says jump, I say "how high?". http://www.webchick.net/node/89
Comment #8
cpliakas CreditAttribution: cpliakas commentedI am moving this out of being a D7 stable release blocker. I'm not sure how useful this is anyways, and it could be implemented as a contrib anyways.
Comment #9
cpliakas CreditAttribution: cpliakas commentedForgot to remove tag.
Comment #10
cpliakas CreditAttribution: cpliakas commentedAdding to the Contrib component, which means that I am looking for this functionality to be added outside of this module in a separate contrib.
Comment #11
cpliakas CreditAttribution: cpliakas commentedChanging to a feature request.
Comment #12
phenaproximaHi,
I'm not sure if this is the right place to contribute this, but I needed to create this module for a client - it creates a "Form" realm for Facet API (which is a killer module, by the way). This realm integrates with apachesolr_search and presents the facets for any Solr search page as a single, unified form, which can be retrieved by something like:
drupal_get_form('faceted_forms_page', $search_page_object);
The module provides a single Facet API widget, called "Checkbox(es)", which presents a facet as either a single on/off checkbox (if the facet is boolean), or a set of checkboxes (if it's multiple values). It also exposes a block ("Selected Facets") which will display a list of currently selected facets as they are selected, and allow the user to remove facets by clicking on their names in the list.
You can see the module in action here: http://phi.dl-dev.com/advanced-search. I really dig Facet API, and I'm pleased to be able to contribute something back. I hope you find this useful.
Cheers,
-phen
Comment #13
phenaproximaAmending #12 - it looks like Facet API does not actually support widget ordering, which is weird because the Form realm I implemented in my proof-of-concept module above allows sorting (which is an option when defining a new facet realm). To fix, edit
facetapi/plugins/facetapi/adapter.inc
. Change the code at line 1298 from this:to this:
...and voila! Sorting works.
Comment #14
mansspams CreditAttribution: mansspams commented@phenaproxima
This is extremely useful. I am trying to adapt your example code to searchapi, yours has dependency on apache solr. Do you have any new/updated code? Is there any chance you could help me make this more backend agnostic?
Comment #15
phenaproximaUnfortunately I have not had cause to update it yet - I originally wrote it for use on a client's site, and they were using apachesolr instead of Search API. I have recently fallen head-over-heels in love with Search API, though, and prefer it greatly over apachesolr. So there is a good chance that, should I need to employ my module again, I'll adapt it to work with Search API. I'll certainly post the results here when/if I do.
In the meantime, I don't really know Facet API's internals all that well -- the dependence on apachesolr was really just a result of flailing. So I'd be interested to see what you come up with in terms of adapting my code for other backends! :)
Comment #16
mansspams CreditAttribution: mansspams commentedIt's all right, I think I have a working prototype half way there with help of you, facetapi code and http://www.trellon.com/content/blog/apachesolr-and-facetapi, will share. Anyone else interested in this issue?
Comment #17
vikramy CreditAttribution: vikramy commentedYes. I am interested in this and can help in testing it.
Thanks
Comment #18
volfr CreditAttribution: volfr commentedHello! Perhaps someone knows how to make correct the module for current version FacetAPI? Around the world found only that module. Help please and thanks in advance. Sorry for my bad Eng.
PS
Drupal 7
Comment #19
volfr CreditAttribution: volfr commented