최근이미지두줄로 출력되게... > 그누4 질문답변

그누4 질문답변

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

최근이미지두줄로 출력되게... 정보

최근이미지두줄로 출력되게...

본문

최근이미지가 2개씩 2줄로 출력되면 되는데 계속 가로로 한줄로만 나오네요...



<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table cellpadding="0" cellspacing="0" width="100">
    <tr>
    <td width="1004" style="border-width:0; border-color:black; border-style:solid;" align="center" height="62">
          <table width=98% border=0>
                    <tr>
                        <?
for ($i=0; $i<count($list); $i++)
{
    if ($i > 0)
        echo '<td width=10></td>';

    $title = get_text($list[$i][wr_subject]);
    $content = cut_str(get_text($list[$i][wr_content]), 80);
    $img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
    if (!file_exists($img) || !$list[$i][file][0][file])
        $img = "$latest_skin_path/img/no_image.gif";
    $href = "$g4[bbs_path]/board.php?bo_table=$bo_table";

    echo <<<HEREDOC
    <td width='90' valign='top' align='center'>
        <table width='90' border='0' cellpadding='0' cellspacing='0' align='center'>
        <tr>
            <td width='90' height='50' align='center'>
<div style='width:70px;height:50px;border:1px solid #CCCCCC;padding:3px' align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='90' height='70' border='0' align='absmiddle' title='$title'></a>
</div>
    </td>
        </tr>
<tr>
            <td width='90' height='20' align='center'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][subject]}</a></td>
</tr>
</table>
    </td>
HEREDOC;
}
?> </tr>
        </table>
<? if (count($list) == 0) { ?>자료가 없습니다.<? } ?>
</tr>
</table>


여기서 어디고쳐야하나요 ;;;;



그리고 그 이미지아래에 출력되는 이미지글자수를 지정할수있는데.. 그 글자수를 초과하면 ... 으로 표시되는데 ... 안나오게 할수없을까요?
  • 복사

댓글 전체

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

$cols  = 2; //  이미지 가로갯수
$td_h  = 20; //  상하 간격
?>
<table cellpadding="0" cellspacing="0" width="100%">
    <tr>
    <td style="border-width:0; border-color:black; border-style:solid;" align="center" height="62">
          <table width="98%" border="0">
                    <tr>
                        <?
for ($i=0; $i<count($list); $i++)
{
    if ($i>0 && $i%$cols==0)
        echo "</tr><tr><td height='{$td_h}'><!-- 상하간격 --><td></tr><tr>";

    $title = get_text($list[$i][wr_subject]);
    $content = cut_str(get_text($list[$i][wr_content]), 80);
    $img = "$g4[path]/data/file/$bo_table/".urlencode($list[$i][file][0][file]);
    if (!file_exists($img) || !$list[$i][file][0][file])
        $img = "$latest_skin_path/img/no_image.gif";
    $href = "$g4[bbs_path]/board.php?bo_table=$bo_table";

echo <<<HEREDOC
    <td width='90' valign='top' align='center'>
        <table width='90' border='0' cellpadding='0' cellspacing='0' align='center'>
        <tr>
            <td width='90' height='50' align='center'>
<div style='width:70px;height:50px;border:1px solid #CCCCCC;padding:3px' align='center'>
<a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'><img src='{$img}' width='90' height='70' border='0' align='absmiddle' title='$title'></a>
</div>
    </td>
        </tr>
<tr>
            <td width='90' height='20' align='center'><a href='$g4[bbs_path]/board.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}'>{$list[$i][subject]}</a></td>
</tr>
</table>
</td>
HEREDOC;
}
?>  
</tr></table>
<? if (count($list) == 0) { ?>자료가 없습니다.<? } ?>
</td></tr>
</table>


--------------

lib/common.lib.php 1006줄

function cut_str($str, $len, $suffix="…")
->
function cut_str($str, $len, $suffix="")
두분 다 감사합니다.

그런데

lib/common.lib.php 1006줄

function cut_str($str, $len, $suffix="…")
->
function cut_str($str, $len, $suffix="")


이렇게 수정해도 … 가 계속 뜨네요;;
© SIRSOFT
현재 페이지 제일 처음으로