본문 바로가기
미디어위키

Manual $wgContentNamespaces

by 다움위키 2023. 12. 30.
Namespaces: $wgContentNamespaces
Namespaces which are considered to contain real content, or articles
Introduced in version: 1.7.0 (r14738)
Removed in version: still in use
Allowed values: (Array of namespace indexes)
Default value: [ NS_MAIN ]
Other settings: Alphabetical | By function

Details

$wgContentNamespaces는 사용자-지정 이름공간에게 다음 기능을 위한 유용한 콘텐츠를 포함하는 것으로 인식될 수 있도록 하기 위해 존재합니다:

Special:Random, Special:Statistics, Special:AncientPages, Special:DeadendPages, Special:FewestRevisions, Special:LonelyPages, Special:MostCategories, Special:MostInterwikis, Special:RandomPage, Special:ShortPages, Special:LongPages, Special:UncategorizedPages, Special:WithoutInterwiki, {{NUMBEROFARTICLES}}

추가 이름공간에 임의의 페이지를 선택하거나 위키의 기사의 개수 계산을 생성할 때 고려해야 하는 "content"도 포함되어 있는 경우에 유용합니다. 그것은 역시 $wgExemptFromUserRobotsControl의 기본값으로 사용하며, __NOINDEX__와 __NOFOLLOW__ 마법 단어는 이들 이름공간에서 작동하지 않음을 의미합니다.

주요 이름공간은 인덱스에서 참조하는 이 배열의 다른 이름공간과 마찬가지로 컨텐츠 이름공간으로 여겨집니다.

예제:

$wgContentNamespaces = [ 0, 12, 112 ];

또는

$wgContentNamespaces = [ NS_MAIN, NS_HELP, NS_PROJECT, NS_CUSTOMNAMESPACE ];
만약 이 변수를 변경하면, updateArticleCount.phpSpecial:Statistics와 {{NUMBEROFARTICLES}}의 개수를 업데이트하기 위해 실행해야 할 것입니다.

이것은 전체-텍스트 검색 엔진이 기본적으로 검색하는 이름공간을 제어하지 않습니다; 그것은 $wgNamespacesToBeSearchedDefault을 사용하여 별도로 구성되어야 합니다.

See also