최신글에서요, 내가 쓴 글만 클릭하는 방법즘요 ㅜㅜ
최신글 출력한 게시판이 페이지에선 자기가 쓴 글만 보이게 해논 상태입니다.!
그치만 최신글에선 남들이 쓴 글도 리스트로 뿌려져야하구요.
뿌려지는것까진 되는데요.
그 글중에 자기가 쓴 글만 열람이 가능하고 남들이 쓴 글 리스트는 안열려야 하거든요..
어떤 코드를 추가해야될까요 ㅜㅜ
답변 꼭 부탁드립니다~~
이해안되시면 댓글 남겨주세요!!
------------------------- 최신글 코드 ---------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$latest_width = "460"; //탭메뉴 폭과 같게
?>
<style>
a {text-decoration:none; color: #7b5d51;}
a:link, a:visited, a:active {text-decoration:none; color: #7b5d51;}
a:hover {text-decoration:none; color:#c17018;}
</style>
<div style="height:150px;">
<table width='<?=$latest_width?>' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td height='15' colspan='3'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td width='6' height='20' style='padding-left:5px;'><img src='<?=$latest_skin_path?>/img/latest_icon.gif' width='2' height='2' border='0' align="absmiddle"></td>
<td width='<?=$latest_width-84?>' height='20' align="left">
<?
$style = "font-family:돋움; font-size:9pt; color:#7b5d51;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt;' ";
$subject = "<span $style>".cut_str($list[$i][subject],80)."</span>"; //제목 글자수 자르기
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>{$subject}";
if ($list[$i][comment_cnt])
echo " <span style='font-family:Tahoma;font-size:10px;color:#f1782e;'>{$list[$i][comment_cnt]}</span>";
// echo " " . $list[$i][icon_new];
echo "</a>";
?>
</td>
<td width='70' height='20' align='center' ><span style='font-size:9pt; color:#7b5d51;'><?=$list[$i][datetime]?></span>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=3 align=center height=100 style='font-family:돋움; font-size:9pt; color:#7b5d51;'>게시물이 없습니다.</td></tr><? } ?>
</tr>
</table>
</div>
그치만 최신글에선 남들이 쓴 글도 리스트로 뿌려져야하구요.
뿌려지는것까진 되는데요.
그 글중에 자기가 쓴 글만 열람이 가능하고 남들이 쓴 글 리스트는 안열려야 하거든요..
어떤 코드를 추가해야될까요 ㅜㅜ
답변 꼭 부탁드립니다~~
이해안되시면 댓글 남겨주세요!!
------------------------- 최신글 코드 ---------------------------
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
$latest_width = "460"; //탭메뉴 폭과 같게
?>
<style>
a {text-decoration:none; color: #7b5d51;}
a:link, a:visited, a:active {text-decoration:none; color: #7b5d51;}
a:hover {text-decoration:none; color:#c17018;}
</style>
<div style="height:150px;">
<table width='<?=$latest_width?>' cellpadding='0' cellspacing='0' border='0'>
<tr>
<td height='15' colspan='3'></td>
</tr>
<? for ($i=0; $i<count($list); $i++) { ?>
<tr>
<td width='6' height='20' style='padding-left:5px;'><img src='<?=$latest_skin_path?>/img/latest_icon.gif' width='2' height='2' border='0' align="absmiddle"></td>
<td width='<?=$latest_width-84?>' height='20' align="left">
<?
$style = "font-family:돋움; font-size:9pt; color:#7b5d51;";
if ($list[$i][icon_new])
$style = "style='font-family:돋움; font-size:9pt;' ";
$subject = "<span $style>".cut_str($list[$i][subject],80)."</span>"; //제목 글자수 자르기
echo $list[$i][icon_reply] . " ";
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>{$subject}";
if ($list[$i][comment_cnt])
echo " <span style='font-family:Tahoma;font-size:10px;color:#f1782e;'>{$list[$i][comment_cnt]}</span>";
// echo " " . $list[$i][icon_new];
echo "</a>";
?>
</td>
<td width='70' height='20' align='center' ><span style='font-size:9pt; color:#7b5d51;'><?=$list[$i][datetime]?></span>
</td>
</tr>
<? } ?>
<? if (count($list) == 0) { ?><tr><td colspan=3 align=center height=100 style='font-family:돋움; font-size:9pt; color:#7b5d51;'>게시물이 없습니다.</td></tr><? } ?>
</tr>
</table>
</div>
댓글 3개
만두야닷컴
12년 전
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>{$subject}";
부분을
if($list[$i][mb_id] == $member[mb_id]) {
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>";
}
echo "{$subject}";
위와 같은 방법으로 바꾸시면 될 듯 합니다.
부분을
if($list[$i][mb_id] == $member[mb_id]) {
echo "<a href='{$list[$i][href]}' title='{$list[$i][subject]}' onfocus='this.blur()'>";
}
echo "{$subject}";
위와 같은 방법으로 바꾸시면 될 듯 합니다.
12년 전
for 문 다음줄에 넣으세요
if(!$is_admin && $list[$i][mb_id]!=$member[mb_id]) $list[$i][href]="#";
view스킨 상단에 넣으세요
if(!$is_admin && $view[mb_id]!=$member[mb_id]) alert("본인의 글이 아닙니다:);
if(!$is_admin && $list[$i][mb_id]!=$member[mb_id]) $list[$i][href]="#";
view스킨 상단에 넣으세요
if(!$is_admin && $view[mb_id]!=$member[mb_id]) alert("본인의 글이 아닙니다:);
12년 전
아 죄송한데 문제가 지금 메인에 최근게시물이 5개 이상이 노출되있는데 그중 한개의 게시판만 자기가 쓴글만 클릭되게끔 해야해서 latest.skin 파일을 수정하면 안될거같아요 ㅜ
게시판 목록
그누4 질문답변
그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.
기존 게시물은 열람만 가능합니다.
| 번호 | 제목 | 글쓴이 | 날짜 | 조회 |
|---|---|---|---|---|
| 66494 | 11년 전 | 7752 | ||
| 66493 |
|
11년 전 | 3004 | |
| 66492 |
alexseo
|
11년 전 | 3989 | |
| 66491 | 11년 전 | 3091 | ||
| 66490 | 11년 전 | 3439 | ||
| 66489 | 11년 전 | 5053 | ||
| 66488 | 11년 전 | 2312 | ||
| 66487 | 11년 전 | 3933 | ||
| 66486 | 11년 전 | 9922 | ||
| 66485 | 11년 전 | 3004 | ||
| 66484 | 11년 전 | 4444 | ||
| 66483 | 11년 전 | 2938 | ||
| 66482 |
jthree
|
11년 전 | 4102 | |
| 66481 | 11년 전 | 2559 | ||
| 66480 | 11년 전 | 2384 | ||
| 66479 | 11년 전 | 2910 | ||
| 66478 |
|
11년 전 | 3046 | |
| 66477 |
|
11년 전 | 3543 | |
| 66476 | 11년 전 | 2338 | ||
| 66475 |
JJins
|
11년 전 | 3626 |
댓글 작성
댓글을 작성하시려면 로그인이 필요합니다.
로그인하기