Difference between revisions of "Manual:Extension/BlueSpiceCountThings"
[unchecked revision] | [quality revision] |
(Tag: 2017 source edit) |
m (Tag: 2017 source edit) |
BlueSpiceCountThings CountThings introduces a set of tags that allow for counting various metadata in the wiki. These information will be displayed on page in the configurable table.
Using BlueSpiceCountThings[edit | edit source]
Tags made available by this extensions are:
- countarticles - Displays total number of articles on the wiki
- countusers - Displays total number of users registered on the wiki
- countfiles - Displays total number of files uploaded to the wiki
-
countcharacters - This tag can be set up in several modes:
- Chars – number of characters on current page (based on the wiki code, including spaces)
- Words – number of words on current page
- Pages – number of pages current article would have if printed/exported
- All – default mode – shows all the information above in a table
Available tags are: countarticles, countusers, countfiles, and countcharacters.
Contents
Inserting tags[edit | edit source]
In order for information from this extension to be displayed on page, an editor must add desired tags on the page.
Tags are added through the "InsertMagic" dialog , which can be accessed by clicking on "Insert" in VisualEditor toolbar and then on "Magic word". In the resulting dialog, choose one of the four previously mentioned types of tags and click "Done".
Configuring the countcharacters tag[edit | edit source]
While other tags have no configuration options, and just adding them to the page is sufficient, "the countcharacters" tag must first be configured.
After inserting this tag , or clicking on an existing tag already on the page, a dialog for configuration (inspector) will open. In this dialog, in the main text input field, the opens.
Enter the name of the page for which to count characters must be inserted. This name should include the namespace in case if the page is not in the main namespace. Below the text input field, there is a dropdown box to Next, select the mode (see above).
Save and you should get:
Number of articles on the wiki[edit | edit source]
This number is based on the database table page
.
<bs:countarticles />
Number of characters, words and pages (2000 characters = 1 Page) of an article
from the dropdown menu.
While selecting the mode and page, a preview of the output is displayed above the dialog box. If the page title in the table heading shows the page name in red ("redlink"), you have misspelled the page name and the page does not exist.
Inserting tags in wikitext[edit | edit source]
If you want to show all information (characters, words and pages) of an article, please use this code:
<bs:countcharacters>ARTICLENAME</bs:countcharacters>
ARTICLENAME is: Name of your page.
If you just want to show part of the information, please choose between these different modes:
-
- chars: Only number of characters.
- words: Only number of words.
- pages: Only number of pages.
- all (Standard): All informations.
The mode is defined with "mode" Attribute: add the tags in source code edit mode, use the following syntax.
<bs:countarticles /> <bs:countusers /> <bs:countfiles /> <bs:countcharacters mode="chars">Name of the article<Words">ARTICLENAME</bs:countcharacters><br>Number of users in a system (users who are signed-in)[edit | edit source]
<bs:countusers />
The code has to be integrated directly into the article.
See also[edit | edit source]
Our reference page.
countcharacters>
For the "countcharacters" tag, replace ARTICLENAME with the page name for which you want to get the count values. Also, "mode" can be adjusted as needed. For details, visit the reference page:
Related info
__TOC__ ==What is BlueSpiceCountThings?== '''BlueSpiceCountThings{{DISPLAYTITLE:CountThings}}'''CountThings''' introduces a set of tags that allow for counting various metadata in the wiki. These information will be displayed on page in the configurable table. ==Using BlueSpiceCountThings== Tags made available by this extensions are: * countarticles - Displays total number of articles on the wiki * countusers - Displays total number of users registered on the wiki * countfiles - Displays total number of files uploaded to the wiki * countcharacters - This tag can be set up in several modes: ** Chars – number of characters on current page (based on the wiki code, including spaces) ** Words – number of words on current page ** Pages – number of pages current article would have if printed/exported ** All – default mode – shows all the information above in a table ==Inserting tags== In order for information from this extension to be displayed on page, an editor must add desired tags on the page. Available tags are: countarticles, countusers, countfiles, and countcharacters. ==Inserting tags== [[File:Manual:ve-magicword.png|link=https://en.wiki.bluespice.com/wiki/File:Manual:ve-magicword.png|alt=Insert magic word|thumb|151x151px|Insert magic word]] Tags are added through the "InsertMagic" dialog, which can be accessed by clicking on "Insert" in VisualEditor toolbar and then on "Magic word". In the resulting dialog, choose one of the four previously mentioned types of tags and click "Done". ===Configuring <br /> [[File:Manual:VE-magicword-countarticles.png|alt=choosing a tag|center|thumb|450x450px|choosing a tag]] ===Configuring the countcharacters tag=== While other tags have no configuration options, and just adding them to the page is sufficient, "the ''countcharacters"'' tag must first be configured. After inserting this tag, or clicking on an existing tag already on the page, a dialog for configuration (inspector) will open. In this dialog, in the main text input field, the opens. [[File:Manual:VE-magicword-countcharacterswords.png|alt=Count characters dialog box|center|thumb|600x600px|Count characters dialog box]] [[File:Manual:VE-magicword-countcharactersredlink.png|alt=Redlink page|thumb|180x180px|Redlink page]] Enter the name of the page for which to count characters must be inserted. This name should include the namespace in case if the page is not in the main namespace. Below the text input field, there is a dropdown box to select the mode (see above). ::: [[File:CntTngs5.jpg|500x311px]] Save and you should get: ::: [[File:CntTngs6.jpg|500x309px]] ===Number of articles on the wiki=== This number is based on the database table <code>page</code>. <nowiki><bs:countarticles /></nowiki> ===Number of characters, words and pages (2000 characters = 1 Page) of an article=== If you want to show all information (characters, words and pages) of an article, please use this code: <nowiki><bs:countcharacters>ARTICLENAME</bs:countcharacters></nowiki> ARTICLENAME is: Name of your page. If you just want to show part of the information, please choose between these different modes: :* <tt>chars</tt>: Only number of characters. :* <tt>words</tt>: Only number of words. :* <tt>pages</tt>: Only number of pages. :* <tt>all</tt> (Standard): All informations. The mode is defined with "mode" Attribute: <nowiki><bs:countcharacters mode="chars">Name of the article</bs:countcharacters><br></nowiki> ===Number of users in a system (users who are signed-in)=== <nowiki><bs:countusers /></nowiki> The code has to be integrated directly into the article. ==See also== Our [[CountThings|reference page]].Next, select the mode from the dropdown menu. While selecting the mode and page, a preview of the output is displayed above the dialog box. If the page title in the table heading shows the page name in red ("redlink"), you have misspelled the page name and the page does not exist. ===Inserting tags in wikitext=== If you add the tags in source code edit mode, use the following syntax. <pre> <bs:countarticles /> <bs:countusers /> <bs:countfiles /> <bs:countcharacters mode="Words">ARTICLENAME</bs:countcharacters> </pre> For the "countcharacters" tag, replace ARTICLENAME with the page name for which you want to get the count values. Also, "mode" can be adjusted as needed. For details, visit the reference page: {{Box Links-en|Topic1=[[Reference:BlueSpiceCountThings]]}} {{Translation}} [[Category:Editing]]
(17 intermediate revisions by 4 users not shown) | |||
Line 1: | Line 1: | ||
− | + | {{DISPLAYTITLE:CountThings}}'''CountThings''' introduces a set of tags for counting various metadata in the wiki. Available tags are: countarticles, countusers, countfiles, and countcharacters. | |
− | |||
− | |||
− | |||
− | ''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
==Inserting tags== | ==Inserting tags== | ||
− | + | [[File:Manual:ve-magicword.png|link=https://en.wiki.bluespice.com/wiki/File:Manual:ve-magicword.png|alt=Insert magic word|thumb|151x151px|Insert magic word]] | |
− | + | Tags are added through the "InsertMagic" dialog by clicking on "Insert" in VisualEditor toolbar and then on "Magic word". In the resulting dialog, choose one of the four previously mentioned types of tags and click "Done".<br /> | |
− | Tags are added through InsertMagic dialog | + | [[File:Manual:VE-magicword-countarticles.png|alt=choosing a tag|center|thumb|450x450px|choosing a tag]] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
+ | ===Configuring the countcharacters tag=== | ||
+ | While other tags have no configuration options, and just adding them to the page is sufficient, the ''countcharacters'' tag must be configured. | ||
− | + | After inserting this tag or clicking on an existing tag already on the page, a dialog opens. | |
+ | [[File:Manual:VE-magicword-countcharacterswords.png|alt=Count characters dialog box|center|thumb|600x600px|Count characters dialog box]] | ||
+ | [[File:Manual:VE-magicword-countcharactersredlink.png|alt=Redlink page|thumb|180x180px|Redlink page]] | ||
+ | Enter the name of the page for which to count characters. | ||
+ | This name should include the namespace if the page is not in the main namespace. | ||
+ | Next, select the mode from the dropdown menu. | ||
− | + | While selecting the mode and page, a preview of the output is displayed above the dialog box. If the page title in the table heading shows the page name in red ("redlink"), you have misspelled the page name and the page does not exist. | |
− | === | + | ===Inserting tags in wikitext=== |
− | + | If you add the tags in source code edit mode, use the following syntax. | |
+ | <pre> | ||
+ | <bs:countarticles /> | ||
+ | <bs:countusers /> | ||
+ | <bs:countfiles /> | ||
+ | <bs:countcharacters mode="Words">ARTICLENAME</bs:countcharacters> | ||
+ | </pre> | ||
− | + | For the "countcharacters" tag, replace ARTICLENAME with the page name for which you want to get the count values. Also, "mode" can be adjusted as needed. For details, visit the reference page: | |
− | = | + | {{Box Links-en|Topic1=[[Reference:BlueSpiceCountThings]]}} |
− | + | {{Translation}} | |
+ | [[Category:Editing]] |