i

사진설명글....

아래코드는 사진에 설명글을 쓰는 소스입니다
갤러리스킨에  덮어쓰라고 소스를 오달수님이
가르쳐 주신건데요...
왜???사진이 섬네일 처럼 조그맣게 나오는지 모르겠어요...
원본크기로 나오기를 고대하는데..
답변 부탁합니다...
<?
 // 파일 출력
 for($i=0; $i<=count($view[file]); $i++) {
  if($view[file][$i][view])
 ###############################################
  $img_width=100;
  $f_type=""; $f_style=""; $f_path=""; $f_file ="";
  // echo"파일타입: {$view[file][$i][image_type]}<br>";
  $f_type=$view[file][$i][image_type];
  if($f_type=='1' || $f_type=='2' || $f_type=='3' ||$f_type=='6' || $f_type=='7') $f_style="img";
    else if($f_type=='4') $f_style="movie_img";//쭉..형태추가
    else if($f_type=='0') $f_style="file_link";
    $f_file = urlencode($view[file][$i][file]);
    $f_path="{$view[file][$i][path]}";
  ###############################################
  if($view[file][$i][source] && @filesize("{$f_path}/{$f_file}") !=0)
  {$view[file][$i][href]="$f_path/$f_file";
    if(preg_match("/\.(jp[e]?g|tif|bmp|gif|png)$/i","$f_file")
    && file_exists("$f_path/$f_file")&& $f_style=="img")
  {//이미지면 끝
    echo"<p align='center'><a href='{$view[file][$i][href]}'><img src='$f_path/$f_file' width='$img_width' border='0'><br>";
    echo"</a><br>";
    echo"이미지크기:<font color='red'>{$view[file][$i][image_width]} x {$view[file][$i][image_height]}</font><br>";
    echo"이미지설명:<font color='blue'>{$view[file][$i][bf_content]}</font><br>";
    echo"<br>";
  }else
  echo $view[file][$i][view];
  }//if 다운소스가 존재하면
  echo"</p>";
  ###############################################
  }//for 끝
  ?>
|

댓글 3개

<?
// 파일 출력
for($i=0; $i<=count($view[file]); $i++) {
if($view[file][$i][view]){
echo"<p align='center'>
echo $view[file][$i][view];
echo"<br>이미지설명:<font color='blue'>{$view[file][$i][bf_content]}</font>";
echo"<br>";
echo"</p>";
}
}//for 끝
?>
답변 감사합니다만...잘안되네요...
오달수님의
코멘트로 달아주신 부분으로 시도했더니 누락된 부분이 있어서 오류가 나는데,
아래와 같이 고쳐서 하니 잘 되고 성공하였습니다.
덕분에 겔러리 잘 사용하게 되었습니다.

<?
// 파일 출력
for($i=0; $i<=count($view[file]); $i++) {
if($view[file][$i][view]){
echo"<p align='center'>";
echo $view[file][$i][view];
echo"<br>";
// echo"<br><font color='blue'>{$view[file][$i][bf_content]}</font>";
echo"<br>{$view[file][$i][bf_content]}";
echo"<br>";
echo"</p>";
}
}//for 끝
?>

수정한 파일은 스킨/보드/갤러리스킨 폴더의 view.skin.php 입니다.
댓글을 작성하시려면 로그인이 필요합니다. 로그인

그누4 질문답변

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

+
제목 글쓴이 날짜 조회
19년 전 조회 1,446
19년 전 조회 1,573
19년 전 조회 1,375
19년 전 조회 1,556
19년 전 조회 1,587
19년 전 조회 2,269
19년 전 조회 1,573
19년 전 조회 2,102
19년 전 조회 1,569
19년 전 조회 1,515
19년 전 조회 1,725
19년 전 조회 1,922
19년 전 조회 1,554
19년 전 조회 1,632
19년 전 조회 2,330
19년 전 조회 2,370
19년 전 조회 1,557
19년 전 조회 1,429
19년 전 조회 1,506
19년 전 조회 1,629
🐛 버그신고