Originally I had posted the line addition (’align’ => $params[’align’] //THIS LINE IS MISSING) for your Image TV to process the align.
This will fix your align problems but it will also mark your image as Invalid HTML.
Why would this happen? It has to do with how the drop widget works, in the core code a drop down menu is generated from a list in the mutate_tmplvars.dynamic.php.
Automatically "none" is selected. This will make all your images align="none" which is invalid HTML.
The Fix
1. manager/includes/tmplvars.format.inc.php
Open file and add line after style code, dont forget the comma after [’style’],: ’align’ => $params[’align’]
$id = "tv$name";
switch($format){
case 'image':
$images = parseInput($value, '||', 'array');
$o = '';
foreach($images as $image){
if(!is_array($image)) { $image = explode('==',$image); }
$src = $image[0];
if($src) {
// We have a valid source
$attributes = '';
$attr = array(
'class' => $params['class'],
'src' => $src,
'id' => ($params['id'] ? $params['id'] : ''),
'alt' => htmlspecialchars($params['alttext']),
'style' => $params['style'],
'align' => $params['align'] //THIS LINE WAS MISSING!
);
foreach ($attr as $k => $v) $attributes.= ($v ? ' '.$k.'="'.$v.'"' : '');
$attributes .= ' '.$params['attrib'];
// Output the image with attributes
$o .= '<img'.rtrim($attributes).' />';
}
}
break;
2. manager/actions/mutate_tmplvars.dynamic.php - Roughly Line 100
&align=Align;list;,baseline,top,middle,bottom,texttop,absmiddle,absbottom,left,right
to
This will remove the drop down menu but it will make your HTML valid because if nothing is input it will not automatically add align="none".
You can then input by typing - left, right, top ....(you should know these by heart now).
Hope it helps