drupal

Adding additional form elements using ahah_helper in Drupal 6

This tutorial will show you how to add new form elements which will be available in $form_state['values'] once the form has been submitted using a submit button by taking advantage of the AHAH helper module.

The AHAH helper module does provide a demo, but the demo shows how to change a few fields depending on a selection made from a select element. The tutorials I looked at online either didn't cover the issue properly or just didn't work.

Display iframed content as a block using Block API

The code for this got buggered up in CKeditor due to it not handling Geshi properly, so I have removed all the code. You can download the Drupal 6 file here.

Displaying nodes as blocks using Block API

Recently I wrote a new module called Block API which allows other modules writers to create modules to develop templates for users to easily create new blocks rather than relying on copying and pasting HTML.

The example module included copies the functionality of the core block module. Below I will show how to use Block API to display a specific node as a block with further configuration options available to the user to choose from.

Create a multi-step moderation process in Drupal 6

This will guide you through creating a multi-step process of content moderation in Drupal 6. This is a follow on to the guide on Drupal.org about creating a revisioning system and the follow on, on creating a revisioning system with state-based access. Both of which only allow a single step revisioning sytem, i.e. Author creates content, moderator either edits and publishes or sends back to author to edit.

Scenario

A user submits a piece of content, we will refer to this user as the author. The content is not published and is sent to another user for moderation, we will refer to this user as the moderator.

The moderator can then either set the content from a moderation state back to a draft state for the author to amend or through to a "to be published state".

Once the moderator has checked the content and made amends they can mark the content as ready for publishing. At which point a third user which we will refer to as the publisher, can make further amends to the content and publish it, make further amends and send back to the moderator to check through the changes or mark the content as back to draft to allow the author to change it.

New Drupal module - Block API

I have created a new module for Drupal 6 called Block API which is available on Drupal.org.

Block API is a new module I have developed for Drupal 6 which gives greater control over block templates much like you do with nodes.

More information is available on my Block API page under Projects.

Creating a Drupal multisite enviroment using Drupal 6

This guide will show you how to create a multisite environment using a shared user system with the user only needing to log in once, to be logged in to all the sites.

I will be doing this using WAMP on a Windows XP machine, so some of the steps won't work if you are using IIS or will differ if you are using a different setup.

The result we will be aiming for is a shared user system allowing the user to log in/out of 3 sites which I will use the following domains:

Creating a grid of images for an album in Drupal 6 with pagination

Following on from the original tutorial on creating a grid of images for an album in Drupal 6, a few people asked how to add pagination on to this for large albums.

Unfortunately from what I can tell Drupal's pagination function only works with SQL queries so we are unable to use the existing data available in the node object. But due to Drupal's nice database schema, it is very simple to write some simple SQL to give us the pager.

Create a Drupal 6 theme based on the Zen starter theme

What is Zen?

Taken from the Zen project page:

Zen is the ultimate starting theme for Drupal. If you are building your own standards-compliant theme, you will find it much easier to start with Zen than to start with Garland or Bluemarine. This theme has fantastic online documentation and tons of code comments for both the PHP (template.php) and HTML (page.tpl.php, node.tpl.php).

Why use Zen?

Zen gives a great framework for you to work from as a lot of the hard work in making the default Drupal CSS rules easier to customise as well as having a starter kit for you to modify giving you the basics to create your own theme without needed to mess around with the in's and out's of Drupals theming system.

[Drupal] An error occured while attempting to process add Content Modal form

When trying to add some content new a pane in Panels in Drupal 5 you may get this message.

In my case it was caused by the Secure Pages module. To fix this add the following line to your Secure Pages configuration under Ignore pages:

*ajax*

No add button in IMCE in Drupal when using the Secure Pages module

There may be cases where you are using IMCE with Drupal and have the IMCE appear on node add/edit pages which use a secure URL. You need to add the following to the ignore section of the Secure Pages module.

imce*

Go back to your node add/edit page and you should now have the add button in IMCE.

Pages

Subscribe to drupal