Month: June 2011

  • Gentle on my mind

    Glen Campbell announces he has Alzheimers: http://www.abc.net.au/news/stories/2011/06/23/3251159.htm

    It’s knowing that your door is always open
    And your path is free to walk
    That makes me tend to leave my sleeping bag
    Rolled up and stashed behind your couch
    And it’s knowing I’m not shackled
    By forgotten words and bonds
    And the ink stains that have dried upon some line
    That keeps you in the backroads
    By the rivers of my mem’ry
    That keeps you ever gentle on my mind
    (more…)

  • HTML5 audio

    MP3 source file

    <audio src="/audio/straw bales.mp3" controls="controls" preload="metadata"></audio>
    This will show the audio and the controls but won’t autoplay or loop. It will preload the metadata only however some browsers may not take notice of this restriction.
    /audio/straw bales.mp3

    <audio src="/audio/straw bales.mp3" controls preload="metadata" autoplay loop></audio>
    This will add the autoplay and loop parameters to play the item on load and loop the audio from the end.

    Browser Support for MP3 audio
    Support for the MP3 format audio is restricted to Safari, IE 9 onwards, and Chrome.

    Ogg source file
    <audio src="/audio/straw bales.ogg" controls="controls" preload="metadata"></audio>
    This will show the audio and the controls but won’t autoplay or loop. It will preload the metadata only however some browsers may not take notice of this restriction.
    /audio/straw bales.ogg

    Browser support for Ogg Vorbis

    Support for the Ogg Vorbis format audio is restricted to Firefox, Chrome and Opera

  • XSSI if and else statements

    if statement

    <!--#if expr="\"$HTTP_REFERER\" = /abc.net.au/" -->
    Content relevant to that site

    <!--#elif expr="\"$HTTP_REFERER\" = /google.com/" -->
    An ‘or if’ statement

    <!--#else -->
    this else statement is used for all other instances

    <!--#endif -->
    finalise the code with an ‘end statement’

    More complex if statement – SSI conditional based on document URI

    This depends on the URI of the document being referenced.

  • XSSI variables

    Set the variable giving it a value
    <!--#set var='site' value='brisbane'--'>

    In normal use add the variable as an echo
    <!--#echo var='site'-->

    If used within another ssi statement use the ‘$’ parameter
    <--#include virtual='/${site}/include.htm'-->