• Hi guys,

    Wow. It’s been like 2 years or something since I posted last. I wonder if the same people still lurk here?

    I’m creating a website with a directory of contacts, and I thought it would be cool to add QR codes to each of these contacts so visitors could quickly add the details they want to their phones.

    I’m using a plugin called “QR Code Tag” which lets you do a php call within your template and define what content you want to convert to the QR code. I want to define it on the fly with custom fields. I can’t figure out how to do this.

    I know my code is really wrong, but maybe you’ll get where I’m going by having a look at it.

    <?php $venue = get_post_meta($post->ID, 'Address', true);
      global $qrcodetag;
      echo $qrcodetag->getQrCodeUrl('$venue;',80,'UTF-8','L',0,0);
    ?>

    Any help would be greatly appreciated. I’m sure the answer is pretty simple but I’m not very good with getting php right. Thanks in advance.

Viewing 2 replies - 1 through 2 (of 2 total)
  • q292u

    (@q292u)

    I’ve already added qr codes to my websites.
    I’m using a plugin called text-replace, with two replace-codes I created: [qr], and [/qr].

    So, something like [qr]Random Message[/qr] results in a qrcode appearing on-screen..

    [qr] sets up the google chart url, and includes the text as the last parameter, [/qr] simply closes off the statement.

    And that’s it.
    (I have also created a bbcode version of this for use on bulletin boards..)

    Here are the “replace codes” for use with “text replace”:
    [qr] => <img src=”https://chart.apis.google.com/chart?cht=qr&choe=UTF-8&chs=150&chl=
    [/qr] => ” />

    Hope this helps…

    P.S. I use the excellent “upcodes” on my smartphone to read qrcodes..

    MichaelH

    (@michaelh)

    q292u – got a link to that “upcodes”. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘defining custom field to add to plugin call’ is closed to new replies.