Index: signwriter.admin.inc =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/signwriter/Attic/signwriter.admin.inc,v retrieving revision 1.1.2.4 diff -u -p -r1.1.2.4 signwriter.admin.inc --- signwriter.admin.inc 5 Aug 2009 14:29:38 -0000 1.1.2.4 +++ signwriter.admin.inc 19 Jan 2011 11:45:10 -0000 @@ -583,6 +583,13 @@ function signwriter_profile_form(&$form_ '#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 =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/signwriter/signwriter.install,v retrieving revision 1.8.2.2.2.4 diff -u -p -r1.8.2.2.2.4 signwriter.install --- signwriter.install 14 Jul 2009 12:57:53 -0000 1.8.2.2.2.4 +++ signwriter.install 19 Jan 2011 11:45:10 -0000 @@ -116,6 +116,13 @@ function signwriter_schema() { '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 @@ function signwriter_update_6200() { '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; +} Index: signwriter.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/signwriter/signwriter.module,v retrieving revision 1.17.2.3.2.7 diff -u -p -r1.17.2.3.2.7 signwriter.module --- signwriter.module 2 Feb 2010 22:48:15 -0000 1.17.2.3.2.7 +++ signwriter.module 19 Jan 2011 11:45:11 -0000 @@ -613,6 +613,7 @@ function signwriter_image_prepare($profi $image->imagetype = _signwriter_get_val($profile, 'imagetype', 'gif'); $image->xoffset = _signwriter_get_val($profile, 'xoffset', 0); $image->yoffset = _signwriter_get_val($profile, 'yoffset', 0); + $image->text_case = _signwriter_get_val($profile, 'text_case', 0); $image->multiline = $profile->multiline; _signwriter_image_prepare_state($image, $profile, 0); if ($profile->threestate) { @@ -895,6 +896,13 @@ function signwriter_write_file($image, $ * */ 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;