empty the filter cache to correct image paths that are pointing to the old address. Note that this will only work for images that have been inserted using filter tags.', array('!empty-cache' => url('imagefield_assist/cache/clear'))); case 'imagefield_assist/template': return '
| '. l( theme('imagecache', 'ifa_thumbnail', file_create_path($img->path)), 'imagefield_assist/properties/'. $img->fid, array('html' => TRUE) ) .' | '; // Line break if ( ($n+1) % 4 == 0 ) $output .= '
| ');
$form[] = array('#value' => $properties_image);
$form[] = array('#value' => ''. $node->title .'');
// Image node properties fieldset.
$form['properties'] = array('#type' => 'fieldset', '#title' => t('Image properties'));
$form['properties'][] = array('#value' => ' '. t('Size') .': '. strtr('@widthx@height px', array('@width' => $image_info['width'], '@height' => $image_info['height'])) .' '.
$img_data_labels[$key] .
': '.
$img_data[$key]
.' '. print_r($img_data,TRUE) .''); } #$form['properties'][] = array('#value' => ' '. print_r(, TRUE) .''); $form[] = array('#value' => ' | '); $form['title'] = array( '#type' => 'textfield', '#title' => t('Title (optional)'), '#default_value' => isset($img_data['title']) ? $img_data['title'] : '', '#size' => 50, '#maxlength' => 255, '#description' => NULL, '#attributes' => array('onblur' => 'parent.updateCaption()'), ); $form['desc'] = array( '#type' => 'textfield', '#title' => t('Description (optional)'), '#default_value' => isset($img_data['description']) ? $img_data['description'] : '', '#size' => 50, '#maxlength' => 255, '#description' => NULL, '#attributes' => array('onblur' => 'parent.updateCaption()'), ); // Size. $form[] = array('#value' => ' | |
| ');
$form[] = array('#value' => ' ');
$form[] = array('#value' => '');
$form['size_label'] = array(
'#type' => 'select',
'#options' => $derivatives,
'#attributes' => array('onchange' => 'parent.onChangeSizeLabel()'),
);
$form['default_size'] = array('#type' => 'hidden', '#value' => sprintf('%sx%s', $default_width, $default_height));
$form[] = array('#value' => ' ');
$form[] = array('#value' => '');
$form['width'] = array(
'#type' => 'textfield',
'#default_value' => $default_width,
'#size' => 4,
'#maxlength' => 4,
'#attributes' => array('onblur' => 'parent.onChangeWidth()'),
);
$form[] = array('#value' => ' x ');
$form['height'] = array(
'#type' => 'textfield',
'#default_value' => $default_height,
'#size' => 4,
'#maxlength' => 4,
'#attributes' => array('onblur' => 'parent.onChangeHeight()'),
);
$form[] = array('#value' => ' | ');
// Alignment.
$form['align'] = array(
'#type' => 'select',
'#title' => t('Alignment'),
'#default_value' => variable_get('imagefield_assist_default_alignment', 'left'),
'#options' => array('left' => t('left'), 'right' => t('right'), 'none' => t('none'), 'center' => t('center')),
'#prefix' => ' ',
'#suffix' => ' ',
);
$form[] = array('#value' => ' | |
| ');
// Link.
if (user_access('access advanced options')) {
$form[] = array('#value' => ' ');
$form['link'] = array(
'#type' => 'select',
'#title' => t('Link'),
'#default_value' => variable_get('imagefield_assist_default_link_behavior', 'none'),
'#options' => array('none' => t('Not a link'), 'node' => t('Link to image page'), 'popup' => t('Open in popup window'), 'url' => t('Go to URL')),
'#attributes' => array('onchange' => 'parent.onChangeLink()'),
);
$form['url'] = array(
'#type' => 'textfield',
'#default_value' => variable_get('imagefield_assist_default_link_url', 'http://'),
'#size' => 25,
'#maxlength' => 255,
'#description' => NULL,
);
$form['link_options_visible'] = array(
'#type' => 'hidden',
'#value' => 1,
);
$form[] = array('#value' => ' ');
}
else {
$form['link'] = array(
'#type' => 'hidden',
'#value' => variable_get('imagefield_assist_default_link_behavior', 'none'),
);
$form['url'] = array(
'#type' => 'hidden',
'#value' => variable_get('imagefield_assist_default_link_url', 'http://'),
);
$form['link_options_visible'] = array(
'#type' => 'hidden',
'#value' => 0,
);
}
// Default link url is needed for JS to indicate if an url has been entered.
$form['default_url'] = array(
'#type' => 'hidden',
'#value' => variable_get('imagefield_assist_default_link_url', 'http://'),
);
// Support for Lightbox2
//$lightbox_enable = module_exists('lightbox2') ? TRUE : FALSE ;
$form['lightbox'] = array(
'#type' => 'checkbox',
'#type' => 'hidden', // DRET: ADDED TO HIDE CHECKOBX FOR LIGHTBOX (sorry, in this situation I didn't find a solution to restrict using only fod Advantage user)
'#title' => 'Lightbox2',
'#default_value' => 'checked', // DRET: ADDED TO MAKE LIGHTBOX ALWAYS CHECKED
'#description' => t('Enable Lightbox2 to diplay nice frame when clicking. Requires Lightbox2 module'),
'#disabled' => module_exists('lightbox2') ? FALSE : TRUE,
'#return_value' => 'true',
);
// Insert Mode (HTML or Filter Tag).
if (user_access('access advanced options')) {
$form[] = array('#value' => '');
$form['insertmode'] = array(
'#type' => 'select',
'#title' => t('Insert mode'),
'#default_value' => variable_get('imagefield_assist_default_insert_mode', 'filtertag'),
'#options' => array('filtertag' => t('Filter Tag'), 'html' => t('HTML Code')),
);
$form[] = array('#value' => ' ');
}
else {
$form['insertmode'] = array(
'#type' => 'hidden',
'#value' => variable_get('imagefield_assist_default_insert_mode', 'filtertag'),
);
}
// Hidden Fields.
$form['fid'] = array(
'#type' => 'hidden',
'#value' => $img->fid,
);
$form['update'] = array(
'#type' => 'hidden',
'#value' => $update,
);
$form['aspect'] = array(
'#type' => 'hidden',
'#value' => $aspect_ratio,
);
// Buttons.
$form['buttons'] = array(
'#prefix' => '',
);
$form['#attributes']['onsubmit'] = 'return parent.insertImage();';
$form['buttons']['insert'] = array(
'#type' => 'submit',
'#value' => ($update) ? t('Update') : t('Insert'),
'#attributes' => array('style' => 'float: left;'),
);
$form['buttons']['cancel'] = array(
'#type' => 'button',
'#value' => t('Cancel'),
'#button_type' => 'button',
'#attributes' => array('onclick' => 'return parent.cancelAction();', 'style' => 'float: right;'),
);
$form[] = array('#value' => ' | ||