Index: engines/qr_codes_google_chart.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/qr_codes/engines/Attic/qr_codes_google_chart.module,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 qr_codes_google_chart.module
--- engines/qr_codes_google_chart.module	28 Jun 2010 17:09:33 -0000	1.1.2.1
+++ engines/qr_codes_google_chart.module	14 Jan 2011 11:14:44 -0000
@@ -13,6 +13,33 @@
       return t('Google Chart API. See <a href="http://code.google.com/apis/chart/docs/gallery/qr_codes.html">http://code.google.com/apis/chart/docs/gallery/qr_codes.html</a>');
 
     case 'config':
+
+      $ecl = array('L'=>'L','M'=>'M','Q'=>'Q','H'=>'H');
+      $encoding = array('UTF-8'=>'UTF-8','Shift_JIS'=>'Shift_JIS','ISO-8859-1'=>'ISO-8859-1');
+
+      $form['qr_codes_google_chart_encoding'] = array(
+        '#type' => 'select',
+        '#title' => t('Google Chart API Data encoding'),
+        '#description' => t('How to encode the data in the chart.'),
+        '#default_value' => variable_get('qr_codes_google_chart_encoding', 'UTF-8'),
+        '#options' => $encoding
+      );
+
+      $form['qr_codes_google_chart_ecl'] = array(
+        '#type' => 'select',
+        '#title' => t('Google Chart API Error Correction Level'),
+        '#description' => t('QR codes support four levels of error correction to enable recovery of missing, misread, or obscured data. Greater redundancy is achieved at the cost of being able to store less data. See the appendix for details. Here are the supported values: L: Allows recovery of up to 7% data loss, M: Allows recovery of up to 15% data loss, Q: Allows recovery of up to 25% data loss, H: Allows recovery of up to 30% data loss'),
+        '#default_value' => variable_get('qr_codes_google_chart_ecl', 'L'),
+        '#options' => $ecl
+      );
+
+      $form['qr_codes_google_chart_margin'] = array(
+        '#type' => 'textfield',
+        '#title' => t('Google Chart API Margin'),
+        '#description' => t('The width of the white border around the data portion of the chart. This is in rows, not in pixels.'),
+        '#default_value' => variable_get('qr_codes_google_chart_margin', '4'),
+      );
+
       $form['qr_codes_google_chart_url'] = array(
         '#type' => 'textfield',
         '#title' => t('Google Chart API URI'),
@@ -22,7 +49,12 @@
       return $form;
 
     case 'generate':
-      $url = variable_get('qr_codes_google_chart_url', 'http://chart.apis.google.com/chart') . sprintf('?cht=qr&chl=%s&chs=%dx%d&chld=%d', $data, $width, $height, $margin);
+
+      $encoding = variable_get('qr_codes_google_chart_encoding', 'UTF-8');
+      $margin   = is_null($margin) ? variable_get('qr_codes_google_chart_margin', '4') : $margin;
+      $ecl      = variable_get('qr_codes_google_chart_ecl', 'L');
+      $url      = variable_get('qr_codes_google_chart_url', 'http://chart.apis.google.com/chart') . sprintf('?cht=qr&chl=%s&chs=%dx%d&choe=%s&chld=%s|%d', $data, $width, $height, $encoding, $ecl, $margin);
+
       $image = drupal_http_request($url);
       file_save_data($image->data, $a2, FILE_EXISTS_REPLACE);
 
Index: qr_codes.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/qr_codes/qr_codes.module,v
retrieving revision 1.2.2.5
diff -u -r1.2.2.5 qr_codes.module
--- qr_codes.module	8 Nov 2010 19:08:52 -0000	1.2.2.5
+++ qr_codes.module	14 Jan 2011 11:14:44 -0000
@@ -6,7 +6,7 @@
  */
 function qr_codes_theme() {
   return array('qr_codes' => array(
-    'arguments' => array('data' => NULL, 'width' => NULL, 'height' => NULL, 'margin' => NULL, 'imagecache_preset' => NULL, 'attributes' => NULL)
+    'arguments' => array('data' => NULL, 'width' => NULL, 'height' => NULL, 'margin' => NULL, $alt => NULL, $title => NULL, 'imagecache_preset' => NULL, 'attributes' => NULL)
   ));
 }
 
