Development

[Drupal] Get a list of other nodes that are related by taxonomy terms

Building on this snippet from Drupal to get related node items sharing the same taxonomy terms for 4.7, I have made it work for multiple terms.  This snippet is for Drupal 5 and has been tested to work on 5.10.

The code will return a list view of 5 (changeable with $num_nodes) in an unordered list in a random format.

If you want to order the items you can edit the code to order the data in the SQL statement and take out lines 18 and 19.

[Drupal] Installation

You will need to have set up an IIS or Apache webserver with PHP 5.2 or greater and a Mysql/PostgreSQL database before you can work on Drupal. For more requirements see [Drupal] Overview.

Set up your PC as a test environment using Apache, PHP and MySQL

You can approach the set up of a test environment in 2 seperate ways. You can manually set up Apache/IIS, PHP and MySQL seperately then configure them to work together or you can use a package such as WAMP (Apache, MySQL, PHP) or XAMPP (Apache, MySQL, PHP, Perl).

There are benefits to manually setting up each bit of software for the purpose of the test server we will just use Xampp.

[Drupal] Overview

What is Drupal?

Drupal is an open source CMF (Content Management Framework) created by Dries Buytaert.

What is the difference between a CMS and a CMF?

Not a lot but Drupal is refered to as a CMF due to is configurability and customisation that you are able to do through it's excellent back end and through the use of third party contributed modules as well as modules created by yourself.

How do I get Drupal?

Go to http://drupal.org and download which ever version you want.

[MySQL] Using MySQL to analyze web usage from Windows ISA logs

This tutorial will teach you how to import a tab delimited file in to a MySQL database. I built a program to do this for Windows ISA Server logs which contained over 500,000 lines which was way too many for Microsoft Excel to handle and too much for notepad to handle properly. What MySQL functions will we be using:

[Photoshop] Chrome your car

This tutorial teaches you how to chrome a cars paint.  This will only work properly on dark cars and works best on black cars.

View tutorial at Skeletorscorpse.com

Zend: addDisplayGroup() - Setting the legend

Original Code:

<?php
$nok 
$this->addDisplayGroup(array('nok_forename''nok_surname''nok_day''nok_month''nok_year''nok_address1''nok_address2''nok_town''nok_county''nok_postcode''nok_country'), 'nextofkin');
?>

I then set about trying to get a legend on the fieldset that was created. My first thought was:

<?php
$nok
->setLegend('Next of Kin');
?>

But on second thoughts that would never work. I then remembered that the third variable is normally options passed in an array. So...

<?php ?>

Pages

Subscribe to Development