최근게시물 질문입니다..(ㅜ.ㅜ) > 그누4 질문답변

그누4 질문답변

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

최근게시물 질문입니다..(ㅜ.ㅜ) 정보

최근게시물 질문입니다..(ㅜ.ㅜ)

본문

오류가 나는곳의 주소를 알려주시면 더 빠르고 정확하게 답변 받을 수 있습니다.

오류 주소 :

최근게시물의 동영상스킨을 수정중인데요
중간에 이미지가 들어가는 형식 때문에 고치는 중에 알 수가 없어서 질문합니다;;

index.html에 <echo latest(2);> 이렇게 넣어서 출력하면 한개의 게시판에서 최근게시물이 2줄이 뽑혀져 나오잖아요
저는 그 2줄 가운데에 이미지를 넣고 싶은데 어찌해야 할지 몰라서

스킨들을 공부하다 보니 j값, i값으로 나눠서 출력하더라구요.
그래서 똑같은 테이블을 밑에 한개를 더 복사해서 그 부분은 i값으로 줬는데도
띄워보면 똑같은 내용만 두번 나오는데,,뭐가 잘못된 것일까요?

아니면 게시물 2줄 불러올 때 중간에 이미지 한개만 들어갈 수 있게 하는 법 없을까요?
(한번만 불러와지도록-)
이미지 넣으면 index.html에 쓰는 <echo latest(2);>이걸 쓸 때 이미지가 2개가 되버립니다;

소스는 밑에..넘 길다고 하지 마시구요..ㅜ.ㅜ

