1:1게시판 최신글 문제.. 정보
1:1게시판 최신글 문제..본문
안녕하세요. 질문드립니다... 너무 하고 싶은데 제가 아는게 없다보니 글남깁니다.ㅠㅠ
게시판에 적용한 스킨
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=99927&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EB%B9%84%EB%B0%80%EA%B8%80&sop=and&page=2
최신글에 적용한 스킨
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=43649
이런데요. 능력자분이 게시판 스킨은 조금 최근에 스킨은 수정하셔서 공유해주신 덕분에 잘쓰고있는데 최신글은 너무 상당히 오래전 스킨이라 먼가 안맞는듯싶어요.
로그인 상태에서는 자신의 글만 잘 보여지는것 같습니다. 자신한테 맞는글이 없을시 해당하는글이 없다고도 제대로 나오는듯하구요.
근데 문제는 비로그인 상태에서 가장 최근글이 나오는것도 아니고 코멘트가 달려있는 글이 제목이 텅빈채로 코멘트갯수와 날짜만 나타나는 현상이 있습니다. 비로그인 상태에서도 로그인을 하라던지 해당글이 없다든지 로그인을 하시면 글을 확인할수 있다던지 하는 메세지가 나왔으면 하는데 어떻게 해야될지를 모르겠네요.
최신글 스킨 latest.skin.php 내용입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<colgroup width=10>
<colgroup>
<colgroup width=37>
<colgroup width=10>
<tr bgcolor="#F9F9F9">
<td height="20"></td>
<td bgcolor="#F9F9F9"> <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()'><font style='font-family:돋움; font-size:9pt; color:#696969;'><strong><?=$board[bo_subject]?></strong></font></a> </td>
<td align="right" bgcolor="#F9F9F9"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()'><img src="<?=$latest_skin_path?>/img/more.gif" width="37" height="15" border="0"></a></td>
<td bgcolor="#F9F9F9"></td>
</tr>
<tr bgcolor="#DDDDDD"><td colspan=4 height="1"></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan=3 height="5"></td>
</tr>
<? if (count($list) == 0) { ?>
<tr><td colspan=3 align=center height=30>고객님께 해당하는 글이 없습니다.</td></tr>
<? } else { ?>
<? for ($i=0; $i<count($list); $i++) {
if ($list[$i][ca_name] !== $member[mb_id])
;
{
?>
<tr>
<td nowrap width="15" height="25" align="center" valign="middle" background="<?=$latest_skin_path?>/img/bg_line.gif"><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td nowrap background="<?=$latest_skin_path?>/img/bg_line.gif" style='word-break:break-all;'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' onfocus='this.blur()'>";
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]}\" onfocus=\"this.blur()\"><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 "<td width='150' align='right' background='{$latest_skin_path}/img/bg_line.gif'>";
echo " " . $list[$i][datetime];
echo " </td>";
?>
</td>
</tr>
<? } ?>
<? } ?>
<? } ?>
</table>
</td></tr></table>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
------------------------------------------
mypage_config.php 내용입니다.
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function mypage_latest($skin_dir="", $bo_table, $mb_id, $rows=10, $subject_len=40)
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
if(!$mb_id)
$mb_id == $member['mb_id']; //내글만 불러온다.
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_10='$mb_id' order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
어디를 어떻게 해야 비로그인상태에서도 제대로 나올련지요...ㅠㅠ
매번 질문만 드려 죄송합니다...
도와주세요...ㅠㅠ
게시판에 적용한 스킨
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=99927&sca=&sfl=wr_subject%7C%7Cwr_content&stx=%EB%B9%84%EB%B0%80%EA%B8%80&sop=and&page=2
최신글에 적용한 스킨
http://sir.co.kr/bbs/board.php?bo_table=g4_skin&wr_id=43649
이런데요. 능력자분이 게시판 스킨은 조금 최근에 스킨은 수정하셔서 공유해주신 덕분에 잘쓰고있는데 최신글은 너무 상당히 오래전 스킨이라 먼가 안맞는듯싶어요.
로그인 상태에서는 자신의 글만 잘 보여지는것 같습니다. 자신한테 맞는글이 없을시 해당하는글이 없다고도 제대로 나오는듯하구요.
근데 문제는 비로그인 상태에서 가장 최근글이 나오는것도 아니고 코멘트가 달려있는 글이 제목이 텅빈채로 코멘트갯수와 날짜만 나타나는 현상이 있습니다. 비로그인 상태에서도 로그인을 하라던지 해당글이 없다든지 로그인을 하시면 글을 확인할수 있다던지 하는 메세지가 나왔으면 하는데 어떻게 해야될지를 모르겠네요.
최신글 스킨 latest.skin.php 내용입니다.
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 시작 -->
<table width="100%" cellpadding="0" cellspacing="0" border="0"><tr><td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<colgroup width=10>
<colgroup>
<colgroup width=37>
<colgroup width=10>
<tr bgcolor="#F9F9F9">
<td height="20"></td>
<td bgcolor="#F9F9F9"> <a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()'><font style='font-family:돋움; font-size:9pt; color:#696969;'><strong><?=$board[bo_subject]?></strong></font></a> </td>
<td align="right" bgcolor="#F9F9F9"><a href='<?=$g4[bbs_path]?>/board.php?bo_table=<?=$bo_table?>' onfocus='this.blur()'><img src="<?=$latest_skin_path?>/img/more.gif" width="37" height="15" border="0"></a></td>
<td bgcolor="#F9F9F9"></td>
</tr>
<tr bgcolor="#DDDDDD"><td colspan=4 height="1"></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan=3 height="5"></td>
</tr>
<? if (count($list) == 0) { ?>
<tr><td colspan=3 align=center height=30>고객님께 해당하는 글이 없습니다.</td></tr>
<? } else { ?>
<? for ($i=0; $i<count($list); $i++) {
if ($list[$i][ca_name] !== $member[mb_id])
;
{
?>
<tr>
<td nowrap width="15" height="25" align="center" valign="middle" background="<?=$latest_skin_path?>/img/bg_line.gif"><img src="<?=$latest_skin_path?>/img/board_icon.gif" width="9" height="13"></td>
<td nowrap background="<?=$latest_skin_path?>/img/bg_line.gif" style='word-break:break-all;'>
<?
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' onfocus='this.blur()'>";
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]}\" onfocus=\"this.blur()\"><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 "<td width='150' align='right' background='{$latest_skin_path}/img/bg_line.gif'>";
echo " " . $list[$i][datetime];
echo " </td>";
?>
</td>
</tr>
<? } ?>
<? } ?>
<? } ?>
</table>
</td></tr></table>
<!-- <?=$board[bo_subject]?> (<?=$board[bo_table]?>) 최신글 끝 -->
------------------------------------------
mypage_config.php 내용입니다.
<?
if (!defined('_GNUBOARD_')) exit;
// 최신글 추출
function mypage_latest($skin_dir="", $bo_table, $mb_id, $rows=10, $subject_len=40)
{
global $g4;
if ($skin_dir)
$latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
else
$latest_skin_path = "$g4[path]/skin/latest/basic";
if(!$mb_id)
$mb_id == $member['mb_id']; //내글만 불러온다.
$list = array();
$sql = " select * from $g4[board_table] where bo_table = '$bo_table'";
$board = sql_fetch($sql);
$tmp_write_table = $g4['write_prefix'] . $bo_table; // 게시판 테이블 전체이름
$sql = " select * from $tmp_write_table where wr_10='$mb_id' order by wr_id desc limit 0, $rows ";
$result = sql_query($sql);
for ($i=0; $row = sql_fetch_array($result); $i++)
$list[$i] = get_list($row, $board, $latest_skin_path, $subject_len);
ob_start();
include "$latest_skin_path/latest.skin.php";
$content = ob_get_contents();
ob_end_clean();
return $content;
}
?>
어디를 어떻게 해야 비로그인상태에서도 제대로 나올련지요...ㅠㅠ
매번 질문만 드려 죄송합니다...
도와주세요...ㅠㅠ
댓글 전체

mypage_config.php 내용에
if(!$mb_id)
$mb_id == $member['mb_id']; //내글만 불러온다.
이부분을 회원이 로그인했을때와 로그인하지않았을때 조건을 주시고
$sql = " select * from $tmp_write_table where wr_10='$mb_id' order by wr_id desc limit 0, $rows ";
이쿼리문을 수정해주시면 될꺼 같습니다
if(!$mb_id)
$mb_id == $member['mb_id']; //내글만 불러온다.
이부분을 회원이 로그인했을때와 로그인하지않았을때 조건을 주시고
$sql = " select * from $tmp_write_table where wr_10='$mb_id' order by wr_id desc limit 0, $rows ";
이쿼리문을 수정해주시면 될꺼 같습니다
제가 수정을 하기엔 어려운일이었군요... 답변감사합니다.^^