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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

FileSize
709 bytes

For now commenting out that realm to avoid user confusion.

cpliakas’s picture

Assigned: Unassigned » cpliakas

Assigning to myself for re-integration. Will create a feature branch for this task.

cpliakas’s picture

Priority: Normal » Major
cpliakas’s picture

This task is dependent on the issue posted at #1176814: Re-implement the widget requirements system.

pwolanin’s picture

The 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.

cpliakas’s picture

Sounds 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.

cpliakas’s picture

Webchick says jump, I say "how high?". http://www.webchick.net/node/89

cpliakas’s picture

Priority: Major » Normal

I 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.

cpliakas’s picture

Forgot to remove tag.

cpliakas’s picture

Component: Code » Contrib

Adding to the Contrib component, which means that I am looking for this functionality to be added outside of this module in a separate contrib.

cpliakas’s picture

Category: task » feature

Changing to a feature request.

phenaproxima’s picture

FileSize
6.25 KB

Hi,

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

phenaproxima’s picture

Amending #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:

    if (!$build[$this['field alias']]) {
      unset($build[$this['field alias']]);
    }

to this:

    if ($build[$this['field alias']]) {
      if ($realm['sortable']) {
        $build['#weight'] = $settings->settings['weight'];
      }
    }
    else {
      unset($build[$this['field alias']]);
    }

...and voila! Sorting works.

mansspams’s picture

@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?

phenaproxima’s picture

Unfortunately 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! :)

mansspams’s picture

It'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?

vikramy’s picture

Yes. I am interested in this and can help in testing it.
Thanks

volfr’s picture

Hello! 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

volfr’s picture