채택완료

갤러리 가로 이미지 수를 2개로 고정하고 싶습니다.

2015-12-29 (화) 15:49:46 2,173
Copy
<table width="100%" cellpadding="0" cellspacing="0">    <tr>        <td colspan=<?=$colspan?> class="bbs_line2"></td>    </tr>    <tr>     <?     for ($i=0; $i<count($list); $i++) {         if ($i && $i%$mod==0)            echo "</tr><tr>";        $style = "";        $subject = "<span $style>{$list[$i][subject]}</span>";
        $comment_cnt = "";        if ($list[$i][comment_cnt])            $comment_cnt = " <a href=\"{$list[$i][comment_href]}\"><span style='font-size:10px;'><font face='Tahoma' color='#EE5A00'>{$list[$i][comment_cnt]}</span></a>";
        $list[$i][name] = preg_replace("/<img /", "<img style='display:none;' ", $list[$i][name]);        $list[$i][name] = preg_replace("/> <span/", "><span", $list[$i][name]);        $list[$i][name] = preg_replace("/class='member'/", "", $list[$i][name]);
        echo "<td width='{$td_width}%' valign=top style='word-break:break-all; padding:8px 0 0 0;'>";        echo "<table align=center>";        echo "<tr><td height=15></td></tr>";        echo "<tr><td align=center><div style='float:left; border:1px solid #ccc; background:#fff; padding:0px; font-size:0; line-height:0;'><a href='{$list[$i][href]}'>".makeThumbs($g4[path]."/data/file/$bo_table", $list[$i][file][0][file], $board[bo_3], $board[bo_4], cut_str($list[$i][subject],20))."</a></div></td></tr>";        echo "<tr><td align=center class=lh height=26>";        if ($is_category) echo "<a href='{$list[$i][ca_name_href]}'>[{$list[$i][ca_name]}]</a> ";        echo "<a href='{$list[$i][href]}'>$subject</a><span class='comment'>{$comment_cnt}</span>";        echo " " . $list[$i][icon_new];        //echo " " . $list[$i][icon_file];        //echo " " . $list[$i][icon_link];        //echo " " . $list[$i][icon_hot];        //echo " " . $list[$i][icon_secret];        echo "</td></tr>";  //echo "<tr><td align=center style='font-size:11px; color:#888;'>Date.".$list[$i][datetime2]." &nbsp;<span style='font-size:9px;color:#CCCCCC;'>|</span>&nbsp; Hit.".$list[$i][wr_hit]."</td></tr>";                if ($is_checkbox) echo "<tr><td align=center><input type=checkbox name=chk_wr_id[] value='{$list[$i][wr_id]}'></td></tr>";        echo "</table></td>\n";    }
    // 나머지 td    $cnt = $i%$mod;    if ($cnt)        for ($i=$cnt; $i<$mod; $i++)            echo "<td width='{$td_width}%'>&nbsp;</td>";    ?>    </tr>    <? if (count($list) == 0) { echo "<tr><td colspan='$mod' height=400 align=center>게시물이 없습니다.</td></tr>"; } ?> <tr><td colspan='<?=$mod?>' height="25"></td></tr>    <tr><td colspan=<?=$mod?> class='bbs_line'>    </table>

if문으로 게시판의 설정된 가로 이미지수에의해 테이블이 만들어지는 if문인것 같은데

게시판 설정이 가로이미지수가 2개로 고정을 시키고 싶습니다. 어떻게 수정해야 할까요??

고수님들의 도움 요청합니다.

|

답변 2개

채택된 답변
+20 포인트

맨윗줄에 추가

<?php $mod = 2; ?>

2015-12-30 (수) 08:38:46

관리자모드에서 갤러리 갯수 2개로 설정

답변을 작성하려면 로그인이 필요합니다.