Thx uny for this note:
there is missing an option for vertical align => middle
also, I'd change horisontal align from "middle" to "center" so, it would be same in HTML
here is little changes u'll need to do:
in
lang/<yourlanguage>/admin.phpin the come u added, locate two arrays:
$annotation_v_positioning_optionlist = array(
"top" => "image top",
"bottom" => "image bottom"
);
$annotation_h_positioning_optionlist = array(
"left" => "left image edge",
"middle" => "image middle",
"right" => "right image edge"
);
Replace it with:
$annotation_v_positioning_optionlist = array(
"top" => "image top",
"middle" => "image middle",
"bottom" => "image bottom"
);
$annotation_h_positioning_optionlist = array(
"left" => "left image edge",
"center" => "image center",
"right" => "right image edge"
);
and in
/includes/annotate.php find:
case "middle" : $h_offset = (($isz[0]/2) - ($ann_text_width/2)); break;
Replace with:
case "center" : $h_offset = (($isz[0]/2) - ($ann_text_width/2)); break;
then, add this code:
case "middle" : $v_offset = (($isz[1]/2) - ($ann_text_height/2)); break;
after this:
case "top" : $v_offset = $ann_text_height + $ann_top_offset; break;
[EDITED]
seems it might be confused, so, here is how peace of code in annotate.php should looks like:
switch ($horisontal) {
case "left" : $h_offset = $ann_left_offset; break;
case "center" : $h_offset = (($isz[0]/2) - ($ann_text_width/2)); break;
case "right" : $h_offset = ($isz[0] - $ann_text_width - $ann_right_offset - $ann_font_size); break;
// case "right" : $h_offset = ($isz[0] - $ann_text_width - $ann_right_offset); break;
}
switch ($vertical) {
case "top" : $v_offset = $ann_text_height + $ann_top_offset; break;
case "middle" : $v_offset = (($isz[1]/2) - ($ann_text_height/2)); break;
case "bottom" : $v_offset = $isz[1] - ($ann_text_height/2) - $ann_bottom_offset; break;
}
P.S.
case "right" might be different then in the original code, that's the reason I didnt post whole code at the begining.