allwiki首页  
天下维客 你可以修改的网络知识库
首页最近更改优秀条目专题展示电脑科技词典软件学习网络知识电脑安全明星时尚天下百科
 

MediaWiki扩展:动态多层分类表

天下维客,你可以修改的网络知识库

Jump to: navigation, search

本文取自元维基,欢迎共同翻译、整理与大家共享,促进中文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.

Image:Sample Dynamic Category Map.png

The underlaying wiki codes are:


 <DynamicCategoryMap>
   title=Find Information in the Topic Categories
 </DynamicCategoryMap>

原文参见: Dynamic Category Map

Personal tools
工具
金银币拍卖 金币拍卖预展  金银币网店 熊猫金银币 生肖金银币