그누보드에서 내가 쓴글을 출력하려고 합니다. > 질문답변

본문 바로가기
사이트 내 전체검색

질문답변

서버정보나 계정정보는 보안유지를 위해 관리자쪽지나 메일로 발송해 주시거나 제작의뢰 게시판을 이용해 주시면 감사하겠습니다..

그누보드에서 내가 쓴글을 출력하려고 합니다.

페이지 정보

본문

안녕하세요 선배님..
그누보드에서 latest.lib.php 에서 function을 새로 만들어 이름 값으로 출력하여
자신의 쓴글을 최근게시물 형식으로 출력하려고 합니다 어떻게 하면 되죠?
도와주세욤...^^
추천0

댓글목록

profile_image

제로님의 댓글

제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일

<style type='text/css'>
.mynew { border:1px solid #dddddd; text-align:left; table-layout:fixed; }
.mynew h4 { margin:0 auto; background:#f9f9f9; margin:0px; padding:5px 5px 5px 10px; }
.mynew ul { padding:5px 5px 5px 10px; }
.mynew li { height:20px; line-height:20px; overflow:hidden; }
.mynew_comment { color:#EE5A00; }
</style>

<table class="basic_table" width='100%'>
<tr>
<td valign="top">
<?php
// 이스킨이 위치하는 경로를 넣어 주세요.
$new_count = 5; //한번에 보여줄 갯수
$subjc = 50;//제목 글자수
?>
<div class="mynew">
<?php
$sql2 = " select count(*) as cnt from $g4[board_new_table]
where wr_id = wr_parent and mb_id = '$member[mb_id]' ";
$row2 = sql_fetch($sql2);
$total_count = number_format($row2[cnt]);
if (!$scpage) { $scpage = 1; }
$from_record = ($scpage - 1) * $rows;
$sql = " select bo_table, wr_id, wr_parent from $g4[board_new_table] a
where mb_id = '$member[mb_id]'
-- and a.wr_id = a.wr_parent
group by bo_table, wr_parent
order by bn_id desc limit $from_record, $new_count ";
$res = sql_query($sql);

echo "<h4><a href='$g4[bbs_path]/new.php?view=w&mb_id=$member[mb_id]'><span style='font-weight:700;'>나의 최근게시물 ({$total_count})</span></a></h4>";
echo "<ul>";
$list = array();
for ($i=0; $row=sql_fetch_array($res), $i<$new_count; $i++)
{
if (!$row[bo_table])
{
continue;
}
$tmp_table = $g4[write_prefix].$row[bo_table];
$sql2 = " select wr_subject, wr_comment from $tmp_table where wr_id = '$row[wr_parent]' ";
$row2 = sql_fetch($sql2);
$list[$i] = $row2;
$subj = get_text($list[$i][wr_subject]);
$subj = cut_str($subj, $subjc);
$comment = "";
if ($list[$i][wr_comment])
$comment = "<span class=small>({$list[$i][wr_comment]})</span>";
echo "<li>";
echo "<span style='font-weight:700;color:#DDD;'>·</span>";
echo "<a href='$g4[bbs_path]/board.php?bo_table=$row[bo_table]&wr_id=$row[wr_parent]'><span style='color:#666666;'>$comment$subj</span></a>";
echo "</li>";
}
if (!$total_count) {
echo "<li><span style='color:gray;'>게시글이 없습니다.</span></li>";
}
echo "</ul>\n";
?>
</div>
</td>
</tr>
</table>

이걸로 해결해 보세요..

profile_image

제로님의 댓글

제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 작성일
profile_image

JaceHero님의 댓글

JaceHero쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 작성일

function latest_name($skin_dir="", $bo_table, $rows=10, $subject_len=40, $wr_name)
{
    global $g4;

    if ($skin_dir)
        $latest_skin_path = "$g4[path]/skin/latest/$skin_dir";
    else
        $latest_skin_path = "$g4[path]/skin/latest/basic";

    $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_name= '$wr_name' and wr_is_comment = 0 order by wr_num 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;
}

이런식으로 못하나요?

Total 1,640건 44 페이지
  • RSS
질문답변 목록
번호 제목 글쓴이 조회 추천 날짜
565 휴먼쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11226 0 01-14
564 소피쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 7808 0 01-16
563 아이린쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 6109 0 01-19
562 프리즘볼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 47 0 01-21
561 아이린쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8727 0 01-24
560 레몬트리쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 11256 0 01-28
559 소피쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 8448 0 01-31
558 프리즘볼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 43 0 02-03
557 제로쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 37 0 02-03
556 소금쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 7089 0 02-05
555 쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10136 0 02-05
554 프리즘볼쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 12739 0 02-06
553 쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 12911 0 02-06
552 WORLDCUP쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10504 0 02-10
551 소금쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 13791 0 02-10
550 WORLDCUP쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11354 0 02-16
549 휴먼쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 11605 0 02-17
548 무위쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 8131 0 02-17
547 이쁜미연쪽지보내기 메일보내기 자기소개 아이디로 검색 전체게시물 45 0 02-20
546 WORLDCUP쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9797 0 02-24
545
설치 댓글4
쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 10056 0 02-26
544 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9802 0 02-26
543 쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 8136 0 02-27
542
이 위치에 댓글1
쿠하하쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 6828 0 02-28
541 쎄엠쪽지보내기 메일보내기 홈페이지 자기소개 아이디로 검색 전체게시물 9836 0 03-05

검색

회원로그인

회원가입

사이트 정보

株式会社YHPLUS / 대표 : ZERO
〒140-0011 東京都品川区東大井2-5-9-203
050-5539-7787
오픈카카오톡 (YHPLUS) :
https://open.kakao.com/o/slfDj15d

접속자집계

오늘
2,338
어제
7,570
최대
8,371
전체
1,650,758
Copyright (c) 株式会社YHPLUS. All rights reserved.