background top

Feature Ribbons with PHP and GD

Adding a diagonal ribbon to a thumbnail is easy with PHP and GD. You may be able to accomplish this task with CSS3, but the result can be a little buggy (strange wiggles on mousover), and it currently is not consistent across browsers. You can create dynamic images in PHP using GD functionality.

The Ribbon Base Image

The ribbon base image that I use is not a transparent PNG – rather, behind the red banner I have a pink background. In PHP we will tell GD to interpret pink as transparent so that our edges are smooth. Feel free to use this image for your own purposes.

Using GD to Add Text

This file will take the base image and place white text over it. Now we can treat this file as an image, and include it in our CSS or image tags. Note that this file refers to arial.ttf – this font file (or whatever TTF font file you decide to use) must be in the same directory as ribbon.php. You can find arial.ttf in your computer’s fonts directory.

Usage

The important part here is the background-image. Notice how the text we want is in the query string of ribbon.php.

Styling and Position

This will place the ribbon in the lower right corner, above the image.

Questions, comments or optimizations? Let us know in the comments.


UnMarketing: UnBook Review

I have enjoyed Scott Stratten’s content for a little while now – starting with http://www.nooooooooooooooo.com/, his twitter feed, and most recently his book UnMarketing (Affiliate Link)

I briefly met him at Canada 3.0 and was delighted as he tore into a panel of traditional marketers, deflating the myth that we as a society want and crave interruptive advertising. That panel session was worth the price of admission to the event.

Therefore, I was very excited to get my hands on an early copy of UnMarketing and it didn’t disappoint.

It was the most engaging book on business I have ever read, consuming the better part of a weekend like only Robert Jordan, JRR Tolkien and TH White have done in the past. Before reading the following review, a couple of things to keep in mind:

  1. Scott’s sense of humour is perfectly matched to mine – sarcastic with a slight chance of ranting. If you don’t find sarcasm an appropriate use of humour, you may not find this book as amusing as I did. Scott wields sarcasm like Picasso wields a paint brush.
  2. I hate cold calling and have never done it to build my business…

What does cold calling have to do with this book review? Scott takes an aggressive early swing at traditional marketing techniques and I agree with every single point he made. Every one. At one point I even shout-whispered “HELL YEAH!” (children were sleeping at the time).  Scott quickly segues into better ways to engage customers, building long term relationships and discovering the potential for every interaction with a prospect – online and off.

The tips and ideas flowing out of this book easily pay for the cover price – it is well worth the read.

Learning and Loving it!

The reason I am telling you to go buy it now is that it is FUN TO READ and INFORMATIVE. Yes, I said it, a sales/marketing/business book that was actually a pleasure to read from cover to cover. I actually counted out seven times I laughed out loud, at one point earning a quizzical look from my wife.

The last book that made me laugh out loud while reading it was Douglas Adams some 15-20 odd years ago – particularly the part with the jaguar guarding the records room, but that’s a story for another time.

Scott has deliberately set out to make a very different kind of marketing book and in most ways it works.

Room for Improvement

The only disappointment found is that there are 56 chapters, and each chapter has at least one, in many cases several key action items, things that you can take and apply today. There are no “chapter summaries” that give you the key take aways from the chapter to start your to do list.

Now to be fair, I typically completely ignore the chapter summaries in most other business books – however, there is so much great content/ideas in this book that I would have liked a quick reference I could go through with a highlighter and say “these are items we are implementing this month”.

I am going to re-read the book – probably starting tonight – and create a chapter by chapter summary for myself.

No Proof, No Pudding?

As a suggestion to Scott, more “Proof” (Scott has a section of a book covering the 3P’s of an article/presentation) throughout the book would be a nice addition – there are a few case studies from Scott’s perspective, i.e.: Switching from Tim Hortons to McDonald’s coffee (by the way – can you get deported from Canada for declaring that in a public forum?)

His book would have benefited from some examples of companies who have put some of his advise into action – not just to build a marketing consultancy like Scott –but how an actual accountant, retail store, local restaurant, etc. put his advice into action and benefited directly.

There is a similar issue reading Trust Agents by Chris Brogan (another excellent book) – perhaps the UnMarketing techniques have not been in play long enough to show the specific gains to specific organizations. Maybe we’ll see UnMarketing 2: People Actually Listened so Now I Can Show You

All in all you will benefit greatly from reading Scott’s book on the new marketing models for our generation of customer engagement, and you will thoroughly enjoy it.

If you are interested in social media, viral marketing, or ol’ fashioned treating the customer first, this book is for you. Pick up a copy at Amazon.com or meet Scott at his UnBook Tour in London. or in other cities near you.

Update: Scott has his Tim Horton’s & McDonald’s story excerpt on his blog.