Template:Video: Difference between revisions

From OER in Education
No edit summary
No edit summary
 
(27 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{#ifeq: {{{semantics|}}}|yes|{{VideoPageGroupMenu|Video/{{{series|Talks}}}|{{{episode|}}} }} }}<div style="border-left: solid 1px green;  border-bottom: solid 1px green; padding: 10px; margin-left: 50px; overflow: auto;"><span class="printonly">
{{#ifeq: {{{semantics|}}}|yes|{{VideoPageGroupMenu|Video/{{{series|Talks}}}|{{{episode|}}} }} }}<!--maindiv--><div style="border: solid 1px green;  border-bottom: solid 1px green; padding: 10px; margin-left: 20px; overflow: auto; border-radius: 5px;"><span class="divStart"/><!--
 
Information for print:
 
--><span class="printonly print-display-inline offline-display-inline">
{{#ifeq: {{{type|youtube}}}|youtube|'''VIDEO'''}}{{#ifeq: {{{type|youtube}}}|mp3|'''AUDIO'''}}
{{#ifeq: {{{type|youtube}}}|youtube|'''VIDEO'''}}{{#ifeq: {{{type|youtube}}}|mp3|'''AUDIO'''}}
</span><div  class="noprint">
</span><!-- (end information for print)
 
*** display youtube video ***
 
--><div  class="noprint">
{{#ifeq: {{{type|youtube}}}|youtube|{{#widget:YouTube|id={{{src|-dITjCrgqYY}}} }} }}
{{#ifeq: {{{type|youtube}}}|youtube|{{#widget:YouTube|id={{{src|-dITjCrgqYY}}} }} }}
{{#ifeq: {{{type|youtube}}}|mp3|{{#widget:Html5media
{{#ifeq: {{{type|youtube}}}|mp3| {{filepath:{{{src|AskAIDS 7 preparing to consult.mp3}}} }}
<!-- {{#widget:Html5media
|url={{filepath:{{{src|AskAIDS 7 preparing to consult.mp3}}} }}
|url={{filepath:{{{src|AskAIDS 7 preparing to consult.mp3}}} }}
|width=640
|width=640
|height=30
|height=30
}}}}
}}-->
</div>{{#vardefine:therealtitle|{{{realtitle| {{#ifeq:{{FULLPAGENAME}}| Template:Video | The title of the video |
}}  
{{#ifeq:{{{title|}}}||{{{name|}}}|{{#sub:{{{title}}}|0|30}} }}
</div><!-- (end display youtube video)
 
*** Video title ***
 
-->{{#vardefine:therealtitle|{{{realtitle| {{#ifeq:{{FULLPAGENAME}}| Template:Video | The title of the video |
{{#ifeq:{{{title|}}}||{{{name|}}}|{{{title}}}}}
}} }}} }}
}} }}} }}
'''{{#var:therealtitle}}'''
'''{{#var:therealtitle}}'''
Line 15: Line 29:
{{{title|The description of the video}}}
{{{title|The description of the video}}}


{{#ifeq: {{{type|youtube}}}|youtube|
<!--
[[{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}|About this video]], <!--[[Video/{{{name|Some name}}}|{{{name|The file name or wiki page name for video}}}]], -->{{{duration|12:34}}},
 
[http://www.youtube.com/watch?v={{{src|-dITjCrgqYY}}}&list={{Video/get_playlist|
Information for print / offline
{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}  
 
}} link to YouTube]  
-->{{#ifeq: {{{type|youtube}}}|youtube|
({{#widget:VideoMgr
<span class="printonly print-display-block offline-display-block">[[{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}]],
{{fullurl:{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}}},</span><!--
-->{{#ifeq:{{{series|}}}|||<span class="printonly print-display-block offline-display-block">This video is available on your memory stick in the '''video/[[Video/{{{series|Other}}}|{{{series|Other}}}]]''' folder.</span>}}<!--
 
Information for online:
 
--><span class="noprint">[[{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}|About this video]].</span>
<!--[[Video/{{{name|Some name}}}|{{{name|The file name or wiki page name for video}}}]], --><!--
 
Duration:
 
--><span class="">Duration:</span> {{{duration|12:34}}} <!--
 
  youtube / local play
 
--><span class="noprint">([http://www.youtube.com/watch?v={{{src|-dITjCrgqYY}}}&list={{Video/get_playlist|{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}  
}} watch on YouTube],
{{#widget:VideoMgr
|youtube={{{src|-dITjCrgqYY}}}
|youtube={{{src|-dITjCrgqYY}}}
|file={{urlencode:{{{name|Introduction to Chalimbana Basic School.m4v}}}}}  
|file={{urlencode:{{{name|Introduction to Chalimbana Basic School.m4v}}}}}  
|back={{urlencode:{{fullurl:{{FULLPAGENAME}}}}}}
|back={{urlencode:{{fullurl:{{FULLPAGENAME}}}}}}
}}) {{{acknowledgement|}}} {{#vardefine:downloadlist|{{#var:downloadlist}}
}})</span> <!--
 
-->{{{acknowledgement|}}} <!--
 
Add asset to download list
 
-->{{#vardefine:downloadlist|{{#var:downloadlist}}
* [[{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}]] ({{#widget:VideoMgr
* [[{{Video/get page from name| {{{name|Introduction to Chalimbana Basic School.m4v}}} }}]] ({{#widget:VideoMgr
|youtube={{{src|-dITjCrgqYY}}}
|youtube={{{src|-dITjCrgqYY}}}
Line 30: Line 67:
|back={{urlencode:{{fullurl:{{FULLPAGENAME}}}}}}
|back={{urlencode:{{fullurl:{{FULLPAGENAME}}}}}}
|label=download options for this video
|label=download options for this video
}}) }}
}}) }}<!--
}}{{#ifeq: {{{type|}}}|mp3|
 
end download list
 
-->}}<!--
 
*** Display mp3 ***
 
-->{{#ifeq: {{{type|}}}|mp3|
[[Video/{{{name|Some name}}}|{{{name|Some name}}}]], {{{duration|1:23}}},  
[[Video/{{{name|Some name}}}|{{{name|Some name}}}]], {{{duration|1:23}}},  
}}{{#ifeq:{{{series|}}}||[[series::No series| ]][[Category:No series]][[no series for::Video/{{{name|no series for this video}}}| ]]|(Series: [[Video/{{{series|Other}}}|{{{series|Other}}}]])}}{{#ifeq: {{{transcript|}}}|yes|(Transcript available [[Video/{{{name|Some name}}}/transcript|here]] or via YouTube captions.)}}
}}<!--
</div>{{#ifeq: {{{semantics|}}}|yes|[[assettype::{{{type|youtube}}}| ]][[src::{{{src|}}}| ]][[name::{{{name|}}}| ]][[title::{{{title|}}}| ]][[duration::{{{duration|}}}| ]][[series::{{{series|Other}}}| ]][[episode::{{{episode|N/A}}}| ]][[project::{{{project|}}}| ]]
 
*** Asset information for series ***
 
-->{{#ifeq:{{{series|}}}||[[series::No series| ]][[Category:No series]][[no series for::Video/{{{name|no series for this video}}}| ]]| (Series: [[Video/{{{series|Other}}}|{{{series|Other}}}]], episode {{{episode|N/A}}})}}<!--
 
*** Transcript ***
 
-->{{#ifeq: {{{transcript|}}}|yes|(Transcript available [[Video/{{{name|Some name}}}/transcript|here]] or via YouTube captions.)}}
<span class="divEnd"/></div><!--/maindiv--><!--
 
*** Video home page information ***
semantics=yes means that we're on the video "home page", and that it's not a transclusion
 
-->{{#ifeq: {{{semantics|}}}|yes|[[assettype::{{{type|youtube}}}| ]][[src::{{{src|}}}| ]][[name::{{{name|}}}| ]][[title::{{{title|}}}| ]][[duration::{{{duration|}}}| ]][[series::{{{series|Other}}}| ]][[episode::{{{episode|N/A}}}| ]][[project::{{{project|}}}| ]]
[[realtitle::{{#var:therealtitle}}| ]][[videopage::{{FULLPAGENAME}}| ]]
[[realtitle::{{#var:therealtitle}}| ]][[videopage::{{FULLPAGENAME}}| ]]
=Embed code =
=Embed code =
Line 64: Line 121:
</div>|There is no transcript available. You can add one [[{{FULLPAGENAME}}/transcript|here]].}}
</div>|There is no transcript available. You can add one [[{{FULLPAGENAME}}/transcript|here]].}}


}}
}}<!--
<includeonly>[[Uses video::Videos/{{{name}}}| ]]</includeonly><!--
end of semantics = yes
--><includeonly>[[Uses video::Videos/{{{name}}}| ]]</includeonly><!--


Video template ends.
Video template ends.

Latest revision as of 22:15, 23 January 2018

Guidance for using this template

Create a sub page of Video (e.g. Video/My video.mp4 and put this text onto it:

{{video
|src= youtube id (ideally should not be changed once it's in use)
|name= local file name (should not be changed once it's in use, and in most cases be the same as the video (sub-)page name)
|realtitle=(short)title to be displayed
|title=description (this field was the title, but it's now just the description
|duration=duration of video mm:ss
|series=series (optional, check existing series to find an appropriate one)
|episode=01, 02, ... (optional)
|acknowledgement= ... (possibly use template) ...
|youtubeaccount=oer4schools (or whatever the youtube account name)
<noinclude>|semantics=yes|no</noinclude>
}}

You can then place the video onto the wiki by using:

{{: Video/My video.mp4 }}

Other notes

The template also populates {{#var:downloadlist}} (similar to Template:File), which you can then use to show a summary of all videos needed for a particular wiki page, e.g.

Also see

Category:Video Templates for other video-related templates.

To do

  • Should add check: If Video != Video then if Video != {{{name}}} then warning!
  • Also check whether Video/name/text exits, and include it if it does .... should have a switch really, {{: Video/{{{name}}} | style=1 }} or similar. Need to include a style switch above.