function theme_imagepicker_insert in Image Picker 6.2
Same name and namespace in other branches
- 7 imagepicker.module \theme_imagepicker_insert()
1 theme call to theme_imagepicker_insert()
File
- ./
imagepicker.module, line 1535 - Enables permitted roles to upload images for insertion into configured nodes.
Code
function theme_imagepicker_insert($img = '', $public = FALSE, $form1 = '', $form2 = '') {
$output = "";
if ($img) {
$imgpath = imagepicker_get_image_path($img, 'browser', $public ? array(
'name' => $img['name'],
'uid' => $img['uid'],
) : FALSE);
$output .= '<div class="imgp_help">' . t('Choose the settings you want, place the cursor in the Body box above and Insert image.') . '</div>';
if ($img['img_title']) {
$output .= '<div id="imgp_img_holder_title">' . $img['img_title'] . '</div>';
}
if ($img['img_description']) {
$output .= '<div id="imgp_img_holder_description">' . nl2br($img['img_description']) . '</div>';
}
$output .= '<div id="imgp_img_holder">';
$output .= '<img id="imgp_img" src="' . $imgpath . '" alt="' . $img['img_title'] . '" title="' . $img['img_name'] . '" />';
$output .= '</div>';
$output .= $form1;
$output .= $form2;
}
return $output;
}