Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-03-31 21:35:05

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,585
Website

smd_qr_code: embed Quick Response barcodes on your site

They’re small. They’re square. They’re everywhere.

Join the 2D barcode revolution and offer camera- and smart-phone visitors promotions, downloads, contact info, vouchers, geographical location, web links, bookmarks, or pretty much anything you can dream up. All in a small square of black-and-white binary data.

Download the plugin and let me know how it works for you.

Revision history
————————

All available versions and changes are listed here. Each entry indexes the relevant post(s) in the thread to learn about the features.

31 Mar 11 | 0.10 | Initial public release
02 Apr 11 | 0.20 | Added title attribute for the <img> tag ; added vcard type (thanks gomedia) ; added validate and validelim to allow regex overrides ; fixed url regex ; improved error reporting ; permitted debug to aid in tracking down regex / validation errors
04 Apr 11 | 0.30 | Wrote more flexible, custom interface to Google Charts API ; added layout, transform and prefix attributes ; improved validate attribute
05 Apr 11 | 0.31 | Double-quotes not single quotes for proper backslashing ; fixed callback warning when no plugin callbacks defined (both thanks gomedia)

Last edited by Bloke (2011-04-05 08:39:48)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#2 2011-03-31 22:35:37

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 581
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

Wow, Stef. I have a client who’s looking for excuses to use these. Love that you can adjust the background color & transparency…just brainstorming here but you could quickly generate image overlay previews for forehead tattoos, maybe best to wait until 2012 for that tho.

Offline

#3 2011-03-31 23:28:52

gomedia
Plugin Author
Registered: 2008-06-01
Posts: 1,160
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

Hi Stef,

QR Codes were trumpeted as the “next big thing” in Australia but take-up has been half-hearted to say the least. We’ve put them on client’s promotional material but, other than Japanese tourists, I don’t think the general antipodean population knows what they are.

I’ve had one on my website (& business cards) for yonks but it’s in VCARD format – a bit like your MECARD but with a website address:

BEGIN:VCARD
FN:Great Ocean Media
EMAIL:info [at] greatoceanmedia [dot] com [dot] au
URL:www.greatoceanmedia.com.au
TEL:0439 484250
END:VCARD

(email address obfuscated to protect the guilty)

Is this format currently possible with smd_qr_code?

Offline

#4 2011-03-31 23:35:30

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,249
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

I use these all the time to send a website I’m at on my desktop to my Android phone (when I’m not using Chrome and the Chrome to Phone plugin).

Will browsers cache the google created barcode image or request it every time?


My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

#5 2011-04-01 06:36:52

mrdale
Moderator
From: Walla Walla
Registered: 2004-11-19
Posts: 2,192
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

heh. “download me… you know you want to.”

Offline

#6 2011-04-01 08:17:48

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,585
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

maruchan

Glad you like it. Thank Google’s awesome charts API for the bg/alpha support. Before I started this plugin yesterday morning I looked into a proper PHP library with GD support and everything but it was about 250KB of download/install hassle. Then I stumbled upon the charts API and as well as cutting dev time by an order of magnitude and making usage a snap, it’s more flexible/extensible. Which brings me to…

gomedia wrote:

Is this format [VCARD] currently possible with smd_qr_code?

No, but it’s trivial to add. I had a half-notion that it might be useful to define your own formats but couldn’t figure out a neat way of doing so (yet). Maybe one day. In the meantime I’ll add vcard support today as well as enabling a ‘title’ attribute for the <img> tag, which is nice for offering instructions like ‘photograph me with your mobile camera, you doughnut’ to the uninitiated :-)

MattD

Not sure if browsers will cache the image. Certainly the plugin doesn’t offer cacheing at the moment. Perhaps it should. Let me look into it, thanks for the idea.

mrdale

Couldn’t resist :-)


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#7 2011-04-01 09:10:52

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 237
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

gomedia wrote:

QR Codes were trumpeted as the “next big thing” in Australia but take-up has been half-hearted to say the least. We’ve put them on client’s promotional material but, other than Japanese tourists, I don’t think the general antipodean population knows what they are.

Apparently Google is giving up on QR Codes. I kind of like them, but they’ve been under used and not widely understood.

Offline

#8 2011-04-01 11:30:59

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 7,585
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

monkeyninja wrote:

Apparently Google is giving up on QR Codes

As long as their business decision to not support them in their Places accounts doesn’t mean they’ll ultimately remove the QR code generating ability from the Charts API, we’re in the clear. Very odd that they’d ditch them. Just because they can’t find a way to leverage them (believe me, we’ve tried to change their outlook on location-based advertising but they’re not interested in owning the market so we’ve gone elsewhere) hopefully won’t preclude others from finding a use for them.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#9 2011-04-01 12:14:01

monkeyninja
Plugin Author
From: Sheffield, UK
Registered: 2008-10-14
Posts: 237
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

Bloke wrote:

As long as their business decision to not support them in their Places accounts doesn’t mean they’ll ultimately remove the QR code generating ability from the Charts API, we’re in the clear. Very odd that they’d ditch them. Just because they can’t find a way to leverage them (believe me, we’ve tried to change their outlook on location-based advertising but they’re not interested in owning the market so we’ve gone elsewhere) hopefully won’t preclude others from finding a use for them.

There are so many places that could make use of QR codes with the rise in smart phones, I’m surprised to not see them about the place more often. Print advertising could surely benefit from them.

Anyway, nice work with the plugin.

Offline

#10 2011-04-01 16:55:41

MattD
Plugin Author
From: Monterey, California
Registered: 2008-03-21
Posts: 1,249
Website

Re: smd_qr_code: embed Quick Response barcodes on your site

It looks to me like the image is cachable for 24 hours.

Expires: Sat, 02 Apr 2011 16:52:57 GMT  
Cache-Control: public, max-age=86400

My Plugins

Piwik Dashboard, Google Analytics Dashboard, Minibar, Article Image Colorpicker, Admin Datepicker, Admin Google Map, Admin Colorpicker

Offline

Board footer

Powered by FluxBB