<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<style type="text/css">
<!--
.style1 { color: #737373; font-weight: bold; }
-->
</style>


<a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$j][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=420,height=484');"></a>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><table width="269" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="168" height="34" colspan="3" background="<?=$latest_skin_path?>/img/all-bg.gif"><img src="<?=$latest_skin_path?>/img/title1.gif" width="269" height="34" border="0" usemap="#Map" /></td>
    </tr>
</table></td>
  </tr>
  <? for ($j=0; $j<count($list); $j++) {
$img="$g4[path]/data/file/$bo_table/thumb/{$list[$j][wr_id]}";
    if (!file_exists($img) || !$list[$j][file][0][file])
    $img = "$latest_skin_path/img/no_image.gif";
  ?>
  <tr>
    <td><table width="269" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td height="30" background="<?=$latest_skin_path?>/img/title_bg.gif" style="padding-left:36px; padding-right:30px; padding-top:3px"><span class="style2" style="padding-left:3px; LINE-HEIGHT: 145%;"><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$j][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=420,height=484');"><span class="style2" style="padding-left:3px; LINE-HEIGHT: 145%;"><?=$list[$j][wr_subject]?>
      </a></span>
        <?=$list[$j][icon_new]?></td>
        </tr>
    <tr>
      <td background="<?=$latest_skin_path?>/img/all-bg.gif"><table width="269"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="5" colspan="3" valign="bottom">   </td>
          </tr>
        <tr>
          <td width="109" valign="bottom"><table width="77" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="1"></td>
                    <td width="76" style="padding-left:18px"><table width="62" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA">
                      <tr>
                        <td width="60" ><table  border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
                          <tr>
                            <td><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$j][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=741,height=472');"><img src='<?=$img?>' width='70' height="53"  border="0" /></a></td>
                              </tr>
                          </table></td>
                        </tr>
                      </table></td>
                  </tr>
            </table></td>
              <td width="10"></td>
              <td width="150" valign="top" style="padding-right:10px"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="50"><img src="<?=$latest_skin_path?>/img/arr.gif" width="5" height="5" vspace="3" align="absmiddle" /> <span class="style1">제목 :</span> </td>
                    <td width="70" height="21" class="style1" style="padding-left:3px; LINE-HEIGHT: 145%;"><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$j][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=741,height=472');">
                      <?=cut_str(strip_tags($list[$j][wr_1]),8,"...")?>
                      </a></td>
                  </tr>
                <tr>
                  <td><img src="<?=$latest_skin_path?>/img/arr.gif" width="5" height="5" vspace="3" align="absmiddle" /> <strong class="style1">날짜 :</strong> </td>
                    <td height="21" class="style1" style="padding-left:3px;"><span class="c_date">
                      <?=$list[$j][wr_2]?>
                      </span></td>
                  </tr>
                <tr>
                  <td height="21" colspan="2" style="padding-left:8px"><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$j][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=741,height=472');"> <img src="<?=$latest_skin_path?>/img/view.gif" width="53" height="16" vspace="3" border="0" /></a></td>
                  </tr>
                </table></td>
            </tr>
        </table></td>
        </tr>
    <tr>
      <td height="30" valign="bottom" background="<?=$latest_skin_path?>/img/all-bg.gif"><img src="<?=$latest_skin_path?>/img/title2.gif" width="269" height="20" border="0" usemap="#Map2" />
        <map name="Map2" id="Map2">
          <area shape="rect" coords="212,4,255,25" href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" />
        </map>        </td>
    </tr>
<? } ?>
    <tr>
<? for ($i=0; $i<count($list); $i++) {
$img="$g4[path]/data/file/$bo_table/thumb/{$list[$i][wr_id]}";
    if (!file_exists($img) || !$list[$i][file][0][file])
    $img = "$latest_skin_path/img/no_image.gif";
    ?>
      <td height="30" background="<?=$latest_skin_path?>/img/title_bg.gif" style="padding-left:36px; padding-right:30px; padding-top:3px"><span class="style2" style="padding-left:3px; LINE-HEIGHT: 145%;"><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=420,height=484');"><span class="style2" style="padding-left:3px; LINE-HEIGHT: 145%;"><?=$list[$i][wr_subject]?>
      </a></span>
        <?=$list[$i][icon_new]?></td>
    </tr>
    <tr>
      <td background="<?=$latest_skin_path?>/img/all-bg.gif"><table width="269"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td height="5" colspan="3" valign="bottom">   </td>
          </tr>
        <tr>
          <td width="109" valign="bottom"><table width="77" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="1"></td>
                    <td width="76" style="padding-left:18px"><table width="62" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA">
                      <tr>
                        <td width="60" ><table  border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
                          <tr>
                            <td><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=741,height=472');"><img src='<?=$img?>' width='70' height="53"  border="0" /></a></td>
                              </tr>
                          </table></td>
                        </tr>
                      </table></td>
                  </tr>
            </table></td>
              <td width="10"></td>
              <td width="150" valign="top" style="padding-right:10px"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr>
                  <td width="50"><img src="<?=$latest_skin_path?>/img/arr.gif" width="5" height="5" vspace="3" align="absmiddle" /> <span class="style1">제목 :</span> </td>
                    <td width="70" height="21" class="style1" style="padding-left:3px; LINE-HEIGHT: 145%;"><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=741,height=472');">
                      <?=cut_str(strip_tags($list[$i][wr_1]),8,"...")?>
                      </a></td>
                  </tr>
                <tr>
                  <td><img src="<?=$latest_skin_path?>/img/arr.gif" width="5" height="5" vspace="3" align="absmiddle" /> <strong class="style1">날짜 :</strong> </td>
                    <td height="21" class="style1" style="padding-left:3px;"><span class="style1" style="padding-left:3px;"><span class="c_date">
                      <?=$list[$i][wr_2]?>
                    </span></span></td>
                  </tr>
                <tr>
                  <td height="21" colspan="2" style="padding-left:8px"><a href="javascript://"  onclick="window.open('<?=$g4[path]?>/skin/board/movie/movie.php?bo_table=<?=$bo_table?>&amp;wr_id=<?=$list[$i][wr_id]?>', '', 'scrollbars=no,resizeable=no,toolbar=no,status=no,top=100,left=100,width=741,height=472');"> <img src="<?=$latest_skin_path?>/img/view.gif" width="53" height="16" vspace="3" border="0" /></a></td>
                  </tr>
                </table></td>
            </tr>
        </table></td>
    </tr>
    <tr>
      <td valign="bottom" background="<?=$latest_skin_path?>/img/all-bg.gif"><img src="<?=$latest_skin_path?>/img/w_bottom.gif" width="269" height="44"></td>
    </tr>
   
  </table></td></tr>
 
 
  <? } ?>
</td></tr>
</table>
 

<map name="Map" id="Map"><area shape="rect" coords="217,19,258,33" href="<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>" /></map>

댓글 전체

그냥 무조건 2 개만 나오게 한다면

</tr>
<? } ?>

  요기에 필요한 이미지 추가

    <tr>
둘 째 loop <? for ($i=0; $i<count($list); $i++) {


=====================================

다음 처럼 수정

첫째 <? for ($i=0; $i<count($list); $i++) {

==>

<? $i=0; {

둘째 <? for ($i=0; $i<count($list); $i++) {

==>

<? $i=1; {
전체 66,554 |RSS
그누4 질문답변 내용 검색

회원로그인

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