최근 게시물에서의 몇가지가 궁금해서 문의드립니다. 정보
최근 게시물에서의 몇가지가 궁금해서 문의드립니다.본문
우선 말씀드리자면 이 곳 문의게시판을 찾아보고 여기저기 알아보다가보다가
질문드리는 것이니 양해부탁드립니다.
문의하고자하는 것은 메인의 최근게시물상태에서 해당 게시물을추천하는 방법이 궁금하고,
다음은 메인의 최근게시물리스트에 해당게시물이 몇명에게 스크랩됐는지 스크랩한 인원수를 출력하는 방법입니다. 두번째는 전에 질문을 드렸는데 아직 답변 해주신 분이 안계셔서 이렇게 다시...죄송합니다.
제 짧은 지식으로 이리저리 굴려도 봤는데 성공을 못해서 그러니 잘 부탁드립니다.
좋은 주말 보내시길.
질문드리는 것이니 양해부탁드립니다.
문의하고자하는 것은 메인의 최근게시물상태에서 해당 게시물을추천하는 방법이 궁금하고,
다음은 메인의 최근게시물리스트에 해당게시물이 몇명에게 스크랩됐는지 스크랩한 인원수를 출력하는 방법입니다. 두번째는 전에 질문을 드렸는데 아직 답변 해주신 분이 안계셔서 이렇게 다시...죄송합니다.
제 짧은 지식으로 이리저리 굴려도 봤는데 성공을 못해서 그러니 잘 부탁드립니다.
좋은 주말 보내시길.
댓글 전체

너무 고급스런 소스질문을 하셔서요 --;
선뜻 대답해주실분이 몇 안되실거 같네여...
기존에는 없는 팁이기때문에 직접 테스트 하면서 소스를 만들어봐야 하는데
과연 어느 분께서 해드릴지 --;
요샌 간단한 소스도 답변 해드리곤 하는데 고맙다는 소리없이 계속 질문만 늘어노시는분들때문에
답변 하는 긍지가 없네요... 주저리였습니다.
선뜻 대답해주실분이 몇 안되실거 같네여...
기존에는 없는 팁이기때문에 직접 테스트 하면서 소스를 만들어봐야 하는데
과연 어느 분께서 해드릴지 --;
요샌 간단한 소스도 답변 해드리곤 하는데 고맙다는 소리없이 계속 질문만 늘어노시는분들때문에
답변 하는 긍지가 없네요... 주저리였습니다.
....이거 설명이 길어서 그런거죠.....ㅅㅅ;;;;
방법이라고 생각해본게 추천수 불러오는 방법으로 스크랩인원수는 볼 수 있겠고.
추천하는 방법은 어떻게 링크만 잘 떼오면 되겠는데. 방법이 궁해서.
이런 방법으로 생각은 되는데 막상하려니 그 몇자를 모르겠어서..
우야든지 관심주셔서 감사합니다.
방법이라고 생각해본게 추천수 불러오는 방법으로 스크랩인원수는 볼 수 있겠고.
추천하는 방법은 어떻게 링크만 잘 떼오면 되겠는데. 방법이 궁해서.
이런 방법으로 생각은 되는데 막상하려니 그 몇자를 모르겠어서..
우야든지 관심주셔서 감사합니다.

그누보드 기본 최신글을 예로 들어 최신글에서 추천하기 추가할경우입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$good_href = "$g4[bbs_path]/good.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&good=good"; // 추천하기 링크
?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
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'];
echo "<a href='$good_href' target='hiddenframe'>추천하기</a>"; // 추천하기 아이콘
?></td></tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$good_href = "$g4[bbs_path]/good.php?bo_table=$bo_table&wr_id={$list[$i][wr_id]}&good=good"; // 추천하기 링크
?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
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'];
echo "<a href='$good_href' target='hiddenframe'>추천하기</a>"; // 추천하기 아이콘
?></td></tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>

그누보드 기본 최신글을 예로 들어 최신글에서 스크랩수 출력하기입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$scrap[$i] = sql_fetch(" select count(*) as cnt from $g4[scrap_table] where bo_table = '$bo_table' and wr_id = '$list[$i][wr_id]' "); // 스크랩 갯수 뽑아오기
?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
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'];
echo " " . $scrap[$i]; //스크랩 횟수 출력하기
?></td></tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<table width=100% cellpadding=0 cellspacing=0>
<tr>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t01.gif'></td>
<td width='100%' background='<?=$latest_skin_path?>/img/bg_latest.gif'> <strong><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><?=$board[bo_subject]?></a></strong></td>
<td width=37 background='<?=$latest_skin_path?>/img/bg_latest.gif'><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>'><img src='<?=$latest_skin_path?>/img/more.gif' border=0></a></td>
<td width=14><img src='<?=$latest_skin_path?>/img/latest_t02.gif'></td>
</tr>
</table>
<table width=100% cellpadding=0 cellspacing=0>
<? for ($i=0; $i<count($list); $i++) { ?>
<?
$scrap[$i] = sql_fetch(" select count(*) as cnt from $g4[scrap_table] where bo_table = '$bo_table' and wr_id = '$list[$i][wr_id]' "); // 스크랩 갯수 뽑아오기
?>
<tr>
<td colspan=4 align=center>
<table width=95%>
<tr>
<td height=25><img src='<?=$latest_skin_path?>/img/latest_icon.gif' align=absmiddle>
<?
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'];
echo " " . $scrap[$i]; //스크랩 횟수 출력하기
?></td></tr>
<tr><td bgcolor=#EBEBEB height=1></td></tr>
</table></td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=4 align=center height=50><font color=#6A6A6A>게시물이 없습니다.</a></td></tr><? } ?>
</table>
대단히 고맙습니다.
다섯시간의 삽질끝에 곰순이푸님께서 주신 소스로 성공했습니다.
역시 열심히 배워야겠습니다... 이리 단순한걸 몇날을 삽질을 했으니..
먹여주시는 소스도 몇시간을 삽질을 하니..이거 원..부끄러서워서...
다시한번 감사의 말씀 드리며 행복하세요~!
다섯시간의 삽질끝에 곰순이푸님께서 주신 소스로 성공했습니다.
역시 열심히 배워야겠습니다... 이리 단순한걸 몇날을 삽질을 했으니..
먹여주시는 소스도 몇시간을 삽질을 하니..이거 원..부끄러서워서...
다시한번 감사의 말씀 드리며 행복하세요~!