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

· 12년 전 · 2032 · 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'>
답변 너무 감사드립니다 해결했어요..


// 파일 출력
$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 질문답변

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

+
제목 글쓴이 날짜 조회
12년 전 조회 2,626
12년 전 조회 2,491
12년 전 조회 524
12년 전 조회 3,638
12년 전 조회 743
12년 전 조회 697
12년 전 조회 759
12년 전 조회 784
12년 전 조회 1,570
12년 전 조회 2,033
12년 전 조회 1,517
12년 전 조회 1,281
12년 전 조회 841
12년 전 조회 625
12년 전 조회 1,516
12년 전 조회 834
12년 전 조회 1,519
12년 전 조회 1,706
12년 전 조회 1,919
12년 전 조회 664
🐛 버그신고