Skip to content

Commit

Permalink
refs #514
Browse files Browse the repository at this point in the history
 * 1.8 트리와 동기화
  • Loading branch information
inureyes committed Dec 24, 2010
1 parent b60df35 commit 4d28350
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions library/view/view.php
Original file line number Diff line number Diff line change
Expand Up @@ -1256,7 +1256,11 @@ function getEntryContentView($blogid, $id, $content, $formatter, $keywords = arr
$view = preg_replace('@\[#####_#####_#####_image_#####_#####_#####\]@', $images[$i][0], $view, 1);
continue;
}


$attributes = preg_match('/(style="cursor: pointer;" onclick="open_img\((.[^"]+)\); return false;")/si', $images[$i][2], $matches) ? ' '.$matches[1] : '';
$attributes .= preg_match('/(alt="(.[^"]+)")/si', $images[$i][2], $matches) ? ' '.$matches[1] : ' alt="resize"';
$attributes .= preg_match('/(title="(.[^"]+)")/si', $images[$i][2], $matches) ? $title = ' '.$matches[1] : '';

$tempFileName = array_pop(explode('/', $images[$i][1]));
if (preg_match('/(.+)\.w(\d{1,})\-h(\d{1,})\.(.+)/', $tempFileName, $matches))
$tempFileName = $matches[1].'.'.$matches[4];
Expand All @@ -1268,7 +1272,7 @@ function getEntryContentView($blogid, $id, $content, $formatter, $keywords = arr
if (isset($tempAttributes['width']) && ($tempOriginInfo[0] > $tempAttributes['width'])) {
$image = Utils_Image::getInstance();
list($tempImageURL, $tempImageWidth, $tempImageHeight, $tempImageSrc) = $image->getImageResizer($tempFileName, array('width' => $tempAttributes['width']));
$newImage = "<img src=\"{$tempImageURL}\" width=\"{$tempImageWidth}\" height=\"{$tempImageHeight}\" alt=\"resize_image\" />";
$newImage = "<img src=\"{$tempImageURL}\" width=\"{$tempImageWidth}\" height=\"{$tempImageHeight}\"{$attributes}/>";
}
}
$view = preg_replace('@\[#####_#####_#####_image_#####_#####_#####\]@', $newImage, $view, 1);
Expand Down

0 comments on commit 4d28350

Please sign in to comment.