Website

Setting up Xampp, Zend Debugger and Drupal on Windows 7 (64 bit)

After having had a fun (?) afternoon trying to rebuild my development environment for Drupal after installing Windows 7 I think I've finally cracked it. As a note to myself, and for anyone else who stumbles across this page, this is what I had to do to get it working...

  1. Make sure to install Xampp 1.7 as this has PHP 5.2. The Zend debugger binaries don't yet work with PHP 5.3 which is used in later versions of Xampp. Packages are available from SourceForge.

PHP error reporting in Drupal

When developing modules it can be useful to increase the level of error reporting within Drupal. To do this (in D6) edit common.inc and change the line

<?php
if ($errno & (E_ALL ^ E_NOTICE)) {
?>

to

<?php
if ($errno & (E_ALL)) {
?>

This will report all errors, including notices, whereas normally they are suppressed.

Inserting an Aquafadas BannerZest banner in Drupal

The flash banner below is a BannerZest banner, inserted in an iframe. The banner animation is from the Aquafadas website to show that it can be done.

To insert the content on the page you need to upload the banner directory and all its files to somewhere on your webspace. Next create a node, set the input format to full HTML input, and then put something like <iframe name="bzAnimation" src="http://www.yourwesbite.com/files/banner/bzAnimation.html" width="600" height="250" allowTransparency="true" frameborder="0"></iframe>.

View the full node to see the banner in action.

I've just discovered Firebug

I'm probably way behind here, but I just discovered Firebug for Firefox! REALLY useful for debugging the HTML / CSS etc associated with the website, and at last I've got rid of the annoying empty line at the top of the page! I always wondered why it was there, and it was an "empty" block.

Flash node macro example

This node is NOT a flash node, but it is displaying some flash content by using a flash node macro. The original flash content is actually in this node.

By using a flash node macro you can add the flash element from a flash node to any other content that has the flash node input filter configured in one of its input formats.

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

A basic flash node

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

This is just a basic flash node and has been created to provide some content for use in this node which demonstrates how a flash node macro can be used.

Using flashvars with flash node (2)

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.
Dynamic flashvars! The first item is a random number between 1 and 100, the second is the current date in Y/m/d format, and the third is your user ID. Note that "anonymous" content is cached so will not be refreshed on every page view, whereas a logged in use will get a fresh page each time.

Using flashvars with flash node (1)

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

To pass flashvars to an swf file that is being generated by flash node simply type the text string in the flashvars field under Advanced flash node options.

In the very simple example above the flashvars field simply contains first=These&second=Are&third=Flashvars.

Using loadSound with flash node

The sound that is playing with this movie is being streamed using the loadSound() function. It is using the base parameter to make sure that the Flash player finds it in the right place.

The ActionScript that enables this is:

// declare a new sound object
mysound = new Sound();

// load the audio into mysound, streaming mode
mysound.loadSound("Maple-Leaf-Rag.mp3", true);

// when the audio finishes the first time through start it again, with 999 loops!
mysound.onSoundComplete = function() {
mysound.start(0,999);
};

Using loadMovie with Flash node

You are missing some Flash content that should appear here! Perhaps your browser cannot display it, or maybe it did not initialise correctly.

A few people have asked how to use ActionScript commands like loadMovie with Flash node. It's fairly straightforward and the "trick" is understanding how Flash itself works out paths to files.

If you want to load a submovie in ActionScript you'd use a command like loadMovie('submovie.swf', mc1); and that's exactly what is happening in the example animation above.

Syndicate content