I want to combine the filters so they are anded together in the filter screen for the biblio module. I also want to add Checkboxes for biblio types in the search screen. I also want to add a free text search term field at the top. So when you click the button all your search data is added together. I have attached a screen shot of what I want it to look like. Can anyone please give me an idea of whether this functionality has already been implemented and if not where to start with implementing it? Thanks.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rjerome’s picture

This is what I would call the "Advanced Search" page, which is a good idea which, like many others, I've been meaning to implement but haven't had time yet.

I'm not sure where you "Research Area" list box is being populated from, but you can achieve most everything else with existing filters and searches.

There is a "Search" box which you can turn on on the admin/settings/biblio page under the "Search" fieldset.

Then you can build filters which combine (AND) multiple fields by visiting the filter tab multiple times and adding additional fields and clicking the "Refine" button.

I agree it's a bit of pain, but you should be able to achieve what you want.

I'm kind of in the process of reworking the query builder (which will directly affect these sorts of features) so I'm reluctant to put a lot of effort into this right now until that is done. I'll see if I can't move the "Advanced Search" feature up the todo list a bit once the query builder is done.

rjerome’s picture

I guess I should add... if you do want to get your fingers into the code (this assumes you are somewhat familiar with the Drupal FormsAPI), then you would have to write a function that displays the form you described, then I would link that to a new "tab" beside the existing "Year * Title * Type * Author" tabs. Then in the submit handler for this form, you would gather the data and craft a call to biblio_db_search() (in biblio.pages.inc) which would in turn call biblio_build_query() , then biblio_show_results(). The call to biblio_db_search() would have to have arguments like...

 biblio_db_search('author',42,'keyword','bla', 'type', 100);

which would get you all the entries by authorID=42 with keyword=bla that are of type book (the type has to be the integer value).

Now if you start digging into the build_query() function, you'll quickly realize why I'm reworking it :-)

Let me know if you do implement this so we don't duplicate our efforts.

Cheers,

Ron.

scarer’s picture

Thanks for the info Ron. I think I'm going to build a custom module that's just an add on at the moment that provides the user with a customised search screen with the above mentioned criteria. So it might not necessarily suit everyone's needs. It's just an add on to biblio as a quick implementation as I'm under the clock unfortunately. I will post up the module when it's completed. Thanks again for all your handy hints.

rjerome’s picture

OK, Let me know how it turns out. Again, be forewarned that the biblio_query_builder interface is likely to change in the not to distant future, so it may impact your work. I'll let you know if I do anything that's likely to break what you are doing.

Ron.

scarer’s picture

FileSize
12 KB

this is the module i ended up creating. it is customised though with a cck field and some stuff with custom biblio type i have created so i don't know how useful it will be for anyone. maybe some of the code might be re-usable.

if i had more time it could be extended to be more flexible with cck instead of statically referencing the cck reference to the research area (research project). This could either be done by finding what the CCK fields are that are attached to the node and using them as selection fields. Another nice expansion would be the addition of an administraion panel within Drupal that allows the site administrator to select which cck fields attached to the biblio type are to be used for searching.

scarer’s picture

i'm now going to work on integrating it with the biblio module as i have a bit more time on my hands

scarer’s picture

FileSize
191.52 KB

here's a modified version of the biblio module that adds an advanced search tab. i had to do this within a tight time frame and also with a strict interface design. might help someone out if they are looking to add an advanced search function.

scarer’s picture

FileSize
14.51 KB

here's a modified version of the stand alone module that adds a block that includes a basic search and an advanced search that can be inserted on any page. it works with the most recent version of the biblio module.

rjerome’s picture

Thanks Sarah,

I'll review this and possibly include it with distribution if that's OK with you.

Ron.

scarer’s picture

Hey Ron,

No problem. Keep in mind it's custom built with specs for client and was done as quick as possible.

Cheers,

Sarah

scarer’s picture

FileSize
14.51 KB

Also I added a new box to this version in the advanced search to select all publication types - this is the stand alone version 'bibliosearch'.

techczech’s picture

I was able to replicate most of what is asked for in the screenshot above with views: http://dominiklukes.net/bibliography.

The only downside is that the search results don't display filtered export links. But the nice thing about the views approach is flexibility. For instance, on this site, I don't need a search by author, so I don't include the filter. Also, I opted for multiselect but a pull-down menu or even an autocomplete search on many fields would have been just as easily accomplished.

rjerome’s picture

Hi Dominik,

Fear not, the export links are coming... along with all the existing functionality, at which point Biblio 6.2 will be born using only Views for query building and display formatting.

Ron.

scarer’s picture

FileSize
14.85 KB
scarer’s picture

FileSize
16.06 KB

here's an update on this

scarer’s picture

Title: combining filters on search screen and adding search terms to search » update on last posted version
FileSize
272.14 KB

here's the latest snap shot.

Aren Cambre’s picture

rjerome’s picture

I don't think it does. This adds an advanced search form, which I was supposed to integrate into the code, but regrettably I haven't done yet.

Aren Cambre’s picture

Status: Active » Closed (duplicate)

I am going to be bold and mark as duplicate of #682044: Support fields (CCK) in D7 Bibliography Module. Fields (CCK) integration would allow use of existing advanced search functionality already built into views and other modules.

mitch albert’s picture

i cant get this module to work, block doesnt show up :(

biblio module 6.x-2.0-beta3