[첫화면으로]UseModWiki소스수정/제목검색

마지막으로 [b]

1. 제목 검색 titlesearch action
1.1. 사용법
1.2. 부작용
1.3. action/titlesearch.pl 추가
1.4. 번역 파일 수정
1.5. 추가 업데이트 내역
1.6. 사용자 의견

1. 제목 검색 titlesearch action

페이지이름에 특정 문자열이 포함된 페이지들의 목록만 출력하는 액션

또는 특정페이지와 그 하위페이지들의 목록만 출력하게도 할 수 있다.

1.1. 사용법

두 가지 다 URL에 "action=titleindex" 가 들어가고, 그 뒤에 "string"인자 또는 "parent"인자로 구분 제목 검색:
wiki.pl/action=titlesearch&string=STRING
 제목에 STRING 이 포함된 페이지들의 목록을 출력

하위페이지 검색:

wiki.pl/action=titlesearch&parent=PARENT
  PARENT페이지와 그 하위페이지들의 목록을 출력

1.2. 부작용

1.3. action/titlesearch.pl 추가

# titlesearch action
# 1)
#   wiki.pl/action=titlesearch&string=STRING
#   : search the pages whose names include STRING
# 2)
#   wiki.pl/action=titlesearch&parent=PAGENAME
#   : search the subpages of PAGENAME


sub action_titlesearch {
    my $string = &GetParam('string');
    my $parent = &GetParam('parent');
    my @result_string = ();
    my @result_parent = ();

    if (($string eq '') && ($parent eq '')) {
        &DoIndex();
        return;
    }


    if ($string ne '') {
        print &GetHeader('', &QuoteHtml(Ts('Title Search for : %s', $string)), '');
        print '<br>';
        &PrintPageList(&SearchTitle($string));
    } else {
        print &GetHeader('', &QuoteHtml(Ts('Subpage Search for : %s', $parent)), '');
        print '<br>';
        &PrintPageList(&SearchTitle("^$parent(/|\$)"));
    }

    print &GetCommonFooter();
}

1;

1.4. 번역 파일 수정

translations/ko_KR.UTF-8.pl 과 ko_KR.EUC-KR.pl 파일에 다음 항목 추가
Title Search for : %s
페이지이름 검색 : %s
Subpage Search for : %s
하위페이지 검색 : %s

1.5. 추가 업데이트 내역

1.6. 사용자 의견

이게 필요했던 이유는... 위키를 통채로 iSilo 등으로 클리핑해서 Palm에 담고 다닐 수 없을까 해서 테스트를 해봤는데... 전체 위키 사이트를 변환하니 용량도 너무 크고해서 말이죠. 일부 페이지들만 가져올 수 있게 해볼까 해서였습니다.

(정작 iSilo로 담으려는게 이 위키는 아니고 따로 제 메모장 위키를 하나 만들어볼까 하면서 생각했던 거지만 ^^)

-- Raymundo 2008-9-26 12:17 am
이름:  
Homepage:
내용:
 

위키위키분류

마지막 편집일: 2008-9-26 12:17 am (변경사항 [d])
937 hits | Permalink | 변경내역 보기 [h] | 페이지 소스 보기