Dev Sanctum

Technology architecture, web programming and Internet

  • Home
  • About

26

Jul

Making a drupal module

Posted by RyanTxr  Published in Drupal, Internet, PHP, Programming, Tech

I spent a day making a module for Drupal.  I simply went through the tutorial on the drupal site. This makes a simple block module that displays articles entered into a drupal installation within the last week.  Even though the example is simple, going through this tutorial is an excellent way to get an idea about how to make a module for Drupal.  I was able to use this tutorial to make a module to get and display messages from Twitter.

Drupal provides an excellent infrastructure for building applications.  Developers can focus on making the application or module work and take advantage of all Drupal’s super structure.

Drupal can control who has access to each module.  All that is necessary to take advantage of this is to create a module function that describes what permissions a module wants to offer.  For example, modules often control access to a module and access to admin for a module.

Download and install the SearchTwit module if you wish.

The form API lets a module present data entry forms.  All the module has to do is create an array describing what fields to offer.  Drupal generates the HTML form elements and all the controls.

Drupal has a storage area for configuration values.  All modules can access this area to read or write information.  Therefore, there is no need to write or maintain configuration files.

I intend to expand my module and add some more features.  I’m not sure why someone would build a web application from the ground up anymore.

search-twitter-adminThis shows the admin for the module. It has three settings.  The search term defines what term the module will search for on Twitter.

The debug setting turns on some debug output.  It will write the number of messages it got from Twitter and it outputs the Atom XML to a file.  While you can use the module on any site, do not turn on the debug.  At least, go into the module and change the location of the file name.

The last setting defines how many messages it will display.

SearchTwit currently outputs its list as an HTML <ul><li> list.

Making this module was very easy.  I’m looking forward to doing more.

1 comment

Advertising

  • Computing eBooks

Categories

  • Drupal
  • Internet
  • LINUX
  • PHP
  • PrepaidCards
  • Programming
  • Social Media
  • Tech
  • Uncategorized
  • webhooks
  • Windows
  • yahoo

Archives

  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008

Admin

  • Log in
  • Entries RSS
  • Comments RSS
  • WordPress.org

x-ads

Recent Post

  • Build It and the will not come
  • They Sit And Wait
  • 6 Commandments for developers
  • Making a drupal module
  • Terms Of Service Agreements
  • Sears and Social Media
  • Why I Don’t Allow Analytics
  • Use Twitter to build ecommerce customers
  • Object oriented CSS
  • Uses for the Strategy Pattern

Recent Comments

  • Stoke Directorys in Norton Antivirus is a pain
  • Jesse Gibbs in 6 Commandments for developers
  • Gregg Sporar in 6 Commandments for developers
  • Prashant in Making a drupal module
  • kunal.dabir in Facebook drops support for IE6
  • progrium in Getting to Barcamp Orlando
  • doctor in Norton Antivirus is a pain
  • progrium in Webhooks First Steps
  • Ross Haskell in Surveying Live Chat Solutions
  • kunal.dabir in Being a Technical Architect
© 2007 Dev Sanctum
Theme by Wired Studios, courtesy of Corvette Garage
Valid XHTML | Valid CSS 3.0
Powered by Wordpress