1
0

* Removed inline styles of the s9y media insertion, they will now

properly utilize CSS classes (defined in the new file
      style_fallback.css). Also added support for entering "ALT"
      attributes to an <img> tag, can be used as a media property if
      you add "ALT" to the list of "Media properties" in the
      main configuration. (garvinhicking)
This commit is contained in:
Garvin Hicking
2009-07-14 09:22:06 +00:00
parent 796e7ff96a
commit 97710fe021
73 changed files with 350 additions and 38 deletions

View File

@ -659,7 +659,7 @@ function serendipity_makeThumbnail($file, $directory = '', $size = false, $thumb
}
$newSize = $r['width'] . 'x' . $r['height'];
if ($fdim['mime'] == 'application/pdf') {
$cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -flatten -scale '. serendipity_escapeshellarg($newSize) .' '. serendipity_escapeshellarg($infile) .' '. serendipity_escapeshellarg($outfile . '.png');
$cmd = escapeshellcmd($serendipity['convert']) . ' -antialias -flatten -scale '. serendipity_escapeshellarg($newSize) .' "'. serendipity_escapeshellarg($infile) .'[0]" '. serendipity_escapeshellarg($outfile . '.png');
} else {
if (!$force_resize && serendipity_ini_bool(ini_get('safe_mode')) === false) {
$newSize .= '>'; // Tell imagemagick to not enlarge small images, only works if safe_mode is off (safe_mode turns > in to \>)
@ -2384,6 +2384,7 @@ function serendipity_parseMediaProperties(&$dprops, &$keywords, &$media, &$props
'COPYRIGHT' => array('Creator'),
'TITLE' => array('Title', 'ObjectName'),
'COMMENT1' => array('Description'),
'ALT' => array('Title', 'ObjectName'),
'COMMENT2' => array('Keywords', 'PhotoLocation')
);
}
@ -2414,6 +2415,11 @@ function serendipity_parseMediaProperties(&$dprops, &$keywords, &$media, &$props
$default_iptc_val = $media['realname'];
}
case 'ALT':
if (!isset($default_iptc_val)) {
$default_iptc_val = '';
}
case 'COMMENT1':
if (!isset($default_iptc_val)) {
$default_iptc_val = '';