QR Code Generator Configuration Options

3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: June 17, 2013   (RSS)

By gregThomas - April 1, 2013

Hi Zick,

I've had a look at the plugin, and I think the easiest solution is to modify the plugin so that it's possible to leave the e-mail field blank. You'll need to modify the code of the QRCodeGenerator.php plugin file on line 120 so that it looks like this:

/*if (array_key_exists('email', $options)) {
  if (!isValidEmail($options['email'])) { $errors .= "Invalid value for option 'email'!\n"; }
}*/

This stops the plugin validating the e-mail address, allowing you to leave the e-mail field blank if required:

<?php echo qrCode(array( 
  'type'      => 'contact',
  'size'      => '160',
  'firstName' => $diningRecord['firstname'],
  'lastName'  => $diningRecord['lastname'],
  'address'   => $diningRecord['address'],
  'phone'     => $diningRecord['phone'],
  'email'     => '',
 )); ?>

This does mean that if you do add anything to the e-mail address field, you'll have to make sure its validated before adding it to the qrCode function.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By gregThomas - June 17, 2013

Hi,

Our QR code generator is a plugin for CMS Builder (you can read more about it here: http://www.interactivetools.com/tour/ ). CMS Builder and its plugins are written in PHP, unfortunately we don't have any tools written in .NET. I found this post that on stackoverflow that has some suggestions for QR code generation is ASP.NET: 

http://stackoverflow.com/questions/3793799/qr-code-generation-in-asp-net-mvc

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com