The Grand Fandango

The Grand Fandango is a suite of PHP components designed to bridge the gap between static files and a full-blown CMS. At present, it includes a what's new box, a what's updated box, breadcrumbs, a sitemap, a datestamper, and a navigation tool. The aim is to provide all these components in a form that is easy to drop-in-and-go, with minimal dependencies so people with basic web hosting or small-scale projects can get some automation and dynamism on their sites.

Full instructions are provided in the readme, included below. Basically you extract the files to somewhere on your website, edit the userinfo.php file to match your site, copy userinfo.php, gfFunctions.php, and rssbutton.gif to your webroot, and then just use a <?php include() ?> directive to include the components where you want them.

The Grand Fandango is released under the GNU General Public License.

How do I use it?

  1. Copy the PHP files to the root directory of your website. Actually, only userinfo.php, gfFunctions.php, and rssbutton.gif have to reside in the root directory - the others can be wherever you like in your website directory structure.
  2. Edit the userinfo.php file to reflect your own details. All instructions are contained within the file.
  3. Use the PHP include directive to include the code where you want it on your site. For instance, if you had installed the source files on your site in /grandfandango, you would use something like this:

    <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/breadcrumbs.php"); ?>
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/navigation.php"); ?>
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/whatsnew.php"); ?>
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/whatsupdated.php"); ?>
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/sitemap.php"); ?>
    <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/datastamp.php"); ?>

  4. Optionally, you might also like to link to The Grand Fandango's CSS files, that produce slightly nicer output than the bare HTML. Again, if you had installed the files in /grandfandango, you would place in the <head> section of your page:

    <link rel="stylesheet" type="text/css" href="/grandfandango/grandfandango.css" />

    And then wrap your include statements with <div class="box"> tags. For example:

    <div class="box"> <?php include($_SERVER["DOCUMENT_ROOT"] . "/grandfandango/whatsnew.php"); ?> </div>

    There's also a div class of "breadcrumbs" you can use for that element.

What features does it have?

Lots! The What's new and What's updated box cache their results, checking hourly for site changes. They also produce an RSS 1.0 feed, allowing you to syndicate your content and letting other people monitor when your site is updated. The Site Map also caches its results and updates every hour. The navigation tool is not a static page, either: it's aware of what part of the site your users are in, and expands and contracts accordingly.

Are there any nuances I should be aware of?

Yes. You can use some custom tags to help control these files. There are 3 tags: <alexpounds:new />, <alexpounds:noList />, and <alexpounds:menu />.

<alexpounds:new /> lets you notate that the file is considered to be a "new" file - it should appear in the "What's new?" box. On most Unix filesystems there is no creation time stored, so this is the most reliable way of knowing when something's new (we could store details and watch for modification times, but I'm of the opinion that that's overkill). If this tag is not included then the file will appear in the "What's updated?" box. This tag also affects the date stamp component. New files are given as "Added 2004-02-15" where updated files are given as "Updated 2004-02-15".

<alexpounds:noList /> allows you to indicate that the file should not show up in any of the components. This is useful for headers and footers, custom functions, and so on. Please note the breadcrumbs and the date stamp ignore this tag. If you want to ignore a directory, create an empty file called "alexpounds.noList" in that directory.

<alexpounds:menu name="Example name" /> allows you to specify a shorter title for usage in the components. The name attribute is mandatory. For instance, your page might be titled "The albatrosses of Ipanema and their amazing guitar solos", but you would prefer this to appear as "Albatrosses and guitars" in your navigation.

These tags have to be placed in the first 20 lines of your file, otherwise they will be ignored. I advise you to put them just after your <html> tag. They should be placed in comments to avoid validation problems, unless you're serving XHTML as application/xhtml+xml. There's a DTD for these tags at If you don't know what this means, don't worry, it's not important.

What license is it under?

The Grand Fandango is licensed under the GNU General Public License. See the file COPYING for details.

I've found a bug! What do I do?

Prepare as much information as you can (what you were doing, how to reproduce the bug, what you changed, what happened that wasn't supposed to, what didn't happen that was supposed to, and so on) about it and email

You might like to check The Grand Fandango's home page for updates first.

I want to get in touch with you!

My contact details are on the website.

I hope you find The Grand Fandango useful. If you do, please tell your friends all about it and link back to