Skip to content

A little break

October 4, 2009
tags:

So I’m finally back into the swing of things after a fabulous island getaway. I didn’t text, blog, tweet or email for an entire 10 days!

Samoa was an absolutely fabulous holiday destination. Thankfully we arrived back two days before the disastrous tsunami struck. The Samoan people are a positively wonderful, friendly and generous population and it is awful that such a thing has happened to them.

Help support their cause by donating to the Red Cross Tsunami relief fund.

http://www.givealittle.co.nz/cause/pacifictsunami

Below are a few photos of our holiday. Everyone should definitely visit this magnificent place in their lifetime – so much untouched beauty, perfect for everyone from adventure seekers to those who just want to lay on the beach and drink cocktails.

Current wants – tees, totes and beats

September 12, 2009
tags:

I was almost in tears watching Big Bang Theory when Sheldon and Koothrappali (yes I had to Google how to spell that) had a match of rock, paper, scissors, lizard, Spock. Now ThinkGeek is offering this fabulous babydoll tee so you’ll remember the rules on the go. ThinkGeek also references the original brains behind this game, Sam Kass. So much cooler than the standard jan-ken-pon – Alex Kidd anyone??

http://www.thinkgeek.com/tshirts-apparel/womens/b9c7/

Rock paper scissors lizard Spock tee at ThinkGeek

Next, I came across a little gem on Floozy – Harvey’s “Treecycle” bags that are made out of recycled seatbelts. Gorgeous, eco-friendly and bound to be extremely tough, I *love* the Treecycle Hobo style. Harvey’s is husband and wife team Dana and Melanie, who started the business in their garage in California. Dana was raised in NZ and according to Floozy, learnt how to weave bags from his Polynesian grandmother. Turns out paying attention to granny has obviously paid off, with Harvey’s bags now being stocked at various boutiques and department stores around the world, and being seen adorning the skinny wrists of celebs such as Britney Spears and Jessica Alba (ref).

Harveys Treecycle Hobo bag

Harveys Treecycle Hobo bag

Beatles Rock Band!! I am a big Beatles fan and can’t wait to give the new game a ago, however unfortunately we are a little challenged in the gaming department currently with only the trustuy PS2 and Guitar Hero World Tour instruments. Need a PS3 to play this, and to be able to play previous Rock Band titles using the Guitar Hero instruments. May have to wait it out a little while longer yet (especially if I buy the Treecyle Hob bag first).

Beatles Rock Band

Beatles Rock Band

Making images look flash – some image gallery solutions I love

September 6, 2009

A quick post on a couple of great image viewing utilities currently in use on my websites…

Tiltviewer

Brought to you by Airtight Interactive, Tiltviewer is a beautiful image gallery viewer built using Flash technology. It gives a fabulous 3D effect and lots of customisable options. It looks uber sleek and professional but takes very little technical ability to implement. You can use an XML file to define your images, or load images automatically from Flickr or Picasa. The gallery is interactive, with users being able to click to zoom in and out, and flip photos over to view image descriptions or other details. The installation and configuration instructions, as well as the FAQs and online forums make this product highly supported and therefore a breeze to implement and customise. To see how I have implemented it, visit the Adagio Wanganui image gallery. I’ve used an XML file to define the images and haven’t customised it too much because it is wonderfully functional out of the box. You’ll also find Simpleviewer, Autoviewer and Postcardviewer from Airtight, which are all very elegant gallery solutions as well. I’ve implemented Simpleviewer for some image galleries on Perfect Venue and really like it.

Smoothgallery

Smoothgallery, from Jondesign (Jonathan Schemoul) is a javascript image gallery or featured content slideshow (or whatever else you decide to implement it as), available as a free download and is also used as the basis for a WordPress plugin. I found this one a little harder to work with than the above Tiltviewer, but that is possibly because I was needing to customise it a bit more. It offers another very elegant solution, and is great for a featured content gallery as part of a home page. There are a few options you can feed it when initialising the gallery, and of course you can edit the heck out of the CSS, however I didn’t find it that intuitive to customise and resorted to the forums quite a bit. The biggest problem I had was getting it to start on a random image. After a lot of digging I found this post with the answer. Nonetheless, it is a great solution and I’m currently implementing it for a “featured venue” slideshow that will persist across a few pages on Perfect Venue.

Slimbox (2)

