Difference between revisions of "Template:Infobox/video"

From CWCki
Jump to navigation Jump to search
(Added var for supplying the ytube id directly instead of through EmbedVideo ext as 2nd option. If youtube id element is known at template compile time, we can do cool things, added a demonstration feature. Ideas for other features to add with welcome.)
 
(3 intermediate revisions by 2 users not shown)
Line 4: Line 4:


There are two ways to include the video in the infobox, one is by using the video variable and directly inputting the [https://www.mediawiki.org/wiki/Extension:EmbedVideo EmbedVideo] element like in the first example.  
There are two ways to include the video in the infobox, one is by using the video variable and directly inputting the [https://www.mediawiki.org/wiki/Extension:EmbedVideo EmbedVideo] element like in the first example.  
The other way is to directly supply the Youtube video ID in question (e.g: AaxuXRbdn4A). This obviously only works for Youtube videos and no other platform (although a custom video id variable can be added for any platform that EmbedVideo supports).
The other way is to directly supply the YouTube video ID in question (e.g: AaxuXRbdn4A). This obviously only works for YouTube videos and no other platform (although a custom video id variable can be added for any platform that EmbedVideo supports).
</noinclude>
</noinclude>
<includeonly>{| style="border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin: .5em auto .5em auto; padding: 0.2em; font-size:89%; width:260px;-moz-border-radius:10px"
<includeonly>{| style="border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin: .5em auto .5em auto; padding: 0.2em; font-size:89%; width:260px;-moz-border-radius:10px"
Line 17: Line 17:
{{#if:{{{ytid|}}}|
{{#if:{{{ytid|}}}|
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''Direct link'''
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''Direct link'''
{{pipe}} [https://youtube.com/watch?v={{{ytid}}} Youtube], [https://ghostarchive.org/search?term=https://www.youtube.com/watch?v={{{ytid}}} archive] }}
{{pipe}} [https://youtube.com/watch?v={{{ytid}}} YouTube], [https://ghostarchive.org/varchive/{{{ytid}}} archive] }}
|- valign="top"
{{#if:{{{video|}}}|
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''Search for video'''
{{pipe}} [https://www.youtube.com/results?search_query={{urlencode:{{{name}}}}} YouTube], [https://ghostarchive.org/vidsearch?q={{urlencode:{{{name}}} }} archive]  
}}
|- valign="top"
|- valign="top"
{{#if:{{{Stardate|}}}|
{{#if:{{{Stardate|}}}|
Line 52: Line 57:
|- valign="top"
|- valign="top"
{{#if:{{{Shirt|}}}|
{{#if:{{{Shirt|}}}|
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''[[Chris_and_fashion|Shirt]]'''
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''Shirt'''
{{pipe}} {{{Shirt|Game}}} }}
{{pipe}} {{{Shirt|Game}}} }}
|- valign="top"
|- valign="top"
{{#if:{{{shirt|}}}|
{{#if:{{{shirt|}}}|
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''[[Chris_and_fashion|Shirt]]'''
{{pipe}} style="white-space: nowrap;-moz-border-radius:5px;color:#ffffff;" bgcolor="#696969" align="center" {{pipe}} '''Shirt'''
{{pipe}} {{{shirt|Game}}} }}
{{pipe}} {{{shirt|Game}}} }}
|- valign="top"
|- valign="top"
Line 95: Line 100:
}}</pre>
}}</pre>


If you decide to use the Youtube ID element instead (ytid), the following below is a good example:
If you decide to use the YouTube ID element instead (ytid), the following below is a good example:
<pre>
<pre>
{{Infobox/video
{{Infobox/video

Latest revision as of 20:39, 24 July 2024

NOTE: This Infobox is for use ONLY with TRUE and HONEST CWC Videos, Listed in the video section.

For infoboxes, meant for other videos go here.

There are two ways to include the video in the infobox, one is by using the video variable and directly inputting the EmbedVideo element like in the first example. The other way is to directly supply the YouTube video ID in question (e.g: AaxuXRbdn4A). This obviously only works for YouTube videos and no other platform (although a custom video id variable can be added for any platform that EmbedVideo supports).


Usage

These usage notes will not be included in articles bearing this template.

This template is for use on articles relating to Chris videos. It displays the video and lists key information about the video below. The format for using this template is as follows:

{{Infobox/video
| name           = Chris Comes Out
| video          = {{#ev:youtube|AaxuXRbdn4A}}
| stardate       = 5 September 2008
| subject        = {{Homos|text}}, {{Sex|text}}
| style          = {{Rage|text}}
| saga           = {{ED|text}}
| shirt          = {{OrangeShirt|text}}
| other          = {{Live|text}}
| previous       = [[Link to previous video]]
| next           = [[Link to next video]]
}}

If you decide to use the YouTube ID element instead (ytid), the following below is a good example:

{{Infobox/video
| name           = Chris Comes Out
| ytid           = AaxuXRbdn4A
| stardate       = 5 September 2008
| subject        = {{Homos|text}}, {{Sex|text}}
| style          = {{Rage|text}}
| saga           = {{ED|text}}
| shirt          = {{OrangeShirt|text}}
| other          = {{Live|text}}
| previous       = [[Link to previous video]]
| next           = [[Link to next video]]
}}

The full range of icons can be found here and here.

Example

Chris Comes Out
Search for video YouTube, archive
Stardate 5 September 2008
Subject Matter HomosHomos Homos, SexSex Sex
Performance Style RageRage Rage
Saga EDED ED
Shirt OrangeOrange Orange
Other LiveLive Live
OFFICIAL and HONEST CWC Videos
previous
Link to previous video
next
Link to next video


Example with ytid instead of direct video link

Chris Comes Out
Direct link YouTube, archive
Stardate 5 September 2008
Subject Matter HomosHomos Homos, SexSex Sex
Performance Style RageRage Rage
Saga EDED ED
Shirt OrangeOrange Orange
Other LiveLive Live
OFFICIAL and HONEST CWC Videos
previous
Link to previous video
next
Link to next video