From: <var...@us...> - 2021-12-07 14:51:43
|
Revision: 10745 http://sourceforge.net/p/phpwiki/code/10745 Author: vargenau Date: 2021-12-07 14:51:42 +0000 (Tue, 07 Dec 2021) Log Message: ----------- PhotoAlbum plugin: use CSS Modified Paths: -------------- trunk/lib/plugin/PhotoAlbum.php Modified: trunk/lib/plugin/PhotoAlbum.php =================================================================== --- trunk/lib/plugin/PhotoAlbum.php 2021-12-07 14:02:01 UTC (rev 10744) +++ trunk/lib/plugin/PhotoAlbum.php 2021-12-07 14:51:42 UTC (rev 10745) @@ -255,7 +255,10 @@ $size = getimagesize($value["src"]); // try " " => "\\ " $newwidth = $this->newSize($size[0], $width); if ($width != 'auto' && $newwidth > 0) { - $params = array_merge($params, array("width" => $newwidth)); + if (is_numeric($newwidth)) { + $newwidth = $newwidth.'px'; + } + $params = array_merge($params, array("style" => 'width: '.$newwidth)); } if (($mode == 'thumbs' || $mode == 'tiles' || $mode == 'list')) { if (!empty($size[0])) { @@ -287,6 +290,9 @@ } else { $newcellwidth = $cellwidth; } + if (is_numeric($newcellwidth)) { + $newcellwidth = $newcellwidth.'px'; + } $cell = array_merge($cell, array("style" => 'width: '.$newcellwidth)); } if (in_array("nowrap", $attributes)) { @@ -639,7 +645,7 @@ } if (array_key_exists('width', $params)) { return HTML::img(array('src' => $src, - 'width' => $params['width'], + 'style' => 'width: '.$params['width'], 'alt' => $params['alt'])); } else { return HTML::img(array('src' => $src, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |