Matthias Vandermaesen

Colada

Tales in web development written by Matthias Vandermaesen

An introduction to the ctools modal API

So, I finally did a first screencast with my new gear. Over the past few months, I had to implement a so called 'modal' pop-up on occasion. These popups are used for instant actions: login forms, selecting stuff, etc. without reloading the entire page. The Chaos Tools suite contains a nice Modal API subset. Instead of using all kinds of 3rd party Javascript/CSS libraries, it's more practical to rely on CTools to get a popup. In fact, it's the same API used to create those fancy popup's you see when using Panels or the Panels In-Place Editor.

The agony of choice

Not so long ago, the toolbelt of any web developer was limited. Building for the web wasn't a very complicated affair. With a good understanding of PHP, HTML, CSS and Javascript, one could tackle most problems. The web wasn't a hard place to understand as the concept of a "website" entailed a collection of interlinked hypertext documents. Of course, there were the obvious frustrations with browsers and standards and most developers had there own idiosyncracies when it came to writing code. But the knowledge of a single developer encompassed all he needed to build an entire production ready website.

Bending Drupal Commerce add to cart form

The other day, I had to tweak the "Add to cart" feature which comes out of the box with Drupal Commerce. Adding and tweaking features in Commerce can be a bit daunting. The package contains a fully fledged API with several subsystems to handle orders, products, checkout,... It's easy to get lost if you are new. This article explores this use case and the particularities I had to go through.

WordPress, Mollom and Me

Back in the mid-naughties, blogs came under heavy attack from comment spammers. It was a blog authors' nightmare. Before long, your well gardened blog would become filled with comments promoting enhancing medicine and what-not. Spammers use the generated links to get a higher indexing rating from searchbots in an effort to maximize their margins. At the time, there were only a few solutions like primitive CAPTCHA's and their ilk. Then, Automattic introduced Akismet. This centralized service analyses content and tells you whether it's spam or not. Soon, WordPress core shipped with an Akismet plugin.

Template suggestions and Panels panes

Although it comes with a steep learning curve, Drupal's Theme API is a wonderful piece of engineering. Once you master the basics of theming functions, templates and their preprocessors and how to wield them in your own custom theme, you're golden. Template suggestions are a particular feature that might require a while before you can wrap your head around them. In this article, I'll explore the basic concepts behind them and I'll take it up a notch by showing you how to use them in combination with Panels.

Taming FacetAPI Paths

While we were working on one of our upcoming projects, a new website for Stichting tegen Kanker, we had to integrate the Apache Solr module. We needed Solr for its faceted search capabilities. In combination with the FacetAPI module, which allows you to easily configure a block or a pane with facet links, we created a page displaying search results containing contact type content and a facets block on the left hand side to narrow down those results.