function pdfpreview_admin_settings in PDFPreview 6
Creates the settings form to tune how pdfpreview works.
Return value
themed settings form
1 string reference to 'pdfpreview_admin_settings'
- pdfpreview_menu in ./
pdfpreview.module - Implements hook_menu()
File
- ./
pdfpreview.module, line 115 - This module creates a formatter for CCK filefields that shows a snapshot of the first page of pdf files as link to the file.
Code
function pdfpreview_admin_settings() {
$form = array(
'pdfpreview_pathtoimages' => array(
'#type' => 'textfield',
'#title' => t('Images folder'),
'#description' => t('Path, inside files directory, where snapshots are stored. For example <em>pdfpreview</em>'),
'#default_value' => variable_get('pdfpreview_pathtoimages', 'pdfpreview'),
),
'pdfpreview_previewsize' => array(
'#type' => 'textfield',
'#title' => t('Preview size'),
'#description' => t('Size of the preview in pixels. For example <em>100x100</em>. You must set this to a value big enought to apply your image styles.'),
'#default_value' => variable_get('pdfpreview_previewsize', PDFPREVIEW_DEFAULT_SIZE),
),
'pdfpreview_quality' => array(
'#type' => 'textfield',
'#size' => 3,
'#maxlenght' => 3,
'#title' => t('Image quality'),
'#field_suffix' => '%',
'#description' => t('Image extraction quality in percentage.'),
'#default_value' => variable_get('pdfpreview_quality', PDFPREVIEW_DEFAULT_QUALITY),
),
'pdfpreview_description' => array(
'#type' => 'checkbox',
'#title' => t('Description'),
'#description' => t('Show file description beside image'),
'#options' => array(
0 => t('No'),
1 => t('Yes'),
),
'#default_value' => variable_get('pdfpreview_description', PDFPREVIEW_DEFAULT_SHOW_DESCRIPTION),
),
'pdfpreview_tag' => array(
'#type' => 'radios',
'#title' => t('HTML tag'),
'#description' => t('Select which kind of HTML element will be used to theme elements'),
'#options' => array(
'span' => 'span',
'div' => 'div',
),
'#default_value' => variable_get('pdfpreview_tag', PDFPREVIEW_DEFAULT_TAG),
),
'pdfpreview_filenames' => array(
'#type' => 'radios',
'#options' => array(
PDFPREVIEW_FILENAMES_MACHINE => t('Filename hash'),
PDFPREVIEW_FILENAMES_HUMAN => t('From pdf filename'),
),
'#default_value' => variable_get('pdfpreview_filenames', PDFPREVIEW_FILENAMES_MACHINE),
'#title' => t('Generated filenames'),
'#description' => t('This changes how filenames will be used on genereated previews. If you change this after some files were generated, you must delete them manually.'),
),
);
return system_settings_form($form);
}