view.skin.php 파일첨부 이미지

· 2013-04-03 (수) 23:33:45 · 2147 · 2
view.skin.php 파일첨부 이미지 말인데요

100% 주고싶은데요

어떻게 봐꾸어야할지 모르겠어요..답답해서 올려볼게요

고수님좀 알려주시면 감사하겠습니다.

// 파일 출력
$tmp_width=" width='{$board[bo_image_width]}' name=";
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view]){
if($view[file][$i][image_width] >= $board[bo_image_width])
$view[file][$i][view]=preg_replace("/name=/i",$tmp_width,$view[file][$i][view]);

$src = $view[file][$i][path]."/".$view[file][$i][file];
$images= $view[file][$i][view];

$images = str_replace("name='target_resize_image[]'","",$view[file][$i][view]);
$images = str_replace("onclick='image_window(this);' style='cursor:pointer;'","class='view_img'",$images);
if ($width > 100) { $width = $width."px"; } else { $width = $width; }


echo "<p class='ac' style='width:$width'><a class=\"fancybox\" href='$src' data-fancybox-group='$view[wr_id]' title='$view[wr_subject]'>".$images . "</a><span class='img_shadow'></span></p>";
|

댓글 2개

$images<--여기에 폭을 설정하는 태그가 들어있기 때문입니다
$images=~~ 부분 다 지워버리고 그냥 $src를 이용해서 원하는 태그를 만들면 됩니다
<img src='$src' width='$width' class='view_img'>
2013-04-04 (목) 08:00:09
답변 너무 감사드립니다 해결했어요..


// 파일 출력
$tmp_width=" width='{$board[bo_image_width]}' name=";
for ($i=0; $i<=count($view[file]); $i++) {
if ($view[file][$i][view]){
if($view[file][$i][image_width] >= $board[bo_image_width])
$view[file][$i][view]=preg_replace("/name=/i",$tmp_width,$view[file][$i][view]);

$src = $view[file][$i][path]."/".$view[file][$i][file];
//$images= $view[file][$i][view];

//$images = str_replace("name='target_resize_image[]'","",$view[file][$i][view]);
//$images = str_replace("onclick='image_window(this);' style='cursor:pointer;'","class='view_img'",$images);
if ($width > 100) { $width = $width."px"; } else { $width = $width; }


//echo "<p class='ac' style='width:$width'><a class=\"fancybox\" href='$src' data-fancybox-group='$view[wr_id]' title='$view[wr_subject]'>".$images . "</a><span class='img_shadow'></span></p>";
echo "<p class='ac' style='width:$width'><a class=\"fancybox\" href='$src' data-fancybox-group='$view[wr_id]' title='$view[wr_subject]'><img src='$src' width='$width' class='view_img'></a><span class='img_shadow'></span></p>";
댓글을 작성하시려면 로그인이 필요합니다.

그누4 질문답변

66,531건

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기 기존 게시물은 열람만 가능합니다.

+
제목 글쓴이 날짜 조회
13-04-04 조회 874
13-04-04 조회 1,683
13-04-03 조회 2,148
13-04-03 조회 1,624
13-04-03 조회 1,370
13-04-03 조회 938
13-04-03 조회 722
13-04-03 조회 1,642
13-04-03 조회 947
13-04-03 조회 1,620
13-04-03 조회 1,817
13-04-03 조회 2,031
13-04-03 조회 767
13-04-03 조회 850
13-04-03 조회 1,178
13-04-03 조회 1,679
13-04-03 조회 938
13-04-03 조회 1,704
13-04-03 조회 1,307
13-04-03 조회 1,145