게시물 추출 소스 인데요, 제목의 글자수를 조절하려면 어찌해야 할까요? 정보
게시물 추출 소스 인데요, 제목의 글자수를 조절하려면 어찌해야 할까요?본문
php는 거의 모르고 html태그만 조금 알지만, 직접 해보려고합니다. 부디 가르침을 부탁합니다.
아래가 게시물 추출 소스인데요.
*제목의 글자수를 조절하려면 어찌해야 하나요?
*제목 바로 밑에줄에 본문의 내용(역시 글자수 조절도)이 나오게 하려면 어찌해야 하나요?
이런 형태로 하고 싶어요.
----------
| | 글제목글제목글제목글제목..........(덧글수) 닉네임 | 조회수
|사 | -----------------------------------------------------------------------------------------
| 진 | 본문내용본문내용본문내용본문내용본문내용본문내용본문내용본문
| | 본문내용본문내용본문내용본문내용본문내용본문내용본문내...
----------
-소스-
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="654" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
<? for ($i=0; $i<count($list); $i++) {
$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";
?>
<tr>
<td width="654"><table width="654" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2" colspan="3" ></td>
</tr>
<tr>
<td width="100" align="center"><table width="77" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1"></td>
<td width="76"><table width="62" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA">
<tr>
<td width="60" ><table border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><a href="<?=$list[$i][href]?>"><img src='<?=$img?>' width='70' height="53" border=0></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="8"></td>
<td width="546" valign="top"><table width="546" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="451" valign="top"><a href="<?=$list[$i][href]?>">123
<?
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:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$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']}>"; }
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'];
?>
</a>
</td>
<td width="95" height="19" style="padding-left:3px;"><?=$list[$i][name]?>ㅣ<?=$list[$i][wr_hit]?></td>
</tr>
<tr>
<td height="1" colspan="2" background="<?=$latest_skin_path?>/img/dot_line.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5" colspan="3" > </td>
</tr>
<tr background="<?=$latest_skin_path?>/img/dot_line.gif">
<td colspan="3"> </td>
</tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr> <td height='50' align='center' class='no_list'>게시물이 없습니다.</td></tr>"; } ?>
</table>
아래가 게시물 추출 소스인데요.
*제목의 글자수를 조절하려면 어찌해야 하나요?
*제목 바로 밑에줄에 본문의 내용(역시 글자수 조절도)이 나오게 하려면 어찌해야 하나요?
이런 형태로 하고 싶어요.
----------
| | 글제목글제목글제목글제목..........(덧글수) 닉네임 | 조회수
|사 | -----------------------------------------------------------------------------------------
| 진 | 본문내용본문내용본문내용본문내용본문내용본문내용본문내용본문
| | 본문내용본문내용본문내용본문내용본문내용본문내용본문내...
----------
-소스-
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width="654" border="0" cellspacing="0" cellpadding="0">
<tr> </tr>
<? for ($i=0; $i<count($list); $i++) {
$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";
?>
<tr>
<td width="654"><table width="654" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="2" colspan="3" ></td>
</tr>
<tr>
<td width="100" align="center"><table width="77" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1"></td>
<td width="76"><table width="62" border="0" cellpadding="1" cellspacing="0" bgcolor="#EAEAEA">
<tr>
<td width="60" ><table border="0" cellpadding="3" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td><a href="<?=$list[$i][href]?>"><img src='<?=$img?>' width='70' height="53" border=0></a></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
<td width="8"></td>
<td width="546" valign="top"><table width="546" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="451" valign="top"><a href="<?=$list[$i][href]?>">123
<?
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:#2C88B9;'><strong>{$list[$i]['subject']}</strong></font>";
else
echo "<font style='font-family:돋움; font-size:9pt; color:#6A6A6A;'>{$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']}>"; }
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'];
?>
</a>
</td>
<td width="95" height="19" style="padding-left:3px;"><?=$list[$i][name]?>ㅣ<?=$list[$i][wr_hit]?></td>
</tr>
<tr>
<td height="1" colspan="2" background="<?=$latest_skin_path?>/img/dot_line.gif"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="5" colspan="3" > </td>
</tr>
<tr background="<?=$latest_skin_path?>/img/dot_line.gif">
<td colspan="3"> </td>
</tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { echo "<tr> <td height='50' align='center' class='no_list'>게시물이 없습니다.</td></tr>"; } ?>
</table>
댓글 전체
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'];
?>
</a>
</td>
<td width="95" height="19" style="padding-left:3px;"><?=$list[$i][name]?>ㅣ<?=$list[$i][wr_hit]?></td>
</tr>
아래에
<tr><td colspan=2><?=$list[$i][content]?></td></tr>
을 추가해 보세요.
// echo " " . $list[$i]['icon_file'];
// echo " " . $list[$i]['icon_link'];
echo " " . $list[$i]['icon_hot'];
// echo " " . $list[$i]['icon_secret'];
?>
</a>
</td>
<td width="95" height="19" style="padding-left:3px;"><?=$list[$i][name]?>ㅣ<?=$list[$i][wr_hit]?></td>
</tr>
아래에
<tr><td colspan=2><?=$list[$i][content]?></td></tr>
을 추가해 보세요.