drupal planet

Creating custom pane styles in Drupal 6

In Panels you can change the style of panes very easily using some presets from the Panels module.

panels-2.jpg

This tutorial will show you how to define your own styles as well as add a settings form to it so you can allow users to further configure the styling of the pane.

panels-3.jpg

Use panels to override the node output in Drupal 7

When creating an image gallery in Drupal using CCK/Fields the resulting output is just a string of divs resulting in a single column of images. This tutorial will show you how to use Views and Panels to override the standard node output to display the images of the gallery in a grid.

result.jpg

Create an album based image gallery in Drupal 7 using fields and views

This is a follow up tutorial on the popular Create an album based image gallery in Drupal 6 using CCK and views but for Drupal 7. The tutorial will assume that you have Drupal 7 already installed and ready for use. The following contrib modules are required:

I personally prefer Colorbox to some of the other lightbox modules, but feel free to use whichever one you want, they should all work in the same way. An alternative can be found in Shadowbox. Lightbox2 doesn't have a D7 release at the time of writing and Thickbox has been discontinued, with the maintainer now working on Colorbox.

[Drupal] Display separate views on different taxonomy pages (parents/children) using Panels/Views

I have come across the problem a couple of times now and have come across someone else looking for the same things on IRC where you want to have a different view for parent terms and child terms.

Although this probably can be done in Views, I am none the wiser on how to do it and neither were any of the participants on IRC. So my work around is to use Panels taking advantage of Ctools contexts.

This tutorial is written for Drupal 6.

"Disable Drupal blocks/regions" has no effect with some custom themes

I came across a problem with a panels page when I check the "Disable Drupal blocks/regions" box, the sidebars are supposed to disappear so that the content takes the full width. But it didn't work.

Switching back to Garland and the sidebars disappeared as expected. After a quick search, I found this post on drupal.org which is the same issue but one of the replies essentially says to hack core to get it to work, but that is not necessary.

Programmatically create Ubercart products with attributes and selected options in Drupal 6

I have been working on a import script to import products from a previous custom Drupal module in to Ubercart. For this I have been using the Batch API to handle the large amounts of data. Upon trying to import some products using drupal_execute(), I came to realise that drupal_execute() can not be run in during a batch operation using Batch API.

So I ended up creating the node using node_save() which created the basic product.

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.

Pages

Subscribe to drupal planet