Calculating diff between two fields

This compares the values of two text fields using PEAR.

= '/pathToPearsParentDirectory/pear/PEAR';
set_include_path(get_include_path() . PATH_SEPARATOR . $path);


$diff = &new Text_Diff('auto', array(array($node->field_nameOfOneFieldToCompare[0]['value']), array($node->field_nameOfOtherFieldToCompare[0]['value'])));
$renderer = &new Text_Diff_Renderer_inline();

$node_field[0]['value'] = $renderer->render($diff);


  • Remove the <?php and ?> from the code before pasting!
  • You must install PEAR's Text_Diff module. This isn't part of the standard install.
  • The $path and set_include_path lines are unnecessary if your PHP engine's include_path already includes the PEAR root directory. I had to override because I had to install my own copy of PEAR; my web host's version didn't include Text_Diff and was too out of date to allow the install.
  • Until #367281: Longtext field is broken is fixed, you should use varchar or text instead of longtext.

Facebook-style Statuses Tags

Facebook-style Statuses Tags (FBSST, or facebook_status_tags) is a submodule of Facebook-style Statuses which parses statuses for usernames marked with an "at" sign (@) or taxonomy terms marked with a "hash" sign (#) and themes them appropriately. For example, if "@Dries" was in a status, it may be themed to link to Dries' account on that site. If "#Drupal" was in a status, it would be themed as a link to the page listing statuses that also had the "Drupal" tag. If the module finds a #hashtag in a status that has not yet been added to the vocabulary, it automatically adds the term to the vocabulary.

User Mailman Register: Manage users list subscriptions

User Mailman Register is a module for mailman subscribing that extends the Mailman Manager module features.
The main feature is that, instead of sending user commands in mail format as Mailman Manager does, it sends url requests directly to the mailman web interface where admins manage lists members.
The result is mailman integration into your drupal site.
Some of its features are:

  • Immediate action, completely invisible to the end-user.
  • Correctly synchronized with the mailman server.
  • Anonymous user subscription (or invitation).
  • Lists permissions.
  • Subscribe/unsubscribe users depending on their current role.
  • Display subscriptions in the registration form of a new user.
  • Choose what subscription types are available for every list.
  • Integration of notify and invite mailman options for new subscriptions.
  • Retrieve the user mail address realname from Profile fields.
  • Optionally, set a subscription as required.
  • Views integration.


    Dynamic display block module

    DDblock - Basic Dynamic Display Block Slideshow Video Tutorial
    by Philip Blaauw and Iren,

    A video tutorial to create a basic slideshow with the Dynamic display block module. The screencast covers the following topics:
    1. Download and install required modules
    2. Add a new dynamic display block
    3. Configure the block
    4. Add content for the block
    5. Display the block on the site
    Play Video (Length: 07:37)

    DDblock - Advanced Dynamic Display Block Slideshow Video Tutorial
    by Philip Blaauw and Iren,

    Limit menu level (for pre-2.x versions)

    Nice_menus 2.x has a nice (no pun intended) feature: the ability to set the starting and ending menu level for displaying the menus. For instance, there's no need to buy a 27" monitor to show your 8-levels menu anymore, if you use the 2.x version.

    Unfortunately, the 2.x version is a development version as of May 2009. Many webmasters (me included) are not confortable of using a "-dev" module on their production site, so they are stuck with the 1.x version which doesn't not offers that feature.

    Not anymore. The presented hack make nice_menus display menus only to a specified level using the 1.x version. Here's what you need to do:

    • First, find the class ID for your menu. In our example, let's suppose the menu ID is nice-menu-0
    • Now edit your style.css and add a block to hide the desired level of menus using CSS. For example, to show menus only to the second level use:
      .nice-menu-0 li ul li ul {
              display: none;

      E.g. to show menus up to the nth-level, repeat the "li ul" n times.


    The email2image module offers a way to convert users' email addresses to images on the fly. The image of the user's email address will be at <base_path>email2image/<uid> (e.g. To use in views, make sure uid is a field of the view so we can use it as a replacement pattern. Then add another field, check "Rewrite the output of this field" and add the following as the replacement content:


    Subscribe with RSS Subscribe to RSS - Site administrators