웹마스터 팁
(08년 1월2일수정)0.2.3이후 최근글에 공지사항을 제외시키고자할 경우
2007.11.07 10:31
0.1원짜리 팁입니다.
제로보드가 알바트로스부터는 최근글출력시 공지글도 포함시키게 변경되었고
저희서버의 경우 제로보드4에서 이전한 게시글과 새로 작성된 게시글들이 한 게시판에 있을경우
날짜가 뒤섞여버려 최근글 출력이 이상하게 되는 현상이있었습니다.
이 팁은 혹시나 저와 같은 최근글 뒤섞임현상을 피해 전과같은 형태로 출력되기를 원하시는분
혹은 최근글목록에 공지글을 제외시키고자하시는분들을 위한 팁입니다.
수정할 파일은 두개, 각각 한줄씩 코드를 삽입하면 됩니다.
/widgets/newest_document/queries/getNewestDocuments.xml
/widgets/newest_document/newest_document.class.php
1. getNewestDocuments.xml
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
<condition operation="equal" column="category_srl" var="category_srl" pipe="and" />
<condition operation="excess" column="list_order" var="avoid_notice" pipe="and" /> //삽입된 코드
2. newest_document.class.php 43째줄 바로아래
$obj->sort_index = $order_target;
$obj->order_type = $order_type=="desc"?"asc":"desc";
$obj->list_count = $list_count;
if($obj->sort_index == 'list_order') $obj->avoid_notice = -2100000000; // 삽입된 코드
그럼.
2008년 1월 2일 추가
제로보드 최신버전 최근글 위젯에는 적용이 안되나 보군요.
적용파일은 위와 동일하며 수정내용만 다릅니다.
1. getNewestDocuments.xml
<condition operation="equal" column="is_notice" var="is_notice" pipe="and" /> //재수정 코드
2. newest_document.class.php (기본 위젯기준 56번째줄에 해당)
if($obj->sort_index == 'list_order') $obj->is_notice = N; // 재수정 코드
댓글 11
-
skylish
2007.11.07 10:48
좋은 팁 감사합니다 ^^ -
민이688
2007.11.07 15:28
제가 원하는 정보네요 감사합니다. -
다이제
2007.11.07 19:46
아-,- 2. newest_document.class.php 43째줄 바로아래
$obj->sort_index = $order_target;
$obj->order_type = $order_type=="desc"?"asc":"desc";
$obj->list_count = $list_count;
if($obj->sort_index == 'list_order') $obj->avoid_notice = -2100000000; // 삽입된 코드 <--이걸 삽입하니..
Warning: Cannot modify header information - headers already sent by (output started at /home1/soo14/public_html/zbxe/widgets/newest_document/newest_document.class.php:1) in /home1/soo14/public_html/zbxe/classes/display/DisplayHandler.class.php on line 99
이런 오류가 뜹니다 ㅡㅜ 뒤죽 박죽 최근글....미어-,-;; 뭘손대야 하죠-,- -
포레버
2007.11.07 21:03
흠...오류날 부분이 아닐텐데요.
제로보드버전이 0.2.5 버전이 맞나요 ?
혹시 모르니 0.2.5 버전의 위젯을 덮어씌우신뒤 두줄 수정해보시기 바랍니다. -
다이제
2007.11.09 15:16
0.2.5 맞구요..
이상하네요-,- 킁-,- -
이하늘936
2007.11.07 23:29
존 팀이네여... 테스트 들어 갑니다. ^^
-
제로攻略
2007.11.19 20:36
제발 부탁입니다.
공지글들만 최근게시물로 띄우려면 어떻게 하죠?
공지글리스트만 뽑아내려는데.
답변부탁드립니다. -
포레버
2007.11.20 17:44
1. getNewestDocuments.xml
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
<condition operation="equal" column="category_srl" var="category_srl" pipe="and" />
<condition operation="excess" column="is_notice" var="notice" pipe="and" /> //수정된 코드
2. newest_document.class.php
$obj->sort_index = $order_target;
$obj->order_type = $order_type=="desc"?"asc":"desc";
$obj->list_count = $list_count;
if($obj->sort_index == 'list_order') $obj->notice = N; // 수정된 코드이 방법은 카테고리로 분류된 공지글을 보여주는게 아닌
어드민권한등으로 공지글에 체크된 게시글을 뽑아내게 됩니다.
물론 해당위젯을 사용하는 모든 최근글목록이 영향을 받게 되겠지요.
원하신대로 됐는지 모르겠습니다. -
제로攻略
2007.11.20 20:51
다른 게시판의 최근게시물은 정상적으로 나와야 하기에 newest_document 를 newest_document_notice라는 이름으로 복사한후 님의 방법대로 수정하고 최근게시물소스에서도 newest_document_notice이름을 수정해넣었는데 메인페이지를 새로고침해보니. 아래와 같은 에러뜨네요.
Fatal error: Call to a member function proc() on a non-object in /web/home/g51888/html/tobbs/classes/widget/WidgetHandler.class.php on line 52
무슨 영문인지.
혹시 제가 위젯복사본은 따로 모듈등록절차가 있어야 하나요?
직접 복사해서 쓰면 안되나요?위에 알려주신 방법 감사하구요.
다른게시판에 영향없이 별도로 복사해서 쓸려고 하는데. 안되네요.
다시 한번 조언 부탁드립니다. -
포레버
2007.11.21 01:22
네 그런식으로 새로운 위젯을 만드는것처럼 작업을 하실경우는
다음 3가지것에 유의해야합니다.
1. 생성된 폴더이름
2. 폴더내의 newest_document.class.php
3. 위 파일내에 명시된 클래스값(기본은 newest_document 이겠죠.)
위의 3가지부분을 모두 동일하게 맞추셔야 오류가 발생하지 않습니다.
결국 제로님의 경우
1 -> newest_document_notice 라면
2 -> newest_document_notice.class.php
3 -> class newest_document => class newest_document_notice 로 수정
조금더 아랫쪽에 있는
$output = executeQuery('widgets.newest_document_notice.getNewestDocuments', $obj);
를
$output = executeQuery('widgets.newest_document_notice_notice.getNewestDocuments', $obj);
이렇게 수정하셔야합니다. -
제로攻略
2007.11.21 11:03
하하~, 됐네요.
진짜 고마워요.
제로보드 소스뜯어보기가 참 힘들었는데.
잘 배우고 갑니다.
감사감사~
제목 | 글쓴이 | 날짜 |
---|---|---|
member 모듈 메일인증을 사용할때 모바일 기본스킨에서 회원가입 후 이메일 발송 안내 띄우기 [2] | 후하니 | 2015.08.01 |
새로고침 없는 실시간 웹서비스를 위한 기술과 간략한 역사(?) [1] | onTrust | 2015.07.27 |
[실험팁] XE 고용량/큰사진 썸네일 깨지는 것 해결 | socialskyo | 2015.07.20 |
레이아웃 메뉴에서 메뉴옆에 글수 표시하기 | 반걸 | 2015.07.20 |
DB에서 직접 시퀀스 생성하기 [3] | 기진곰 | 2015.07.18 |
CloudFlare 사용시 방문자 IP와 SSL 접속여부가 정확하게 파악되지 않는 문제 해결법 [4] | 기진곰 | 2015.07.12 |
IIS서버 자동 설치 프로그램(PHP, MySQL, phpMyAdmin) [1] | 공처아찌 | 2015.07.12 |
모바일에 최적화된 화면으로 보기 문구가 레이아웃을 가리는 문제 | creative8 | 2015.07.11 |
config 파일을 일반 유저가 쓸 수 없는 문제 해결법 [15] | wkp | 2015.07.09 |
문서페이지가 수정이 되지 않는 문제 [2] | monet | 2015.07.07 |
위젯 가운데 정렬 하는법 [3] | 불금 | 2015.07.05 |
홈페이지 제작 시 점검사항 15가지 [1] | 유래유거 | 2015.06.29 |
사이트 서버 운영체제와 사용하는 웹서버 소프트웨어 알아보는 사이트 | 후하니 | 2015.06.28 |
홈페이지 속도가 느린 이유.(팁같지도 않은 팁) [11] | 가브리엘조 | 2015.06.27 |
cloudflare api 용 curl 기본값 | 마루디자인 | 2015.06.24 |
추천검색어,실시간인기순위 소스 | codlllle | 2015.06.21 |
실시간 rss 피드글 출력 위젯 | codlllle | 2015.06.20 |
다음 위젯 뱅크를 대신할 위젯 베스트! | codlllle | 2015.06.20 |
자신이 쓴 글에 특정유저 댓글을 차단 | Ikoo | 2015.06.20 |
다음 실시간 검색어 위젯 | codlllle | 2015.06.19 |