20 APIs in 20 Days: The Hooks API and Custom Modules

Apr
01

This post is an entry in our 20 APIs in 20 Days series. Learn more about how best practices lead to sustainable development at www.trellon.com.

Ask someone what a 'hook' is, and their answer can tell you quite a lot about the person. The word gets used to describe things related to pirates, music, characters in campfire stories, aeronautics, etc. The word also has a specific meaning in programming, however, and serves as an important structural concept in most modern programming languages and frameworks.

Most Drupal developers are well acquainted with Drupal's hook system. Hooks are triggers that operate when certain events occur in the page generation process. They are capable of modifying data while it is being processed and carrying out other actions in response to certain conditions. Some of the more common hooks operate when a node loads, when a form is generated, or when someone saves user information. This part of the 20 APIs in 20 Days series provides an overview of the nature of hooks and how they operate as the foundation of most custom modules. Read More >>>

20 APIs in 20 Days: Using CCK to Create New Field Types

Mar
31

This post is an entry in our 20 APIs in 20 Days series. Learn more about how best practices lead to sustainable development at www.trellon.com.

CCK is the most important acronym you need to know in relation to content management in Drupal. It stands for Content Construction Kit and is the framework that allows people to enter all kinds of different information in their web sites. Read More >>>

20 APIs in 20 Days

Mar
29

So, you can put out a passable brochure site in a day and have reached the point where you want to learn a little more about Drupal. You're not looking to become an elite hacker type, you just want to be able to do something beyond pointing and clicking your way through site building.

But where to start? Between all the books, DVDs, blogs, forums, IRC channels, YouTube videos, meetups and self-proclaimed 'ninjas' spouting off and vying for your attention, figuring out where to spend your time and hard earned dollars can be a challenge. Different people have different ways of learning, and there are some people who are going to find all this stuff useful at some level.

But instead of going down the road of 'educational materials' written 'for the rest of us', you may want to use your time doing some self-directed learning about APIs (or Application Programming Interfaces). These are the tools people tend to use to solve problems in Drupal, and they can apply to a wide range of challenges developers are going to face. Even if you do not consider yourself to be a programmer, you may want to understand what they are all about. Knowing what they are and when to apply them is often the difference between a good Drupal site and a great one.

20 APIs in 20 Days is a blog series published by Trellon, aimed at sharing a little bit of information about module interfaces every good developer should know at least a little bit about. We don't intend to publish information in 20 sequential calendar days, but do plan on spending 20 days going over something important you may find useful to know. So don't give us a hard time when we forget to hit 'publish' a couple days in a row - it's going to happen, Trellonauts tend to be very busy people. Read More >>>

Trellon Launches Scribd View Module

Nov
17
By Campbell Vertesi | Filed Under: Drupal, modules, product

PDFs have historically been difficult to integrate into Drupal. Site owners were forced to include PDFs as attachments to content, and accept the interruption to the site layout that the external plugin presented. Building on the excellent Scribd API, our new module allows PDFs to be displayed on your site without the Adobe Reader plugin. Scribd Field integrates with the well-supported Filefield module, and allows you to integrate your PDFs into the look and feel of the rest of your site. Read More >>>

Creating Templates with the Interface Module

Sep
15

The forms Drupal automatically generates have always suffered from the 'silo' effect, where one form field is stacked on top of the other. This often presents a usability challenge for people operating the system, and generally requires some additional level of theming for developers in a really mature site.

Trellon recently released the interface module for Drupal, which is a stab at making it easier to change the look and feel of forms. Interface is a tool for authoring the interface for forms in Drupal by dragging and dropping form fields into predefined regions. This is one of those things you might need to see to see to understand - we have videos demonstrating the module at work.

These regions, the places on the page where you drop form fields, are put into something called a template. This article seeks to explain what a template file is and how to author your own. Our team has put a lot of effort into making it easy to use this module, and this includes authoring new templates. Interface ships with a number of templates we have already set up, and we understand it will be important for certain users to know how to author their own. Writing a template should be one of the simplest tasks you will ever have to do as a developer, right down there with Hello World and executing a print command. Read More >>>