It seems that everyone is using lightbox on all sorts of websites these days and why not? It is a simple and lightweight viewer that almost anyone can install and use within minutes. For enlarging images on Perfect Venue I’ve used Slimbox 2, which is an even more lightweight version of Lightbox that uses the jQuery javascript library. I haven’t spent time customising this at all because it provided exactly what I needed straight out of the box.

Battle of the sexes (or should that be OS’s?)

August 23, 2009
tags:

I had to laugh yesterday when a (female) colleague and I were discussing training up my replacement. I wish I could just download the contents of my brain onto USB, ready for upload into his brain. She commented that this was never going to work – obviously because males and females have completely different operating systems. Males are 32 bit whereas us females are 64 bit. Aint that the truth! Lol, lmao, rofl etc etc…

Create an “add to shortlist” feature for your website – part 2

August 15, 2009

In part 1 we went through how to add individual records (in the form of IDs) to a shortlist. The IDs are stored in a session variable and are separated by commas. What we need to do now, is seperate those values out and use them to get some info, e.g. from a mySql database.

Firstly, we need to seperate the values in our string (stored in $_SESSION['shortlist']) based on the comma delimiter, and put the values into an array:

//put each id in $_SESSION['shortlist'] into shortlistitems array
$shortlistitems = explode(",", $_SESSION['shortlist']);
//get rid of null values
foreach ($shortlistitems as $key=>$id)
	{
  		if($id == "")
			{
				unset($shortlistitems[$key]);
			}
	}

A nice explanation of the explode function can be found at W3schools.

Now we have an array of individual IDs. If you were to output it using print_r($shortlistitems) it would look something like this:

Array
(
[0] => 1
[1] => 8
[2] => 97
[3] => 53
[4] => 111
[5] => 6
)

This is just a collection of IDs that don’t really mean much to our end user, so let’s use them to query a MySql database, and display some results in a table:


//start the table off...
echo "
<table>";
//loop through the array, returning data from the database based on $id for each shortlistitem.	Put results into a table
foreach ($shortlistitems as $k=>$id)
	{
		$sql = "SELECT * FROM yourtable WHERE id = ".$id;
		$query = mysql_query($sql) or die (mysql_error());
		while($result=mysql_fetch_array($query))
			{
				echo "
<tr>
<td>".$result['column1']."</td>
<td>".$result['column2']."</td>
<td>".$result['column3']."</td>
</tr>
";	

			}
	}
echo "</table>
";

Isn’t that nice? We’ve selected one or several rows of data from a database, based on the IDs that our end user has added to their shortlist. They can now see all their favourite widgets (or whatever) on our shortlist.php page. Basically, the above script says “for each shortlist item in our array, put the id into the $id variable, then select some data from a mySql database and display this in a table”. For some more explanation on using php with MySql see Angela Bradley’s PHP/MySQL Guide at About.com.

What if they want to remove items from their shortlist?

Add this to the top of your php script (i.e before you do anything with the $_SESSION[‘shortlist’] variable)

if ($_GET['shortlist']=="remove")
	{
		$_SESSION['shortlist'] = str_replace($_GET['id'].",","",$_SESSION['shortlist']);
	}

…and put a link like this in another cell in your row of results:

echo "
<td><a href='shortlist.php?shortlist=remove&id=".$id."'>remove from shortlist</a></td>
";

Components to this wee snippet:

  1. ($_GET[‘shortlist’]==”remove”)… This says that if we have shortlist=remove in our URL, carry out the code below. This is only set when we click on the ‘remove from shortlist’ link.
  2. str_replace… This finds the string we want to remove (i.e. the id plus the trailing comma) with “” (i.e. nothing) – thus deleting it from $_SESSION[‘shortlist’].
  3. a href=’shortlist.php?shortlist=remove&id=”.$id.”‘… By clicking on this link we are saying (a) run the remove from shortlist code, and (b) remove the id that relates to this row ($id).

The whole shebang…

<?php session_start()

//connect to MySql database
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()); //Note I usually put this in a seperate file and then use include() to call the file
mysql_select_db("Database_Name") or die(mysql_error()); 

