Template:Size: Difference between revisions

From WikiIndex
Jump to navigation Jump to search
(Using two rows instead of one row and a br, cleaning up, converting table from HTML to wikistyle, added some debugging tests)
(Refactoring using standart table layout, improving code readability, no visual nor functional change)
Line 1: Line 1:
{|
<!--
|-
 
| style="background-color:#EDEDED; border-style:solid; border-width:1px; margin:4px; padding:4px;" | [[:Category:Wiki Size|Wiki Size]]: {{#if: {{{pages|{{{wiki pages|{{{wiki_pages|}}}}}}}}}|[[:Category:{{SizeCat|<includeonly>{{{pages|{{{wiki pages|{{{wiki_pages}}}}}}}}}</includeonly><noinclude>0</noinclude>}}|<includeonly>{{{pages|{{{wiki pages|{{{wiki_pages}}}}}}}}}</includeonly><noinclude>0</noinclude> pages]]|[[:Category:<includeonly>{{{size|{{{wiki size|{{{wiki_size|UnknownSize}}}}}}}}}</includeonly><noinclude>0</noinclude>|<includeonly>{{{size|{{{wiki size|{{{wiki_size|UnknownSize}}}}}}}}}</includeonly><noinclude>0</noinclude>]]}}{{#if: {{{statistics URL|{{{wiki statistics URL|{{{wiki_statistics_URL|}}}}}}}}}|<sup> [{{{statistics URL|{{{wiki statistics URL|{{{wiki_statistics_URL}}}}}}}}} see stats...]</sup>}}
Categorizing logic
--><includeonly>{{#if: {{{pages|{{{wiki pages|{{{wiki_pages|}}}}}}}}}|
[[Category:{{SizeCat|{{{pages|{{{wiki pages|{{{wiki_pages}}}}}}}}}}}]]|[[Category:{{{size|{{{wiki size|{{{wiki_size|UnknownSize}}}}}}}}}]]
}}{{#if: {{{size|{{{wiki size|{{{wiki_size|}}}}}}}}}|
[[Category:Old style size cats]]
}}{{#if: {{{wikiFactor|{{{wiki factor|}}}}}}|
[[Category:{{WikiFactorCatText|{{{wikiFactor|{{{wiki factor}}}}}}}}]]
}}</includeonly><!--
 
Starting template code
-->
{| style="margin:0; padding:0; border:none;"
|- style="background-color:#EDEDED; border:1px solid black; margin:2px; display:block;"
| style="margin:0 0 4px 4px; padding:2px;" scope="row" | [[:Category:Wiki Size|Wiki Size]]:
| style="margin:0 4px 4px 0; padding:2px;" | {{#if: {{{pages|{{{wiki pages|{{{wiki_pages|}}}}}}}}}|[[:Category:{{SizeCat|<includeonly>{{{pages|{{{wiki pages|{{{wiki_pages}}}}}}}}}</includeonly><noinclude>0</noinclude>}}|<includeonly>{{{pages|{{{wiki pages|{{{wiki_pages}}}}}}}}}</includeonly><noinclude>0</noinclude> pages]]|[[:Category:<includeonly>{{{size|{{{wiki size|{{{wiki_size|UnknownSize}}}}}}}}}</includeonly><noinclude>0</noinclude>|<includeonly>{{{size|{{{wiki size|{{{wiki_size|UnknownSize}}}}}}}}}</includeonly><noinclude>0</noinclude>]]}}{{#if: {{{statistics URL|{{{wiki statistics URL|{{{wiki_statistics_URL|}}}}}}}}}|<sup> [{{{statistics URL|{{{wiki statistics URL|{{{wiki_statistics_URL}}}}}}}}} see stats...]</sup>}}
{{#if: {{{wikiFactor|{{{wiki factor<includeonly>|</includeonly>}}}}}}|
{{#if: {{{wikiFactor|{{{wiki factor<includeonly>|</includeonly>}}}}}}|
{{!}}-
{{!}}- style="background-color:#EDEDED; border:1px solid black; margin:2px; display:block;"
{{!}} style="background-color:#EDEDED; border-style:solid; border-width:1px; margin:4px; padding:4px;" {{!}} [[:Category:WikiFactor|wikiFactor]]: [[:Category:{{WikiFactorCatText|<includeonly>{{{wikiFactor|{{{wiki factor}}}}}}</includeonly><noinclude>0</noinclude>}}|<includeonly>{{{wikiFactor|{{{wiki factor}}}}}}</includeonly><noinclude>0</noinclude>]]{{#if: {{{wikiFactor URL|{{{wiki factor URL|}}}}}}|<sup> [{{{wikiFactor URL|{{{wiki factor URL}}}}}} more info...]</sup>}}
{{!}} style="margin:4px 0 0 4px; padding:2px;" scope="row" {{!}} [[:Category:WikiFactor|wikiFactor]]:
{{!}} style="margin:4px 4px 0 0; padding:2px;" {{!}} [[:Category:{{WikiFactorCatText|<includeonly>{{{wikiFactor|{{{wiki factor}}}}}}</includeonly><noinclude>0</noinclude>}}|<includeonly>{{{wikiFactor|{{{wiki factor}}}}}}</includeonly><noinclude>0</noinclude>]]{{#if: {{{wikiFactor URL|{{{wiki factor URL|}}}}}}|<sup> [{{{wikiFactor URL|{{{wiki factor URL}}}}}} more info...]</sup>}}
}}
}}
|}<includeonly>{{#if: {{{pages|{{{wiki pages|{{{wiki_pages|}}}}}}}}}|[[Category:{{SizeCat|{{{pages|{{{wiki pages|{{{wiki_pages}}}}}}}}}}}]]|[[Category:{{{size|{{{wiki size|{{{wiki_size|UnknownSize}}}}}}}}}]]}}{{#if: {{{size|{{{wiki size|{{{wiki_size|}}}}}}}}}|[[Category:old style size cats]]}}{{#if: {{{wikiFactor|{{{wiki factor|}}}}}}|[[Category:{{WikiFactorCatText|{{{wikiFactor|{{{wiki factor}}}}}}}}]]|}}</includeonly><noinclude>
|}<noinclude>
 
__NOTOC__
 
<div style="clear:both;"></div>


== Parameters ==
== Parameters ==

Revision as of 10:54, 14 November 2010

Wiki Size: 0
wikiFactor: 0


Parameters

pages
number of pages (no thousands separator)
alternative parameter names: "wiki pages", "wiki_pages"
this is a necessary parameter. It selects the appropriate size category.
statistics URL
external link to the wiki's statistics page
alternative parameter names: "wiki statistics URL", "wiki_statistics_URL"
this is an optional parameter
wikiFactor
plain value, see below for details
(obsolete name: wiki factor)
this is an optional parameter. It selects the appropriate wikiFactor category.
wikiFactor URL
external link to the wiki page that contains the data base the wikiFactor was calculated from
(obsolete name: wiki factor URL)
this is an optional parameter

boilerplate

When anyone goes to Community Portal and hits the "Create a New Wiki Page" button, the default boilerplate includes this:

{{Size
| pages = <!-- type number of pages here, if unknown leave void -->
| statistics URL = No
| wikiFactor = <!-- optional. plain wiki factor value -->
| wikiFactor URL = <!-- optional. external link to data base for wiki factor calc. -->
}}
(last checked against Community Portal's "Create a New Wiki Page" button --EarthFurst 17:46, 16 September 2009 (EDT))

How to get size information

Most wiki engines provide statistics somewhere including a page count. Here's how to find them for various wiki engines (although it can also depend on version)

  1. MediaWiki: Replace Special:Recentchanges with Special:Statistics. There is a number called "Content pages" or sometimes "pages that are probably legitimate content pages" -- use that number. Ignore the (often much larger) "all pages in the wiki, including redirects" number.
We can also add MediaWiki listings to the http://s23.org/wikistats/mediawikis_html.php system which tracks various wiki stats
  1. MoinMoin: Replace RecentChanges with SystemInfo or System_Info
  2. UseModWiki: Replace ?RecentChanges with ?action=index
  3. Pbwiki: Replace any page name with AllPages
  4. PhpWiki: an option: Search for letter "e" in all Titles Is there a better way?
  5. ProWiki: Replace ?RecentChanges with ?action=spx
  6. PmWiki: Search for / and scroll to the bottom (maybe searching for main/ would be better)
  7. Tikiwiki: Replace ending /tiki-lastchanges.php with /tiki-stats.php
  8. Twiki: Replace /WebChanges with /WebIndex
  9. Oddmuse: In RecentChanges click on 1 day and replace ?action=rc;days=1;all=0;showedit=0 with ?action=index
  10. Wikispaces: replace /changes ending the recent changes url with /pagelist

How to calculate the wikiFactor of a site

The wikiFactor is a measure of the 'popularity' of a wiki-site. It is based on the Hirsch h-index which is commonly used to measure the impact a scientist has had in the literature. The wikiFactor complements the number of pages and total number of visits information. More details can be found in the preprint "wikiFactor: a measure of the importance of a wiki site". The wikiFactor is simply the number of pages in the wiki (wF) that have had more than 1000 times wF visits.

Example

A wikiFactor of, say, 12 means that page number 12 in the ranking of pages visited has received 12,000 or more visits, whereas page 13 has not yet reached 13,000 visits. Here is a worked example (here for WikiIndex):

Position (p)
most visited first
Page name (views) Relation
views [<=>] 1000*p
1. Welcome (572,833 views) 572,833 >  1,000
2. Bulbapedia (42,344 views) 42,344 >  2,000
3. Community Portal (28,489 views) 28,489 >  3,000
.
.
.
.
.
.
.
.
.
11. Wiki.ThePPN (14,724 views) 14,724 > 11,000
12. Books (12,807 views) 12,807 > 12,000
13. TourBusStop (12,371 views) 12,371 < 13,000

If one counts the entries with views > 1000*p (highlighted in light green) one arrives at a wikiFactor of 12 for WikiIndex.

Where to look

Most wiki engines provide global statistics. Here's how to find them for various wiki engines (although it can also depend on version)

  1. MediaWiki: go to the Special:PopularPages page of the wiki
  2. MoinMoin:
  3. UseModWiki:
  4. Pbwiki:
  5. PhpWiki:
  6. ProWiki:
  7. PmWiki:
  8. Tikiwiki:
  9. Twiki:
  10. Oddmuse:
  11. Wikispaces: go to Manage Wiki on the lef-hand-side of the page, then click on the Tools: Wiki Statistics icon. Shift from the overview tab to the pages tab, then click on Views.
  12. Wikia: go to Special:Mostvisitedpages
  13. wikimedia: Special:PopularPages seems to be unavailable. The "Top" sites option at stats.grok.se can be used for Wikipedias, but needs to be summed on a per-month basis.
Google Analytics

If your site uses Google Analytics, you can go to "Content/Top Content" and select the entire date range to get a count of pageviews for each page. If you started using Analytics partway through, and stopped collecting your wiki engine's standard statistics at the same time, you may be able to merge the two numbers.