질문과 답변 (구)

최근본상품
TOP
DOWN

질문과 답변 (구)

메인페이지 베스트 게시글 출력

2016.11.09 18:21 452 1

본문

안녕하세요.

커뮤니티 테마 적용 후, 메인페이지 베스트 게시글이 출력이 되는데

아래와 같이 기존설정이 되면 모든 게시판의 게시글이 추출되는지요?

아니면 title=베스트 게시글 뒤에 bo_table=게시판id 설정해야하는지요?

적용한다면 'title=베스트 게시글||bo_table=G01_T01,G01_T02,G01_T03||

테이블명을 , 로 구분해서 하는지요?

답변 부탁드립니다.

index_bs.html

<!--{* ------------- best / comu list 최신글 영역 시작 ------------- *}-->
<div class="row margin-bottom-20">
    <div class="col-sm-6 md-margin-bottom-20">
  <!--{* 아래 title=게시판명, bo_table=게시판id 설정 *}-->
  <div class="contents-box-inner">
     {latest->latest_bestset('community','title=베스트 게시글||count=9||cut_subject=30')}
  </div>
    </div>

0
로그인 후 평가 가능합니다.
- 부끄럼소년 - 회원등급 : 지상계 / Level 6
포인트 7,768
경험치 3,856
[레벨 6] - 진행률 72%
- 가입일 : 2016-04-04 09:40:18
- 서명 : 미입력
- 자기소개 : 미입력

댓글목록 1

이윰EGG님의 댓글

/eyoom/classes/latest.class.php 파일 516줄을 아래에 소스를 살펴보시면,
bo_include  및 bo_exclude 관련 소스가 있습니다.
해당 옵션을 사용하시기 위해서는 bo_table를 지정하시면 안됩니다.

즉, bo_table를 옵션으로 지정하시면, bo_include 및 bo_exclude 옵션은 의미가 없어지므로 적용이 안되는 거예요.
직접 테스트해 보았으니, 상세히 살펴보시기 바랍니다.


	// 베스트 SET
	public function latest_bestset($skin,$option,$bo_table='') {
		global $tpl, $tpl_name;

		$opt = '';
		$optset = $this->option_query($option);
		$title = $optset['title'] ? $optset['title']:'';
		$_option['today'] = "best=y||period=1";
		$_option['week'] = "best=y||period=7";
		$_option['month'] = "best=y||period=30";

		$opt .= $optset['count'] ? "||count=".$optset['count']:"||count=10";
		$opt .= $optset['cut_subject'] ? "||cut_subject=".$optset['cut_subject']:"||cut_subject=30";
		if($bo_table) {
			$opt .= "||bo_table=".$bo_table;
		} else {
			$opt .= $optset['bo_include'] ? "||bo_include=".$optset['bo_include']:"";
			$opt .= $optset['bo_exclude'] ? "||bo_exclude=".$optset['bo_exclude']:"";
			$opt .= $optset['gr_id'] ? "||gr_id=".$optset['gr_id']:"";
		}
		$opt .= $optset['where'] ? "||where=".$optset['where']:"";

		$_option['today'] .= $opt;
		$_option['week'] .= $opt;
		$_option['month'] .= $opt;


감사합니다.

축하합니다. 첫댓글 포인트 38포인트를 획득하였습니다.

질문과 답변 (채택기능) 게시판이 신설되었습니다.
질문과 답변 (구) 게시판은 글쓰기가 제한되오니 착오 없으시길 바랍니다. (댓글 및 조회는 여전히 가능합니다.)

전체 2,800 건 - 1 페이지
제목
이윰넷 2017.10.24 468 0
도깨비뿅망치 2017.10.24 611 0
홍인 2017.10.24 466 0
tenuunsalhi 2017.10.23 489 0
jumphu 2017.10.23 476 0
jumphu 2017.10.23 455 0
GNDOON 2017.10.23 468 0
jumphu 2017.10.23 442 0
gang 2017.10.23 399 0
백철하 2017.10.22 458 0
클라네스 2017.10.22 420 0
gang 2017.10.21 456 0
최태풍 2017.10.21 461 0
꿈꾸는개발자 2017.10.20 431 0
부끄럼소년 2017.10.20 497 0