Drupal

migrating from D5 upload module to D6 cck filefields

I'm working to update a Drupal 5 site that uses the core upload module to a Drupal 6 site that uses CCK Filefields. I found some work on handling this by drewish, but it needed adapting for my uses.

Programmatic Carts and Orders in Ubercart

Here is a (somewhat raw) function that will place an order in ubercart on behalf of a given, fully-loaded account. It all happens in code, bypassing the multiple-screen checkout process of UC.

This means you have to have all the info you need for the order already stored somewhere, of course. In the use case that spawned this code, it is being gathered through a series of custom forms.

Blocked Note

Attached is a little module that allows users with the 'administer users' permission, which gives them the right to block a user, the ability to add a note to the blocking action. When the blocked user tries to log in, if they provide valid credentials, they see the note as an error.

Now when you drop the banhammer, they know why they're hurting.

This has to mess with the validation functions of user login, so it may have conflicts with other modules that do the same thing, like logintoboggan. Reordering module weights may help; I haven't tried.

Slouching towards PCI Compliance

I'm starting work to bring a drupal site towards PCI compliance and I thought it might prove handy to document it.

Sadly, I must work towards Self-Assessment Questionnaire D, which is not short. This post is going to focus on Requirement 8: Assign a unique ID to each person with computer access.

Initializing and Refreshing a Multi-Step Form

I've been working on a relatively complex multi-step form for a while now. It takes a URL argument that represents a set of stored options to control display and behavior. Thanks to $form_state['storage'] that is pretty easy to grab once and keep through all the steps.

Syndicate content