초보 최신글관련 질문좀 드립니다.

초보 최신글관련 질문좀 드립니다.

QA

초보 최신글관련 질문좀 드립니다.

본문

안녕하세요 최신글관련 질문좀 드립니다.

아래 소스는  그누메인화면에 사용하고 있는 최신글 소스인데요 메인화면에서 이미지 클릭했을때

1번링크로 바로 이동하게 하고 싶은데 고수님들 한수 지도좀 부탁합니다.

"새해 복 많이 받으세요 감사합니다"

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가

$cols  = 4; //  이미지 가로갯수 //  이미지 세로 갯수는 메인에서 지정(총 이미지 수)
$imgwidth=250; //표시할 이미지의 가로사이즈
$imgheight=300; //표시할 이미지의 세로사이즈
$image_h  = 0; // 이미지 상하 간격

$col_width = (int)(100 / $cols);

$data_path = $g4[path]."/data/file/$bo_table";
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td bgcolor="F5F5F5">
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
   <tr>
   <td width="100" align="center" bgcolor="red"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><font color="white">전체보기</font></td>
     <td height="35" style="padding-left:10px;"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>"><b><?=$board[bo_subject]?></b></a></td>
     <td width="30" height="35" align="center" valign="middle"><a href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>">
     <img src="<?=$latest_skin_path?>/img/btn_more.gif" alt="전체보기" border="0" title="전체보기" /></a></td>
   </tr>
       </table>
 </td>
  </tr>
  <tr>
    <td height="0"><!--여백--></td>
  </tr>
  <tr>
    <td align="center" valign="top"> 
  <table width="100%" cellspacing="0" cellpadding="0">
    <tr>
   <? for ($i=0; $i<count($list); $i++) {
     if ($i>0 && $i%$cols==0) { echo "</tr><tr><td colspan='$cols' height='$image_h'></td></tr><tr>"; }
   ?>    
   <td width="<?=$col_width?>%" align="center" valign="top" style="padding-top:10px;">
   <?
   $image = $list[$i][file][0][file]; //원본
   $img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
   
    echo $list[$i][icon_reply] . " ";
    echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
    echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'><img src='$img' width='{$imgwidth}' height='{$imgheight}' align='center' style='width:{$imgwidth}px;height:{$imgheight}px;border:10px solid white; padding:0px'></a></td></tr>";
    echo "<tr><td align='center' height='17'><a href='{$list[$i]['href']}'><span style='font-size:9pt;'><b>{$list[$i]['subject']}</b></span></a></td></tr>";
   echo "</table>";
   ?>   
   </td>
   <? } ?>    
   <?
   $cnt = ($i%$cols);
   for ($k=$cnt; $k<$cols && $cnt; $k++) {
    echo "<td width=$col_width%></td>";
   }
   ?>
   <? if (count($list) == 0) { echo "<td align=center>게시물이 없습니다.</td>"; } ?>   
    </tr>
  </table>
 </td>
  </tr>
</table>

이 질문에 댓글 쓰기 :

답변 6

<a href='{$list[$i]['wr_link1']}'><img ....
<?
   $image = $list[$i][file][0][file]; //원본
   $img=$data_path. "/".$image;  //썸네일이 없을경우 원본출력
   
    echo $list[$i][icon_reply] . " ";
    echo "<table width='100%' cellpadding='0' cellspacing='0' border='0'>";
    echo "<tr><td valign='top' align='center'><a href='{$list[$i]['href']}'><img src='$img' width='{$imgwidth}' height='{$imgheight}' align='center' style='width:{$imgwidth}px;height:{$imgheight}px;border:10px solid white; padding:0px'></a></td></tr>";
    echo "<tr><td align='center' height='17'><a href='{$list[$i]['href']}'><span style='font-size:9pt;'><b>{$list[$i]['subject']}</b></span></a></td></tr>";
   echo "</table>";
   ?>  
 
빨간부분을 지우고 넣으시면 됩니다.
그뒤가 이미지 출력하는부분이니깐요
<a href='{$list[$i]['wr_link1']}' target='_blank'><img ....
히어님 혹시 게시판 또는 최신글에 동영상올리면 이미지따로 안올리고 동영상이미지 출력되게끔 할수는 없나요 ?
답변을 작성하시기 전에 로그인 해주세요.
전체 10,633
QA 내용 검색
  • 개별 목록 구성 제목 답변작성자조회작성일
  • 질문이 없습니다.

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT