You are here

function textimage_settings_form in Textimage 5.2

Same name and namespace in other branches
  1. 5 textimage.module \textimage_settings_form()
  2. 6.2 textimage_admin.inc \textimage_settings_form()
  3. 7.2 textimage.admin.inc \textimage_settings_form()

@file

1 string reference to 'textimage_settings_form'
textimage_menu in ./textimage.module
Implementation of hook_menu().

File

./textimage_admin.inc, line 7

Code

function textimage_settings_form() {
  $form = array();
  $fonts_path = variable_get('textimage_fonts_path', drupal_get_path('module', 'textimage') . '/fonts');
  $form['fonts'] = array(
    '#type' => 'fieldset',
    '#title' => t('Fonts'),
    '#description' => t('Number of fonts found: !fonts', array(
      '!fonts' => count(_textimage_font_list($fonts_path)),
    )),
  );
  $form['fonts']['textimage_fonts_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path'),
    '#default_value' => $fonts_path,
    '#maxlength' => 255,
    '#description' => t('Location of the directory where the TrueType (.ttf) or OpenType (.otf) fonts are stored.') . '<br />' . t('Relative paths will be resolved relative to the Drupal installation directory.'),
  );
  $images_path = variable_get('textimage_images_path', drupal_get_path('module', 'textimage') . '/backgrounds');
  $form['images'] = array(
    '#type' => 'fieldset',
    '#title' => t('Background images'),
    '#description' => t('Number of background images found: !images', array(
      '!images' => count(_textimage_image_list($images_path)),
    )),
  );
  $form['images']['textimage_images_path'] = array(
    '#type' => 'textfield',
    '#title' => t('Path'),
    '#default_value' => $images_path,
    '#maxlength' => 255,
    '#description' => t('Location of the directory where the background images are stored. Images in this directory can be overlaid with dynamic text in a preset.') . '<br />' . t('Relative paths will be resolved relative to the Drupal installation directory.'),
  );
  return system_settings_form($form);
}