최근 사진 중 앞에 사진 3개 빼고 추출하는 방법? 정보
최근 사진 중 앞에 사진 3개 빼고 추출하는 방법?본문
최근 사진 중 앞에 사진 3개를 빼고 추출하려구 하는데요~
앞선 추출과 분리하려구 해서 그래요.
도와주세요!!!!
뭘 바꿔야 하나요?
for ($i='0'; $i<count($list); $i++)
이 부분인 것 같기는 한데 어떻게 해야하는 건지 알려 주세요!
꼭 알려 주세요!
------------------------------------------------------------------------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>
<tr><td align='center'>
</td></tr>
<tr><td align='center'>
<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>
<tr>
<?
for ($i='0'; $i<count($list); $i++)
{
if ($i > '0')
echo '<td width=20> </td>';
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 62);
$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='104' valign='top' align='center'>
<table width='104' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='104' height='62' align='center'>
<div style='width:104px;height:62px;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='104' height='62' border='0' align='absmiddle' title='$title'></a>
</div>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
<? if (count($list) == 0) { ?>
<tr><td colspan=2 align='center' height=25>게시물이 없습니다.</td></tr>
<? } ?>
</table>
</td></tr>
</table>
앞선 추출과 분리하려구 해서 그래요.
도와주세요!!!!
뭘 바꿔야 하나요?
for ($i='0'; $i<count($list); $i++)
이 부분인 것 같기는 한데 어떻게 해야하는 건지 알려 주세요!
꼭 알려 주세요!
------------------------------------------------------------------------------------------------------------------------------------
<?
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 -->
<table width='100%' cellpadding='0' cellspacing='0' border='0' align='center'>
<tr><td align='center'>
</td></tr>
<tr><td align='center'>
<table width='100%' border='0' cellspacing='0' cellpadding='0' align='center'>
<tr>
<?
for ($i='0'; $i<count($list); $i++)
{
if ($i > '0')
echo '<td width=20> </td>';
$title = get_text($list[$i][wr_subject]);
$content = cut_str(get_text($list[$i][wr_content]), 62);
$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='104' valign='top' align='center'>
<table width='104' border='0' cellpadding='0' cellspacing='0' align='center'>
<tr>
<td width='104' height='62' align='center'>
<div style='width:104px;height:62px;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='104' height='62' border='0' align='absmiddle' title='$title'></a>
</div>
</td>
</tr>
</table>
</td>
HEREDOC;
}
?>
</tr>
<? if (count($list) == 0) { ?>
<tr><td colspan=2 align='center' height=25>게시물이 없습니다.</td></tr>
<? } ?>
</table>
</td></tr>
</table>
댓글 전체
0부터가 아니라 3부터 시작하면 되지 않을까요?
for ($i='3'; $i<count($list); $i++) <- 이렇게요.
(확실하진 않아효!)
for ($i='3'; $i<count($list); $i++) <- 이렇게요.
(확실하진 않아효!)
해봤는데 안되요~

lib/latest.lib.php 함수를 고쳐야겠습니다.
보시면 함수 인자에 option이라는 것이 있는데
이걸로 limit n, m 절을 만들어
query에 추가하도록 하면 될 겁니다.
보시면 함수 인자에 option이라는 것이 있는데
이걸로 limit n, m 절을 만들어
query에 추가하도록 하면 될 겁니다.