drupal7 archive

dan's picture

Drupal 7 Tutorial: Creating Custom Formatters with the Field API

Custom formatters are a great way to control the output of your fields. In this tutorial I'm going to use an example that takes a user's Facebook URL as the input and outputs a button of the Admin's choosing, along with an option to open the link in a new window. To get started, we'll need to get a module skeleton sketched out. You'll need to create these two files: facebooklink.info facebooklink.module The first file, facebooklink.info, can be fairly simple: Read More…

tony's picture

6 ways to make Drupal easier for non-technical admins

Over the years, I've created a list of ways to make Drupal easier for one of my target audiences: the non-technical admins and editors that run the day-to-day operations of a website. My list is getting huge, but the following six ideas are always reliable. Read More…

joaquin's picture

Drupal7 Spirit

Let it not be said that vosechu (Chuck Vose) has shied away from getting into the spirit of things. Drupal has hit version 7 as of this past Wednesday (1/5/11) and as our unofficial Chief Fun Officer, Chuck leads the pack on celebrating this big milestone. Here he is geared up and ready for the Drupal7 celebration party here in Portland Oregon. Look out world - here comes Chuck! And here comes Drupal7! Read More…

scott's picture

How to Add Theme Settings for Drupal 7

You know that list of checkboxes on the theme settings page that let you turn on and off parts of the theme like the logo or slogan? Well, you can add your own options to that list really easily in Drupal 7. In D6, this was kind of a pain, because you had to write all sorts of functions to save and load your settings to the database and handle everything properly. In D7, that's all done through the Form API, so the heavy lifting is done for you. All you need to do is tell it to add some form fields, and what the new setting is called! You'll need to create a theme-settings.php file in your theme, and add this code to it: Read More…

scott's picture

How to Change the Content-Type Meta Tag in Drupal

I'm working on an HTML5 theme for Drupal 7 right now, and I needed to change the meta content-type tag. By default it looks like this: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />, and I needed the updated HTML5 version: <meta charset="utf-8" />. Normally, you can replace these things in one of the theme template files, but in this case, the meta tag was hard-coded in the Drupal source code somewhere, so I needed a programmatic solution. Here's what I found for both Drupal 6 and 7. Read More…