CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Build a qrcode badge
Pages: [1]

Author Topic: Build a qrcode badge  (Read 899 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Build a qrcode badge
April 29, 2012, 04:23:30 am
Hi,

Our goal is to add a qrcode on the badge.
Both for the organisers (being able to check who attended the second day by scanning them at the door) and for the participants to echange "business bards".

It seems that trying to cram a VCARD on the qrcode won't work, so I think about putting a URL, hosted on our server that serves the vcard.

http://example.org/qrc/{$contact.id}?{$contact.checksum}

Likely I'm going to encode the contact id in base 62, so that's more compact using as well a-z A-Z instead of only the 0-9.

The url can't be limited in the time, so I can't use the generateChecksum (that, and I'd want to be fast fetching the list of participants when I generate the badges, I'd rather be close to the db).

I don't want to put the hash directly, so thought about using as the "checksum"  the MD5 of the hash (so can't reverse to the hash).

Do you see a flow (privacy or security)? suggestion to make it better?

One flow I see is that if you merge the contact, you loose the vcard (not a big deal IMO) and that you can guess the size of the db by the contact id (and/or if the vard is from an "old record").

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Build a qrcode badge
April 29, 2012, 12:29:43 pm

Dont think encoding contact ID in base 62 is worth the bytes saved, IMO

I would probably expand generate checksum to include the notion of "infinite" lifespan (0 or -1?). Keeps things consistent

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Re: Build a qrcode badge
April 29, 2012, 02:13:58 pm
Probably not a bid deal to base 62 indeed.

It seems that there is already an infinite lifespan (inf).

This being said, the size seems to matter (the qr code isn't read properly if too dense), but the normal checksum is only adding a few extra chars.

X+
-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Build a qrcode badge

This forum was archived on 2017-11-26.