Planet Drupal

Planet Drupal is an aggregated list of feeds about Drupal from around the web. It provides a place for interesting content from around the community that may not fit the existing topical sections of Drupal.org, Groups.drupal.org, and other official forums.

How to programmatically create a field in Drupal 7

Ever had a site not controlled by the features module or felt that using it, add to much administrative overhead? Or you simply want to learn how to use Drupal field API? This is for you.

In this example I will try to keep the amount of code to the very minimum. Putting too much features into a example have a tendency to put some people off with the amount of code it create. The example will not explain how you create new field types, but rather use one existing provided by Drupal core.

How to change the HTML markup in a field with a theme function in Drupal

Ever wanted to change the Drupal 7 markup? Get rid of all those pesky divs? If so, this is article for you. I will give you a simple example how to do this not by changing the site theme (template.php) but by using a theme function.

Yes, you have make a module, and yes, I will show you have to make it. You will also find, attached to this article, the complete code wrapped up in a zip-file. Using theme functions is not that hard so relative new Drupal users and themers should be able to follow, though, a basic PHP knowledge might come in handy.

How to add image caption to your imagefield and imagecache

Changes:

09.11.2011 - Fixed error in template.php

Overview

This how to will to point you the right direction, hell even providing you with an solution to how to add caption to your image fields. No magic, no extra modules. We simply take usage of the title field that is a part of imagefield.

Upgrade from Drupal 6 to 7, how hard is it?

Updates

  • May 2012 - One year have past since I initially wrote this article. Upgrading these days from Drupal 6 to 7 have become easier, safer, and a lot less nerve wrecking, though it will never become a cakewalk.
  • May 2015 - Started writing a longer series using Migrate and Migrate D2D.
  • May 2015 - Cleaned up language a corrected grammar erros.

To migrate or upgrade?

As writing do I still have a few more complex sites running on Drupal 6. Knowing these sites, their complexity, and all existing glue code, a fast and easy upgrade will be hard pull off. It might be easier for complex sites to only migrate the content using modules like migrate and migrate_d2d.

A data migration

  • Do a clean Drupal 7 installation.
  • Build basic needed content types and configurations.
  • Recreate the theme in D7 or port you existing CSS/SASS styles.

Then migrate your content by using modules like http://drupal.org/project/feeds, or for even more flexibility and power http://drupal.org/project/migrate. I'll promise do a blog post of a more complex Drupal 6 to 7 migration as soon as my remaining sites are running Drupal 7.

How to enable PECL uploadprogress extention in MAMP

PECL and MAMP

26.07.2010: Updated and improved to make it compatible with MAMP ver. 1.9. If you are not a PECL auto make ninja, please resort to the manual build if PECL modules chapter, then it give you more fine grain control of the build process it self.

Uploadprogress or simply any PECL/PEAR module in MAMP

<

p>This howto will show you how to get those pesky PECL modules to compile in MAMP like uploadprogress or Xdebug. First a little Drupal background information. FileField and ImageField 3.0 for Drupal 6 released as one of many new features enables us to use the PHP extension uploadprogress that especially come in handy giving the user feedback of progress when uploading large files. Many OS X users are using MAMP to sandbox their development environment but compiling a PECL/PEAR module is not quite that easy in MAMP.

Pages

Subscribe to RSS - Planet Drupal