//remove from shortlist
if ($_GET&#91;'shortlist'&#93;=="remove")
    {
        $_SESSION&#91;'shortlist'&#93; = str_replace($_GET&#91;'id'&#93;.",","",$_SESSION&#91;'shortlist'&#93;);
    }  

//put each id in $_SESSION&#91;'shortlist'&#93; into shortlistitems array
$shortlistitems = explode(",", $_SESSION&#91;'shortlist'&#93;);  

//get rid of null values
foreach ($shortlistitems as $key=>$id)
    {
        if($id == "")
            {
                unset($shortlistitems[$key]);
            }
    }  

//start the table off...
echo "
<table>";  

//loop through the array, returning data from the database based on $id for each shortlistitem. Put results into a table, include 'remove from shortlist' link
foreach ($shortlistitems as $k=>$id)
    {
        $sql = "SELECT * FROM yourtable WHERE id = ".$id;
        $query = mysql_query($sql) or die (mysql_error());
        while($result=mysql_fetch_array($query))
            {
                echo "
<tr>
<td>".$result['column1']."</td>
<td>".$result['column2']."</td>
<td>".$result['column3']."</td>
<td><a href='shortlist.php?shortlist=remove&id=".$id."'>remove from shortlist</a></td>
</tr>
";    

            }
    }
echo "</table>
";
?>

And there you go. PHP session_end.

Daily deal websites

August 8, 2009

Husband came home the other day going on about a new website called Deal Eater. He met the guys that started this site through work and it got me thinking – there seem to be quite a few of these ‘daily deals’ websites popping up about the place.

Whether it’s the so-called recession creating a need for us to shop more frugally, or the fact that it is no longer un-cool to clip coupons, that has created a market for these types of sites I’m not sure. Either way, it’s a good thing and they sure seem to be popular. Below is a summary of these daily deal websites operating for New Zealand consumers.

1-day – one of the originals, we have purchased of this site multiple times. There are three great daily deals, where you can purchase anything from chocolates to electronics, clothing to cosmetics and more. Most deals I’ve seen on 1-day are below half price.

Dealaday – similar to 1-day but with just one deal every day. In the past week they’ve had iPods, Bob the Builder playdough sets, weight loss supplements, NZ Car magazine subscriptions, scooters and digital cameras. Most of these products had 50% off the RRP.

Off The Back – daily loot with one main deal and two side deals everyday. This site is very community based; users can comment on products, mark them ‘hot or not’ and participate in the forums. These guys are on a mission to get to 100,000 comments – they’re currently at 70,878. Not bad for a site that has been around just 18 months.

Deal Eater – this fairly new website gives you daily eating/drinking deals in Christchurch and Wellington – Auckland will be added soon. There is one lunch and one dinner deal per region which are available for a 24 hour period. I’ll definitely be checking here whenever I can’t decide where to go for dinner.

Grabawine – with the name no doubt inspired by Air New Zealand’s Grabaseat, this website offers three wine deals every day, with each wine being sold by the half-case. I haven’t purchased from here yet, namely because I haven’t actually tried any of the wines they’ve had on sale. Perhaps I would be more swayed to make a purchase if there was a detailed description of the wines nose, acidity, notes, bouquet and other winey terms that I don’t understand but seem to sell me when I read them on a bottle…

FirstIn –  I had never head of this one but after a quick Google came across this site claiming to be ‘New Zealand’s original daily deals website’. It was started in 2004 so I guess this would be correct. Today’s deals on FirstIn are all electronics and because I haven’t seen it before I’m unsure if this is all they do.

Happy bargain hunting everyone!

Pearl Jam set to rock Christchurch!!!

August 2, 2009

My absolute favourite band of all time are set to rock AMI Stadium in Christchurch on November 29th this year. I was flipping OUT when I heard the rumours at work on Friday and several news sources, as well as a post on PJs official fan club website (www.pearljam.com) have confirmed the tour dates early this morning.

I am stoked beyond belief that they are coming to Christchurch. Fingers crossed they don’t cancel like The Killers did in March this year. I just hope that all of Christchurch (and New Zealand) gets behind this legendary band and that the show sells out fast. This is going to be the highlight of the rock calendar in New Zealand this year so don’t miss it! At $120 for a Gold section ticket it is far more reasonable than AC/DC and in my opinion will be a WAY better show (*ducks for cover*).

More details here: http://pearljam.com/news/pj-announces-australianew-zealand-tour-fan-club-pre-sale-travel-package-details-coming-soon

So… are you planning on going? Post below, would love to hear your comments!