최근이미지가 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; // 개별 페이지 접근 불가
?>
<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>
여기서 어디고쳐야하나요 ;;;;
그리고 그 이미지아래에 출력되는 이미지글자수를 지정할수있는데.. 그 글자수를 초과하면 ... 으로 표시되는데 ... 안나오게 할수없을까요?
댓글 3개
<?
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="")
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="")
게시글 목록
| 번호 | 제목 |
|---|---|
| 284348 | |
| 284336 | |
| 284333 | |
| 284332 | |
| 284320 | |
| 284318 | |
| 284316 | |
| 284313 | |
| 284307 | |
| 284306 | |
| 284303 | |
| 284298 | |
| 284296 | |
| 284290 | |
| 284286 | |
| 284280 | |
| 284277 | |
| 284272 | |
| 284261 | |
| 284259 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기