From: <li...@us...> - 2010-02-13 21:01:05
|
Revision: 25185 http://tikiwiki.svn.sourceforge.net/tikiwiki/?rev=25185&view=rev Author: lindonb Date: 2010-02-13 21:00:56 +0000 (Sat, 13 Feb 2010) Log Message: ----------- [FIX] Allow &scale and &preview url parameters to work together and &thumbnail and &preview to work with dimension parameters. Modified Paths: -------------- trunk/lib/wiki-plugins/wikiplugin_img.php Modified: trunk/lib/wiki-plugins/wikiplugin_img.php =================================================================== --- trunk/lib/wiki-plugins/wikiplugin_img.php 2010-02-13 20:33:38 UTC (rev 25184) +++ trunk/lib/wiki-plugins/wikiplugin_img.php 2010-02-13 21:00:56 UTC (rev 25185) @@ -662,8 +662,6 @@ preg_match('/(?<=\&x=)[0-9]+(?=.*)/', $src, $urlx); preg_match('/(?<=\&y=)[0-9]+(?=.*)/', $src, $urly); preg_match('/(?<=\&scale=)[0]*\.[0-9]+(?=.*)/', $src, $urlscale); - if ($urlthumb != false ) $imgdata['max'] = 120; - if ($urlprev != false ) $imgdata['max'] = 800; if (!empty($urlmax[0]) && $urlmax[0] > 0) $imgdata['max'] = $urlmax[0]; if (!empty($urlx[0]) && $urlx[0] > 0) $imgdata['width'] = $urlx[0]; if (!empty($urly[0]) && $urly[0] > 0) $imgdata['height'] = $urly[0]; @@ -673,6 +671,8 @@ $imgdata['width'] = ''; $imgdata['height'] = ''; } + if ($urlthumb != false && empty($imgdata['height']) && empty($imgdata['width']) && empty($imgdata['max'])) $imgdata['max'] = 120; + if ($urlprev != false && empty($urlscale[0]) && empty($imgdata['height']) && empty($imgdata['width']) && empty($imgdata['max']) ) $imgdata['max'] = 800; } //Note if image gal url thumb parameter is used $imgalthumb = false; @@ -807,8 +807,7 @@ ) { $src .= '&max=' . $imgdata['max']; } elseif (!empty($width) || !empty($height)) { - if ((!empty($width) && !empty($height)) && (empty($urlx[0]) && empty($urly[0]) - && empty($urlthumb) && empty($urlscale[0]))) { + if ((!empty($width) && !empty($height)) && (empty($urlx[0]) && empty($urly[0]) && empty($urlscale[0]))) { $src .= '&x=' . $width . '&y=' . $height; } elseif (!empty($width) && (empty($urlx[0]) && empty($urlthumb) && empty($urlscale[0]))) { $src .= '&x=' . $width; @@ -1109,7 +1108,7 @@ } } } else { - $styleboxinit = $imgdata['stylebox']; + $styleboxinit = $imgdata['stylebox'] . ';'; } } if (empty($imgdata['button']) && empty($imgdata['desc']) && empty($styleboxinit)) { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |