테스트 사이트 - 개발 중인 베타 버전입니다

그룹에 속해있는 게시판들 이름 출력할수있을까요?? 채택완료

보들이윤 9년 전 조회 6,089

$group[gr_subject] - 그룹 설정에서 입력했던 그룹명을 반환

이런것 처럼 어떤 함수가 있지않을까해서

문의합니다...

그냥 그룹에 속해있는 모든 게시판의 이름을 한줄로 출력하면 끝인데

약간의 팁이라도 주실수있을까요 ㅠㅠ

댓글을 작성하려면 로그인이 필요합니다.

답변 1개

채택된 답변
+20 포인트
포이치
9년 전

관련 함수가 그누보드에 있는지 없는지는 모르겠지만..

만들면 그만이죠~

 

</p><p style="font-size: 14.6667px;">//해당 게시판과 같은그룹의 모든 게시판 id 를 얻어옵니다.</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;">function get_group_result($board) {</p><p style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">	</span>global $g5;</p><p style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">	</span>if(!$board) return;</p><p style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">	</span>$return_data=sql_fetch("select gr_id, (select group_concat(b.bo_table) from {$g5['board_table']}  b where b.gr_id=gr_id) as group_id  from {$g5['board_table']} where bo_table='{$board}' ");</p><p style="font-size: 14.6667px;"><span class="Apple-tab-span" style="white-space: pre;">	</span>return $return_data;</p><p style="font-size: 14.6667px;">}</p><div style="font-size: 14.6667px;">
</div><div style="font-size: 14.6667px;">
</div><div style="font-size: 14.6667px;">//notice와 같은그룹의 모든 보드ID를 얻습니다.</div><p style="font-size: 14.6667px;">$group_info = get_group_result('notice');</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;">echo $group_info[gr_id].'
';</p><p style="font-size: 14.6667px;">//결과 예 this_is_group</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;">echo $group_info[group_id].'
';</p><p style="font-size: 14.6667px;">//결과 예 notice,free,gallery...</p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;"> </p><p style="font-size: 14.6667px;">$board_list = explode(",",$group_info[group_id]);</p><p style="font-size: 14.6667px;">if(!empty($group_info)) foreach($board_list as $grp_name) echo $grp_name.'
';</p><p style="font-size: 14.6667px;">/*</p><p style="font-size: 14.6667px;">결과 예</p><p style="font-size: 14.6667px;">notice</p><p style="font-size: 14.6667px;">free</p><p style="font-size: 14.6667px;">gallery</p><p style="font-size: 14.6667px;">*/</p><p style="font-size: 14.6667px;"><span style="font-size: 11pt; line-height: 1.5;">

로그인 후 평가할 수 있습니다

답변에 대한 댓글 1개

보들이윤
9년 전
항상 친절한 답변 감사합니다^^

댓글을 작성하려면 로그인이 필요합니다.

답변을 작성하려면 로그인이 필요합니다.

로그인