게시판 첫글을 보여줄 때 문의드려요. > 그누4 질문답변

그누4 질문답변

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

게시판 첫글을 보여줄 때 문의드려요. 정보

게시판 첫글을 보여줄 때 문의드려요.

본문

안녕하세요~~
 
게시판에서 가장 최근에 보여지는 게시물 하나는 이미지와 내용 조금씩 보여주고 싶습니다.
현재 게시판에서 가능할까요?
 
답변 부탁드려요~
  • 복사

댓글 전체

스킨 중에  첨부파일인가 아이디인가 vozzang_blue이란 이름으로 올라온 것을 수정한 것입니다.
조잡하지만 첫째만 이미지 보이고 나머지는 제목만 나옵니다.

<?
$image_height = 80; // 높이
$image_width  = 70; // 너비

?><table cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;"><tr><td height="44" width="35" background="<?=$latest_skin_path?>/img/
ic.gif"></td><td height=28 background="<?=$latest_skin_path?>/img/back.gif"><img border=0 height=2 width=1><br><a
 href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><font color="#082163"><b><?=$board[bo_subject]?>
</b></font></a></td>
        <td width="166" height="28" background="<?=$latest_skin_path?>/img/ic2.gif">&nbsp;</td>
</tr></table><!--

title vozzang

--><table border=0 cellpadding="0" cellspacing="0" width="100%" style="table-layout: fixed;">
<tr><td height=5></td></tr></table>

<table border=0 width=100% cellpadding=0 cellspacing=1 style="table-layout: fixed;">
<? for ($i=0; $i<count($list); $i++) { ?>

<? if ($i==0 ){

        ?><tr><td width=90 rowspan=3><?

        echo "<a href='{$list[$i][href]}'>";
        $image = urlencode($list[$i][file][0][file]); // 첫번째 파일이 이미지라면
        if (preg_match("/\.(gif|jpg|png)$/i", $image)) {
                echo "<img src='$g4[path]/data/file/$bo_table/$image' width='$image_width' height='$image_height'  border=3 style='border-color:EFEFEF;'
align=left>"; // 이미지크기
        } else
                echo "<img src='$latest_skin_path/img/noimage.gif' width='$image_width' height='$image_height' border=3 style='border-color:EFEFEF;' alig
n=left>";
        echo "</a>";

        ?></td><td width='*' height=22 valign=top>
<table border=0 width=100% height=30 cellpadding=0 cellspacing=1 style="table-layout: fixed;">
<tr><td height=22 width="263"><nobr><?
                echo $list[$i][icon_reply] . " ";
                echo "<a href='{$list[$i][href]}'>";
                if ($list[$i][is_notice])
                        echo "<font style='font-family:돋움; font-size:9pt; color:#53748D;'><strong>{$list[$i][subject]}</strong></font>";
                else
                        echo "<font style='font-family:돋움; font-size:9pt; color:#53748D;'><b>{$list[$i][subject]}</b></font>";
                echo "</a>";

                if ($list[$i][comment_cnt])
                        echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt
]}</span></a>";

                // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
                // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

                if( $list[$i][ca_name]) { ?> [<a href="<?=$list[$i][ca_name_href]?>"><?=$list[$i][ca_name]?></a>]<? }
                ?></nobr></td>
                        <td align=right width="90">
                                <font style="font-size:8pt;font-weight:bold; color=#EA5860;"><?=$list[$i][datetime]?></font>
                        </td>
                </tr>
                </table></td></tr>
        <tr><td height=1 background='<?=$latest_skin_path?>/img/line_width.gif'></td></tr>
        <tr><td width='*' height=75 valign=middle align=justify><img border=0 height=8 width=1><br>
                        <a href='<?=$list[$i][href]?>' onfocus="this.blur();"><font style='font-family:돋움; font-size:9pt; color:#707271;' onfocus="blur
();"><?=nl2br(stripslashes(cut_str( trim( strip_tags( $list[$i][wr_content])), 200, '...' )))?></font></a>
                </td>
        </tr>



<!-- 경계선 -->
<tr height=5><td colspan=2></td></tr>
<tr bgcolor=#E9E9E9 height=1><td colspan=2></td></tr>
<tr height=5><td colspan=2></td></tr>
<? }else{?>

<tr><td height="20" colspan=2>

<table width="100%" border=0 style="table-layout: fixed;">
<tr><td wwidth=280>&nbsp;
                <img src='<?=$latest_skin_path?>/img/icon_li.gif'>&nbsp;

                <?
        echo $list[$i][icon_reply] . " ";
        echo "<a href='{$list[$i][href]}'>";
        if ($list[$i][is_notice])
            echo "<font style='font-family:돋움; font-size:9pt; color:#53748D;'><strong>{$list[$i][subject]}</strong></font>";
        else
            echo "<font style='font-family:돋움; font-size:9pt; color:#53748D;'>{$list[$i][subject]}</font>";
        echo "</a>";

        if ($list[$i][comment_cnt])
            echo " <a href=\"{$list[$i][comment_href]}\"><span style='font-family:돋움; font-size:8pt; color:#9A9A9A;'>{$list[$i][comment_cnt]}</span></a
>";

        // if ($list[$i]['link']['count']) { echo "[{$list[$i]['link']['count']}]"; }
        // if ($list[$i]['file']['count']) { echo "<{$list[$i]['file']['count']}>"; }

        if( $list[$i]['ca_name']) { ?> [<a href="<?=$list[$i]['ca_name_href']?>"><?=$list[$i]['ca_name']?></a>]<? }

        ?></td>
        <td width=70 valign=right><font style="font-size:8pt;font-weight:bold; color=#EA5860;"><?=$list[$i][datetime]?></font></td>
</tr></table>

</td></tr>

<? } ?>
<? } ?>

<? if (count($list) == 0) { echo "<tr><td colspan=4 align=center height=50>자료가 없습니다.</td></tr>"; } ?>
</table>
© SIRSOFT
현재 페이지 제일 처음으로