Node Reference Autocomplete with Auto-create Drupal node content from Wikipedia

Here's a few bits of code from today's Drupal wranglings that solves a tricky UX problem with Drupal and CCK Node Reference fields.

Ever wanted to deal with the case that a user might want to reference a node that doesn't exist yet? Well I've played around with a couple of modules (Add n Reference and Add Node), but they didn't offer the clean user experience I needed. Here's an example use-case:

Drupal as an Enterprise Web Framework

Enterprise Web Framework

I was recently asked to take a look at the Google AppEngine, as a possible host for a web app. One major drawback for me is that it's currently limited to only running Python code, and the framework I'm using (Drupal) is PHP. That rulled it out as an option, but in this process I had a quick look at Python frameworks, in particular a really interesting one called web2py. They have a downloadable PDF comparison of various frameworks, and I was disappointed not to see Drupal listed.

Drupalcon

in
Drupalcon Logo Szeged 2008

Plane all booked for Drupalcon Szeged - the next Drupal conference, this time held in Hungary. More details: http://szeged2008.drupalcon.org/

Using an external data source for Drupal user authentication and login

You can use any database table to validate users for your Drupal site. In this case I'm validating users against a database of clients. This client database is maintained outside of Drupal. It's a simple two step process, and just needs a couple of PHP functions in a custom module:

Image Resizing with CCK, Imagefields, Imagecache and PHPTemplate

If you have a CCK content type with an image field you get display options that allow you to change the image size on teasers and full node views. First you set up your image presets using the imagecache settings. I usually let users upload at any size, and deal with the resizing as required. Here's how to ensure you get best results from imagecache, and how to embed imagefield images into your PHPtemplates using the theme functions provided by imagecache:

Programmatically Creating CCK Nodes and Adding Images with Imagefield

in

There's a useful post on civicactions that explains how to create nodes in your Drupal site programmatically. I'm using this technique to create an import script for processing bulk quantities of XML files.

There's a facet to the create node process, in that I couldn't get it to import images using the $values[] array.

I found that I could create all the CCK fields by assigning them fields in the $value[] array, but for imagefield values I had to instantiate them in the $node object instead.

Adding Thumbnails to Drupal Vimeo Support

Vimeo Logo

The embedded media field is a project for Drupal that adds support to embed third party media into content types. Several video providers are already supported, and Drupal user robomalo started adding Vimeo support.

This works for embedding videos, but it did not support fetching thumbnails - until now! I've attached my changes to the Vimeo code that now supports thumbnails.

Webbots - Saving Time, and more

cURL Icon

cURL is amazing. If you're not familiar with this particular technology then let me introduce it now: cURL (and more specifically the PHP interface for cURL) allows the programmer to communicate with various servers using various different protocols. I've been using it recently to build webbots to automate some tedious tasks, and do things that no normal human user of the internet would ever want to do. Here's an example use of this technology, and how I went about building it...

Meeting With Roles - Module for Drupal

I couldn't get the available event content types or CCK to do what I wanted, so I've made a simple meeting module for Drupal that allows you to create a number of meeting templates with various roles, and then create meetings on specific dates, with users assigned to each of the roles.

CV Life Line

CV Life Line Logo

CV Life Line was the result of last weekends participation in the Social Innovation Camp - an experiment in using social technology to address social needs.

I'll be adding more about this as there's some interest in taking this project further.

Syndicate content