drupal

recent posts related to the drupal content management system

A Drupal form textfield example

Drupal form textfield FAQ: Can you share an example of how to create an HTML textfield in a Drupal form (Drupal 6 or Drupal 7)?

Assuming that you're already comfortable with creating a Drupal form, you can create a Drupal form textfield as easily as this:

# an html textfield for our drupal form
$form['first_name'] = array(
  '#title' => t('First Name'),
  '#type' => 'textfield',
);

That code creates an HTML textfield with the label "First Name", as you can see here:

A simple Drupal form example ("My first Drupal form")

Drupal form FAQ: Can you share an example of a simple Drupal form? (i.e., a "My first Drupal form" example.)

I've written before about the Drupal learning cliff (learning curve), and as that name implies, getting started with Drupal form development can be a little hard. To that end I'm taking this weekend to write all the form examples I can fit into one weekend.

A Drupal jQuery Mobile theme - screenshots

Summary: A Drupal jQuery mobile tutorial/demo.

As I wrote yesterday, I just started working on a mobile Drupal app (web app) that uses jQuery Mobile to make the app look and function like a true mobile app. Yesterday's article was about creating a Drupal mobile theme using jQuery Mobile.

I didn't get a chance to work on this any more today, but I thought I'd share a couple of screenshots from this Drupal mobile web app to show you what I'm doing.

A Drupal jQuery Mobile theme (tutorial)

Drupal jQuery Mobile FAQ: How do I get started developing a mobile Drupal app using the jQuery Mobile project?

In an attempt to create a mobile Drupal iPhone app, I'm currently writing a Drupal mobile app using jQuery Mobile, and although I still have a few kinks to work out, the basics are now working.

Drupal iPhone apps and mobile themes

Drupal iPhone mobile themes, special introduction: In this article I take a quick look at the existing Drupal iPhone themes. The reason I say this is a "quick look" is because none of the themes seemed to work very well out of the box. This is a bummer for me, not only because I have a lot of work to do, but because I normally like to share solutions to problems.

Drupal database configuration files - development, testing, and production environments

Drupal database configuration file FAQ: Is there something I can do to quit having to change my Drupal settings.php file every time I go from my Development Environment to Testing and Production?

Yes! One of the things I didn't like about Drupal when I first started working with it was the settings.php file in the sites/default directory. I thought that was THE database configuration file, and you had to keep changing it when you went from Development to Testing to Production.

Drupal 6 SQL insert examples (and syntax)

Drupal 6 SQL insert FAQ: Can you share an example of how to write a Drupal 6 SQL insert statement?

There are at least two ways to write a SQL insert statement in Drupal 6, and I'll demonstrate both of those here.

A Drupal 6 SQL INSERT example using db_query

The first method involves writing an old-fashioned SQL INSERT statement with the Drupal 6 db_query function, like this:

Drupal menu nesting problem (module development)

Drupal menu nesting problem: I just had a problem with menu nesting while developing a Drupal 6 module, and thought I'd share the problem and solution here.

The problem was that in developing my Drupal module, I was trying to created a nested menu structure, something like this:

- My App
  - Reminders
    - Add Reminder

Somewhere in the process of developing my module, this Drupal nested menu got out of sync, and my menus appeared in a flat structure, like this:

Searchable Drupal API function examples

Summary: A Drupal API/functions experiment - A searchable collection of Drupal projects to demonstrate Drupal API function examples.

I just started a new Drupal API examples experiment recently. The basic concept is to make it easier for Drupal programmers to be able to find working, real-world Drupal API programming examples as a way to help document the available Drupal API functions.

A custom Drupal favicon.ico (Drupal 6 or 7 websites)

Drupal FAQ: How do I set the favicon.ico icon file for my Drupal website?

There are a number of ways to do this, but one of the best ways is through the Drupal admin interface. From there you can upload your favicon.ico file and it won't be clobbered whenever you update your Drupal website.

To add a custom favicon.ico file to a Drupal 6 website, go to Admin > Themes > Settings, which in the case of one of my websites using a version of the Austin theme resulted in this browser path (URI):

Syndicate content