CCK

Understanding the ApacheSolr CCK API

In this article I will show you how you can write a tiny bit of code that will reveal new fields and facets for searching with the ApacheSolr module and Acquia Search. Using Acquia Drupal we’ll write an example module that takes the file type from CCK file and image fields and makes them into their own search fields. This results in us being able to filter our search results based on file type. This code fulfils the situation where you want, for example, to find a specific post that has a JPEG image, or all of the posts with PDFs that match a particular keyword.

The making of RobsHouse.net

I’ve relaunched RobsHouse.net on Drupal 5, yay! It was about time, too. For years it was running on a 4.6 Drupal (Civicspace, actually), and I had done nothing but break it more and more over the years. Thank goodness nobody could see the watchdog messages… PHP errors galore and just about everything else wrong as well. This site, however, is a different beast. While it is not comparable in complexity to some of the large media sites that are being launched on Drupal these days, it’s a pretty good effort for one guy over a long weekend. I’m using 54 custom modules on this site! Click here to see the full list. More details after the break.

CCK Taxonomy Fields, a new module

With a bit of last-minute help from Eaton I pushed my new cck_taxonomy module out the door. It is very similar to the Content Taxonomy module, and might be a totally duplicated effort, but that module has some subtle bugs and is big and I couldn't be bothered to understand the code, so I wrote my own, and learned a ton along the way.

What does it do? For every taxonomy vocabulary (except freetagging... that's coming later), you now have a new field type to add to content types. So on my site that I'm building I have an Instrument vocabulary (horn, violin, tuba....), and when I go to "add field" I can add an Instrument field. But I can rename it, and I can add more than one if I want. Plus I can override some of the configuration from the vocabulary (required and description), so they can be individualized.

Syndicate content