MediaWiki扩展:动态多层分类表
天下维客,你可以修改的网络知识库
本文取自元维基,欢迎共同翻译、整理与大家共享,促进中文wiki发展^_^
目录 |
[编辑]
安装
DynamicCategoryMap 是一个 Mediawiki 1.5 扩展.它使整个网站有了一个导航功能. 它将列出1、2级的所有分类(顶级分类和子分类) dynamically and arrange their output in a user-friendly manner. Follow links of each category in the map, user could easily find all articles and sub-categories in it.
This extension is written with the help from Dynamic Page List.
[编辑]
前提条件
- PHP 5 or above is needed.
[编辑]
Installation
- Follow the links below to download source code.
- <a href="/index.php?title=Special:Upload&wpDestFile=DynamicCategoryMap.pdf" class="new" title="DynamicCategoryMap.pdf"> DynamicCategoryMap.php</a>
- <a href="/index.php?title=Special:Upload&wpDestFile=CategoryTravelerBase.pdf" class="new" title="CategoryTravelerBase.pdf"> CategoryTravelerBase.php</a>
- <a href="/index.php?title=Special:Upload&wpDestFile=CategoryNode.pdf" class="new" title="CategoryNode.pdf"> CategoryNode.php</a>
- <a href="/index.php?title=Special:Upload&wpDestFile=CategoryMap.pdf" class="new" title="CategoryMap.pdf"> CategoryMap.php</a>
- Copy the contents in pdf out, and create corresponding php source files.
- Copy DynamicCategoryMap.php to "extensions" folder.
- Copy CategoryTravelerBase.php , CategoryNode.php , CategoryMap.php to "includes" folder.
- Add a line require_once( "extensions/DynamicCategoryMap.php" ); into "LocalSettings.php".
[编辑]
Usage
[编辑]
Tag and its Parameters
| Tag Name | DynamicCategoryMap | |
| Parameters | title (optional) | Title of the output category map |
Note: the only parameter of Dynamic Category Map is "title", which could be omitted.
[编辑]
Samples
A sample snapshot of Dynamic Category Map is shown below.
The underlaying wiki codes are:
<DynamicCategoryMap> title=Find Information in the Topic Categories </DynamicCategoryMap>
原文参见: Dynamic Category Map



