묻고답하기

안녕하세요.


현재 XE의 RSS 기능은

'통합 피드 관리' 관리자 메뉴의

'한 페이지당 글 수'를 통해

최신 글 부터 글 수만큼의 글을 보여주게 되어 있습니다.


제가 필요한 기능은 예~전 글 부터 또는 아예 처음 글 부터

메타블로그 등에 등록을 하고 싶은데

글이 5천개 정도 되니

'한 페이지당 글 수'를 5천을 잡으면 아예 등록 자체가 안되고

아무리 크게 잡아도 500 이상은 등록이 되지 않더라구요.


그래서 생각해본게

최신글 부터를 특정 시점, 기간 부터 지정 글 수 만큼

뿌려지도록 소스를 수정하면 되지 않을까 생각해봤습니다.


아마도 modules/rss 폴더 밑에

rss.view.php 를 수정하면 될 것 같은데

이래저래 해봐도 잘 모르겠네요.


혹시 고수님 계시면 도와주세요~~


감사합니다!


첨부 : rss.view.php 소스


<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
 * The view class of the rss module
 *
 * @author NAVER (developers@xpressengine.com)
 */
class rssView extends rss
{
 /**
  * Initialization
  *
  * @return void
  */
 function init()
 {
 }

 /**
  * Feed output.
  * When trying to directly print out the RSS, the results variable can be directly specified through $oRssView->rss($document_list)
  *
  * @param Object $document_list Document list
  * @param string $rss_title Rss title
  * @param string $add_description Add description
  */
 function rss($document_list = null, $rss_title = null, $add_description = null)
 {
  $oDocumentModel = getModel('document');
  $oModuleModel = getModel('module');
  $oModuleController = getController('module');
  // Get the content and information for the current requested module if the method is not called from another module
  if(!$document_list)
  {
   $site_module_info = Context::get('site_module_info');
   $site_srl = $site_module_info->site_srl;
   $mid = Context::get('mid'); // The target module id, if absent, then all
   $start_date = (int)Context::get('start_date');
   $end_date = (int)Context::get('end_date');

   $module_srls = array();
   $rss_config = array();
   $total_config = '';
   $total_config = $oModuleModel->getModuleConfig('rss');
   // If one is specified, extract only for this mid
   if($mid)
   {
    $module_srl = $this->module_info->module_srl;
    $config = $oModuleModel->getModulePartConfig('rss', $module_srl);
    if($config->open_rss && $config->open_rss != 'N')
    {
     $module_srls[] = $module_srl;
     $open_rss_config[$module_srl] = $config->open_rss;
    }
    // If mid is not selected, then get all
   }
   else
   {
    if($total_config->use_total_feed != 'N')
    {
     $rss_config = $oModuleModel->getModulePartConfigs('rss', $site_srl);
     if($rss_config)
     {
      foreach($rss_config as $module_srl => $config)
      {
       if($config && $config->open_rss != 'N' && $config->open_total_feed != 'T_N')
       {
        $module_srls[] = $module_srl;
        $open_rss_config[$module_srl] = $config->open_rss;
       }
      }
     }
    }
   }

   if(!count($module_srls) && !$add_description) return $this->dispError();

   $info = new stdClass;
   $args = new stdClass;

   if($module_srls)
   {
    $args->module_srl = implode(',',$module_srls);
    //$module_list = $oModuleModel->getMidList($args); //perhaps module_list varialbles not use

    $args->search_target = 'is_secret';
    $args->search_keyword = 'N';
    $args->page = (int)Context::get('page');
    $args->list_count = 15;
    if($total_config->feed_document_count) $args->list_count = $total_config->feed_document_count;
    if(!$args->page || $args->page < 1) $args->page = 1;
    if($start_date || $start_date != 0) $args->start_date = $start_date;
    if($end_date || $end_date != 0) $args->end_date = $end_date;
    if($start_date == 0) unset($start_date);
    if($end_date == 0) unset($end_date);

    $args->sort_index = 'list_order';
    $args->order_type = 'asc';
    $output = $oDocumentModel->getDocumentList($args);
    $document_list = $output->data;
    // Extract the feed title and information with Context::getBrowserTitle
    if($mid)
    {
     $info->title = Context::getBrowserTitle();
     $oModuleController->replaceDefinedLangCode($info->title);

     $info->title = str_replace('\'', '&apos;',$info->title);
     if($config->feed_description)
     {
      $info->description = str_replace('\'', '&apos;', htmlspecialchars($config->feed_description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
     }
     else
     {
      $info->description = str_replace('\'', '&apos;', htmlspecialchars($this->module_info->description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
     }
     $info->link = getUrl('','mid',$mid);
     $info->feed_copyright = str_replace('\'', '&apos;', htmlspecialchars($feed_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
     if(!$info->feed_copyright)
     {
      $info->feed_copyright = str_replace('\'', '&apos;', htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
     }
    }
   }
  }

  if(!$info->title)
  {
   if($rss_title) $info->title = $rss_title;
   else if($total_config->feed_title) $info->title = $total_config->feed_title;
   else
   {
    $site_module_info = Context::get('site_module_info');
    $info->title = $site_module_info->browser_title;
   }

   $oModuleController->replaceDefinedLangCode($info->title);
   $info->title = str_replace('\'', '&apos;', htmlspecialchars($info->title, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
   $info->description = str_replace('\'', '&apos;', htmlspecialchars($total_config->feed_description, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
   $info->link = Context::getRequestUri();
   $info->feed_copyright = str_replace('\'', '&apos;', htmlspecialchars($total_config->feed_copyright, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
  }
  if($add_description) $info->description .= "\r\n".$add_description;

  if($total_config->image) $info->image = Context::getRequestUri().str_replace('\'', '&apos;', htmlspecialchars($total_config->image, ENT_COMPAT | ENT_HTML401, 'UTF-8', false));
  switch(Context::get('format'))
  {
   case 'atom':
    $info->date = date('Y-m-d\TH:i:sP');
    if($mid) { $info->id = getUrl('','mid',$mid,'act','atom','page',Context::get('page'),'start_date',Context::get('start_date'),'end_date',Context::get('end_date')); }
    else { $info->id = getUrl('','module','rss','act','atom','page',Context::get('page'),'start_date',Context::get('start_date'),'end_date',Context::get('end_date')); }
    break;
   case 'rss1.0':
    $info->date = date('Y-m-d\TH:i:sP');
    break;
   default:
    $info->date = date("D, d M Y H:i:s").' '.$GLOBALS['_time_zone'];
    break;
  }

  if($_SERVER['HTTPS']=='on') $proctcl = 'https://';
  else $proctcl = 'http://';

  $temp_link = explode('/', $info->link);
  if($temp_link[0]=='' && $info->link)
  {
   $info->link = $proctcl.$_SERVER['HTTP_HOST'].$info->link;
  }

  $temp_id = explode('/', $info->id);
  if($temp_id[0]=='' && $info->id)
  {
   $info->id = $proctcl.$_SERVER['HTTP_HOST'].$info->id;
  }

  $info->language = Context::getLangType();
  // Set the variables used in the RSS output
  Context::set('info', $info);
  Context::set('feed_config', $config);
  Context::set('open_rss_config', $open_rss_config);
  Context::set('document_list', $document_list);
  // Force the result output to be of XMLRPC
  Context::setResponseMethod("XMLRPC");
  // Perform the preprocessing function of the editor component as the results are obtained
  $path = $this->module_path.'tpl/';
  //if($args->start_date || $args->end_date) $file = 'xe_rss';
  //else $file = 'rss20';
  switch (Context::get('format'))
  {
   case 'xe':
    $file = 'xe_rss';
    break;
   case 'atom':
    $file = 'atom10';
    break;
   case 'rss1.0':
    $file = 'rss10';
    break;
   default:
    $file = 'rss20';
    break;
  }

  $oTemplate = new TemplateHandler();

  $content = $oTemplate->compile($path, $file);
  Context::set('content', $content);
  // Set the template file
  $this->setTemplatePath($path);
  $this->setTemplateFile('display');
 }

 /**
  * ATOM output
  *
  * @return Object
  */
 function atom()
 {
  Context::set('format', 'atom');
  $this->rss();
 }

 /**
  * Error output
  *
  * @return Object
  */
 function dispError()
 {
  // Prepare the output message
  $this->rss(null, null, Context::getLang('msg_rss_is_disabled') );
 }

 /**
  * Additional configurations for a service module
  * Receive the form for the form used by rss
  *
  * @param string $obj Will be inserted content in template
  * @return Object
  */
 function triggerDispRssAdditionSetup(&$obj)
 {
  $current_module_srl = Context::get('module_srl');
  $current_module_srls = Context::get('module_srls');

  if(!$current_module_srl && !$current_module_srls)
  {
   // Get information of the selected module
   $current_module_info = Context::get('current_module_info');
   $current_module_srl = $current_module_info->module_srl;
   if(!$current_module_srl) return new Object();
  }
  // Get teh RSS configurations for the selected module
  $oRssModel = getModel('rss');
  $rss_config = $oRssModel->getRssModuleConfig($current_module_srl);
  Context::set('rss_config', $rss_config);
  // Set the template file
  $oTemplate = &TemplateHandler::getInstance();
  $tpl = $oTemplate->compile($this->module_path.'tpl', 'rss_module_config');
  $obj .= $tpl;

  return new Object();
 }
}
/* End of file rss.view.php */
/* Location: ./modules/rss/rss.view.php */

태그 연관 글
  1. [2017/03/21] 묻고답하기 RSS 읽어오기가 안됩니다. ㅜㅜ by 늘같이
  2. [2015/04/03] 묻고답하기 atom10.html에서.... by 컴박살 *2
  3. [2014/12/26] 묻고답하기 피드가 발행이 안되는데 이유를 모르겠습니다. by 가을풍경 *2
  4. [2014/06/23] 묻고답하기 RSS에 권한을 줄수 있나요? by Lin-e *3
  5. [2014/03/13] 묻고답하기 게시판에서 특정기간 게시물만 선택해서 출력할 수 있을까요? by :DunhillBoy *4
글쓴이 제목 최종 글
XE 공지 글 쓰기,삭제 운영방식 변경 공지 [16] 2019.03.05 by 남기남
핀팡퐁! 댓글창의 위치를 변경하고 싶습니다. [1] 2014.07.04 by KrteamENT
사내 사용자 정의(확장변수) 입력값이 없을때 본문에 출력이 안되게 하는법 [1] 2014.07.04 by SeungXE
AmangRYun 게시판 만들기질문이요!! [2] file 2014.07.04 by AmangRYun
elancer godaddy.com 웹호스팅 계정에서 1.4버전 설치 안되나요? [3] 2014.07.04 by mAKEkr
jkx08q 메인페이지에 이미지 슬라이드 [2] file 2014.07.04 by jkx08q
pitapat 아이폰 사파리에서 로그인이 안되는 문제ㅠㅠ [3] 2014.07.04 by 시니시즘
Jacobox 스케치북 스킨 갤러리 목록형 이미지 업로드 시 깨지는 현상 [2] file 2014.07.04 by Jacobox
오락실주인 신디케이션 모듈 질문 [2] file 2014.07.04 by 담소
몽실아빠 모바일에서 갤럭시S4 기종만 파일선택 버튼 무반응 [9] 2014.07.04 by 담소
착한악마 비밀번호 찾기 질문/ 답변을 뺄수 있는 방법이 있는지요?? [2] 2014.07.04 by 착한악마
joanness '이미지 없음'으로 나오는 것 해결 방법이 궁금합니다. [6] file 2014.07.04 by 시니시즘
cjw90 module.xml 파일에 설정 파라미터와 액션 정의가 뭔가요? [1] 2014.07.04 by 휘즈
장재수 RSS 통합 피드로 게시글을 보여줄때 특정 기간것만 보여주게 할 수 없을까요? [1] 2014.07.04 by 장재수
때린데 또때려 스케치북5 게시판에서 쓰기버튼 넣기 질문입니다. [2] file 2014.07.04 by 때린데 또때려
멘탈가루루루루몬 테이블이 모바일 화면을 벗어나서 예쁘지가 않게 보일 때 해결 법을 구하고 있습니다..ㅎㅎ;; [1] 2014.07.04 by 멘탈가루루루루몬
geogeo123 index.html bak 이게 대체 무슨 파일인가요? [3] 2014.07.04 by 광개토대왕3
paulking2 지식인에서 비밀글 답변도 가능하게 하고싶습니다 아시는분 답변좀 해주심감사할게요 ㅜㅜ  
fbkjasfa 서버 2012에서 설치하면 500에러 fastcgi 오류가 뜹니다. [1] 2014.07.03 by Gunmania
웜블 default레이아웃 메뉴관련 질문드립니다!  
glaalswl 모바일 레이아웃 적용중입니다.. 근데 글등록이나 삭제가 안되서요.... [9] 2014.07.03 by 멘탈가루루루루몬
geogeo123 bootstrap-3.2.0-dist 를 깔고 싶은데요.. [5] 2014.07.03 by lamb91
geogeo123 애드센스 모바일에서도 pc 형 광고 사이즈로 나오는데 해결방법좀 부탁드립니다. [8] 2014.07.03 by geogeo123
우소영134 모바일 관리자 접속에서  
모해 모바일에서 리미지 리사이즈 관련 질문드립니다 [4] 2014.07.03 by 모해
이선아362 글쓰기 submit 관련 태그 변경이 가능할까요? [4] 2014.07.03 by 이선아362
익스트리머01 댓글 달기가 안됩니다. 도와주세요 file  
샘572 갑자기 페이지를 찾을 수 없다는 오류가 나요ㅠㅠ 有 file  
jkx08q 자기소개 위젯? [6] 2014.07.03 by 시니시즘
안엉어웅넌223 캡차가 클릭이 안되요 [4] 2014.07.03 by 안엉어웅넌223
지원필요 다운로드 랭킹위젯 글씨크기줄이기 file