Download Wikipedia Category Tree

30 views
Skip to first unread message

Glenda Cavicchia

unread,
Jan 16, 2024, 8:33:26 PM1/16/24
to vestnebirdha

The CategoryTree extension provides a dynamic view of the wiki's category structure as a tree. It uses AJAX to load parts of the tree on demand. CategoryTree was originally written by Daniel Kinzler as an external tool, but was later integrated into the MediaWiki software with the help of Tim Starling.

download wikipedia category tree


Download Zip https://t.co/2DZh9DwaOi



The custom tag is called . For example, if you put Foo on a wiki page, it will show the contents of category Foo as a dynamic tree on that page (see example to the right). The tag accepts the following attributes, using a HTML-like syntax:

By default, when listing subcategories on a category page, each subcategory is followed by an integer, indicating how many subcategories lie beneath it, how many pages it contains, and how many files are in the category (if applicable):

More precisely, a comma separated list of the number of pages (mediawiki:categorytree-num-pages), subcategories (mediawiki:categorytree-num-categories), and files (mediawiki:categorytree-num-files) in the category, or empty (mediawiki:categorytree-num-empty) in the case the category has no members. In versions prior to those around 1.19 this value was different. See older version of these docs.

Bots and scripts that parse the HTML of category pages can use the notree URL parameter to force the traditional output. However, HTML output is generally not stable, so it is recommended to change your script to use the API to fetch category listings and similar.

After you implement the CategoryTree plugin and add the code to show the tree, if you see a message that says Category Not Found, you need to add some content in your category pages. The category pages can't be red pages, basically. Click your category names, add some text in the category page, and then your tree should work fine.

Make sure the right version of this extension is installed, relative to the version of MediaWiki you have installed. In particular, versions of this extension made for versions of MediaWiki prior to 1.17 are not compatible with MediaWiki 1.17 and greater, and will cause issues where all the paging links on category pages are broken.

Since r36920 (July 2008) with MediaWiki 1.13 (r36917), you can integrate a CategoryTree in the sidebar simply by setting $wgCategoryTreeSidebarRoot to the category you want to use as a root. This only works with skins based upon SkinTemplate however, that is, Modern, Monobook, Chick, Simple, and MySkin, but not Standard, Nostalgia or CologneBlue.

If you want to create a link that goes to the generic categorytree (displayed as Category tree) when you're on a non-category page, and to a particular categorytree (displayed as View as category tree, with foo being the name of the category you're viewing) when you're on a category page:

The CategoryTree extension adds [+] or [] "expand" widgets to the subcategories listed on category pages, where [+] indicates the presence of further subcategories and [] indicates the absence of them. If JavaScript is disabled, those widgets just do nothing.

The custom tag is called . For example, if you put Foo on a wiki page, it will show the contents of category Foo as a dynamic tree on that page (see example to the right). The tag accepts the following attributes, using an HTML-like syntax:

You can also use parser function syntax to place a category tree on a page. This works just like the tag, using a different syntax, e.g. #categorytree:Foo; options can be specified using the syntax for named template parameters, e.g. mode=pages.

A tree can be defined as a large woody perennial plant. Though there is no set definition of size, it is generally at least 4.5 m (15 ft) high at maturity, and with branches supported on a single main stem. Trees are important components of the natural landscape and significant elements in landscaping. Compared with most other forms of plants, trees are long-lived. A few species of trees grow to over 100 m (300 ft) tall and some live for several millennia.

If you are confused or uncertain about the categories on a page, add Uncat. The main use of this template is to show that the page needs to have categories added to it. This may mean that it has no categories. It can also be used if the page may be missing categories or be in the wrong category. Users with experience dealing with categories will look at the page and help fix the categories.

Categories are all a part of what is called the Category Tree. Each category is a sub-category, or child, of a more general category, the parent category. The category tree is made up of two main parts. These two parts are Articles and Wikipedia. As the name says, the section on articles deals with all of the articles. The section on Wikipedia is for all pages which are not articles. These include pages in the Wikipedia: namespace and templates.

The article categories are separated into nine major groups: Everyday life, Geography, History, Knowledge, Language, Literature, People, Religion, and Science. Each of these groups is separated into smaller groups or sub-categories which have even smaller groups inside them. The main categories are said to be at the top of the Category Tree and each sub-category is one step below them. The farther down the category tree a category is, the more precisely it groups the pages in it.

It is usually best to put a page in the categories which are most specific to it, rather than in all the categories which might be related. Pages should be placed in the lowest level of the category tree that applies to them. Pages should never be placed in both the parent and child categories. They should not be placed in a category and any of the categories above it. This means if a page is placed in a category, it should not be placed in any of the parent categories of that category, or any parent categories of that category's parents, and so on, moving up the category tree. It may be placed in categories in different sections of the category tree, but not in those directly above it.

Because Category:Brass instruments is a sub-category of Category:Musical instruments, Trombone should not be put into both categories. If all the hundreds of types of musical instruments are put into the parent Category:Musical instruments, that category will get too full to be useful in helping users to find the pages they are looking for, which is the true purpose of the category system. It is easier for the user to browse Category:Musical instruments and see several sub-categories such as Category:Brass instruments, Category:Woodwind instruments, etc. This lets the user select the one they want and browse the smaller number of pages listed there. It takes one more click, but less time than searching a very large category.

The Rocky Mountains are a group of mountains in North America. More precisely, they are mountains that are in both the United States and Canada. Because of this, they are placed in Category:Mountains of the United States and Category:Mountains of Canada. They are not placed in Category:Mountains because Category:Mountains of the United States and Category:Mountains of Canada are both sub-categories of Category:Mountains. They are also not put in Category:Geography, because Category:Mountains is a sub-category of that.

Many times the most correct category may not exist yet. When this happens, a new category may be created (see: Creating new categories before doing this) or the article is placed in the lowest existing category that applies to it. This may require using more than one category.

Circus Maximus is a building located in Rome, Italy. The most correct category for it would be Category:Buildings and structures in Rome. Because this category does not exist yet, the article would be placed in the most correct categories that do exist: Category:Buildings and structures in Italy and Category:Rome. When the correct category is created, the page can then be moved into it.

Because categories are a way to group together similar articles, there is no need to create a new category for just one or two articles. There should be a minimum of three articles that would fit into the category before a new category is created. Sub-categories should be considered when a category starts to get too large to easily find an article in it. There is no set number of articles to require this, but if a category has more than twenty articles, it is usually a good time to think about dividing it into smaller sub-categories.

The names of categories should be kept as short as possible but still explain what the category is for. Category names should not be ambiguous. If a possible name for the category has more than one meaning, it is probably better to find a different name or change it in a way that only has one meaning. For example, Georgia has two meanings. It is the name of a country in eastern Europe and a state in the United States. If the category was named Category:Georgia, it could mean either of them. This could cause people to put the wrong articles in the category. Category:Georgia (country) only has one meaning: the country in Europe. It is a better name for the category.

Naming conventions should also be followed when naming new categories. Similar categories should have similar names. This makes it easier to know which category to use and helps stop people from creating a new category that is the same as one that already exists. It is best to look at what categories you will be putting the new category into and see how other categories there are named. This should give you a basic idea of what form the name should be in.

As with all pages, Categories should have a short statement that says what they are about. If there is an article that defines the category, the template catmore can be used to show the main article for the category. If no article exists, you should write one or two sentences to explain the category. Interwiki links to the same categories on Wikipedias in other languages should also be added to the page.

f448fe82f3
Reply all
Reply to author
Forward
0 new messages