Template:Ytv-s
| Views | Likes | Dislikes | Comments | L% | D% | L/V % | D/V % | L/D | C/V % | Stats updated |
|---|---|---|---|---|---|---|---|---|---|---|
Documentation
This template formats the information contained in Template:Ytv-stats for use in tables formed using {{ytv-stats-table-row}} (and {{ytv-stats-table-top}}). It is not intended to be called directly, since it is already called from within {{ytv-stats}} itself. Similar templates can be created to format the information in other ways; see the documentation for {{ytv-stats}} for details.
Usage
{{ytv-s|ID|V=|L=|D=|C=|NC=|U=}}
Here ID is the YouTube ID number of a video and the values of V, L, D, and C are the number of views, likes, dislikes, and comments, respectively, that the video has garnered, as of the date specified by U (i.e., the date on which the videos statistics were last updated in Template:Ytv-stats). The special parameter NC can be used to indicate that comments have been turned off for a video.
As previously mentioned, you should never be calling this template directly in articles. It is invoked by calling {{ytv-stats}} instead. But you shouldn't be calling that template in articles, either. Instead, you should call a "third-layer" template, like {{ytv-stats-table-row}}.
(If this seems unnecessarily complicated, blame certain limitations of MediaWiki's template system. It is necessary to do it this way so that one template can serve as a kind of "database" that can be "queried" by multiple other templates. This would all be much easier using Lua modules, but we don't have those on this wiki.)
To understand the structure of this "suite" of templates, think of it this way: {{ytv-stats}} serves as both a "database" of information (the actual template page itself) and a way of "querying" that database for the information held within (using {{ytv-stats}} template calls). Templates like {{ytv-s}} specify the "format" in which the information is displayed. Finally, templates like {{ytv-stats-table-row}} provide a very "high-level" way of requesting the information (i.e., "give me information about this, and spare me the details of how you're doing it"). As an editor, if you want to correct existing information or add missing information, you should edit Template:Ytv-stats. If you want to make minor changes to how the information is presented, you should edit Template:Ytv-s (or maybe Template:Ytv-stats-table-row). But if you want to make major changes to how the information is presented, you should create totally new templates, as explained in the documentation for {{ytv-stats}}.
Examples
There are no examples, since this template is only called inside of {{ytv-stats}} itself; and that shouldn't need to be changed, even when new templates are created to use the information in different ways. See the documentation for Template:Ytv-stats for details.