Index: signwriter.admin.inc =================================================================== --- signwriter.admin.inc +++ signwriter.admin.inc @@ -583,6 +583,13 @@ '#description' => t('If enabled then images are build using hover and active state as well.'), '#default_value' => _signwriter_get_val($p, 'threestate', FALSE), ); + $form['general']['text_case'] = array( + '#type' => 'radios', + '#title' => t('Text case'), + '#default_value' => _signwriter_get_val($p, 'text_case', 0), + '#description' => t('If enabled, the text case will be either transformed to UPPERCASE or explicit lowercase.'), + '#options' => array(t('No change'), t('UPPERCASE'), t('lowercase')), + ); _signwriter_profile_threestate($form, $p, $fontoptions, 'font', 'Text'); _signwriter_profile_threestate($form, $p, $fontoptions, 'shadow_settings', 'Drop Shadow'); Index: signwriter.install =================================================================== --- signwriter.install +++ signwriter.install @@ -116,6 +116,13 @@ 'unsigned' => TRUE, 'default' => 0, ), + 'text_case' => array( + 'description' => 'Whether or not to apply text case transformation to the text.', + 'type' => 'int', + 'size' => 'tiny', + 'unsigned' => TRUE, + 'default' => 0, + ), ), 'indexes' => array( 'name' => array('name'), @@ -316,9 +323,20 @@ 'name' => array('name'), ), 'primary key' => array('id'), - ); - + ); + db_create_table($ret, 'signwriter_menu', $schema['signwriter_menu']); return $ret; } + +/** + * Implements hook_update_N(). + */ +function signwriter_update_6201() { + $ret = array(); + if (!db_column_exists('signwriter', 'text_case')) { + db_add_field($ret, 'signwriter', 'text_case', array('description' => 'Whether or not to apply text case transformation to the text.', 'type' => 'int', 'size' => 'tiny', 'unsigned' => TRUE, 'default' => 0)); + } + return $ret; +} \ No newline at end of file Index: signwriter.module =================================================================== --- signwriter.module +++ signwriter.module @@ -895,6 +895,13 @@ * */ function signwriter_image($text, $profile, $tag = 'text', &$imageinfo = NULL) { $text = html_entity_decode($text, ENT_QUOTES); + if ($profile->text_case == 1) { + $text = drupal_strtoupper($text); + } + elseif ($profile->text_case == 2) { + $text = drupal_strtolower($text); + } + $imagefile = ''; if (signwriter_image_check_cache($text, $profile, $imagefile, $tag, $imageinfo)) { return $imagefile;