Template:VideoGallery/sandbox/doc: Difference between revisions

m
no edit summary
mNo edit summary
mNo edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
__NOTOC__
What am I trying to accomplish in this [[template:VideoGallery]]'s sandbox?
<pre>
<pre>
{{VideoGallery|{{#vardefineecho:videogallery|
{{VideoGallery|{{#vardefineecho:videogallery|
https://www.youtube.com/watch?v=wjzv0KtDXOA Xenoblade JP 1 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=wjzv0KtDXOA Xenoblade JP 1 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=tJtCp8rPXWg Xenoblade PAL 1 [Dolphin Emulator @ 1080p]
https://www.youtube.com/watch?v=tJtCp8rPXWg Xenoblade PAL 1 [Dolphin Emulator @ 1080p]
http://www.dailymotion.com/video/x1k9hnl Cocoto Platform Jumper HD on Dolphin Emulator (Widescreen Hack) part1
https://www.dailymotion.com/video/x1k9hnl Cocoto Platform Jumper HD on Dolphin Emulator (Widescreen Hack) part1
https://www.youtube.com/watch?v=_VLNa9PKT0Y Xenoblade PAL 2 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=_VLNa9PKT0Y Xenoblade PAL 2 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=dp3QnvFn_Hc Xenoblade PAL 3 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=dp3QnvFn_Hc Xenoblade PAL 3 (Dolphin Emulator @ 720p)
Line 11: Line 9:
</pre>
</pre>


... to produce the familiar layout the VideoGallery has been doing. Compare below and [[#Legacy compatibility]]! Note the different random videos, the random logic in parameterless version are different and it may be an improvement.
Compare below and [[#Legacy compatibility]]! True randomization is our key feature. Requires JavaScript which I have provided a working sample in the talk page. Without JavaScript this will just display as hyperlinked list in reverse order. Another benefit is reducing editing required. Just copy/paste the video link and write caption!


{{VideoGallery/sandbox|{{#vardefineecho:videogallery|
{{VideoGallery/sandbox|{{#vardefineecho:videogallery|
https://www.youtube.com/watch?v=wjzv0KtDXOA Xenoblade JP 1 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=wjzv0KtDXOA Xenoblade JP 1 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=tJtCp8rPXWg Xenoblade PAL 1 [Dolphin Emulator @ 1080p]
https://www.youtube.com/watch?v=tJtCp8rPXWg Xenoblade PAL 1 [Dolphin Emulator @ 1080p]
http://www.dailymotion.com/video/x1k9hnl Cocoto Platform Jumper HD on Dolphin Emulator (Widescreen Hack) part1
https://www.dailymotion.com/video/x1k9hnl Cocoto Platform Jumper HD on Dolphin Emulator (Widescreen Hack) part1
https://www.youtube.com/watch?v=_VLNa9PKT0Y Xenoblade PAL 2 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=_VLNa9PKT0Y Xenoblade PAL 2 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=dp3QnvFn_Hc Xenoblade PAL 3 (Dolphin Emulator @ 720p)
https://www.youtube.com/watch?v=dp3QnvFn_Hc Xenoblade PAL 3 (Dolphin Emulator @ 720p)
Line 22: Line 20:


== Legacy compatibility ==
== Legacy compatibility ==
Videos like below still use the old template parameters, they will work fine. Non-YouTube videos are manually assigned with srv parameter to the correct service (apparently only DailyMotion) which is unlike in parameterless version.
Videos like below still use the old template parameters, they will work fine.


<pre>{{VideoGallery/sandbox
<pre>{{VideoGallery/sandbox
Line 39: Line 37:
}}
}}


== Pros ==
== Other rationale ==
* Parameterless to prevent typo or tampering.
* Requires <code><nowiki>{{#vardefineecho:videogallery|}}</nowiki></code> to avoid issues with equal sign ("=") in template. If {{tl|Problems}} is doing it then why not this?
* Reduce editing. Just copy/paste the video url and write caption!
* Parameterless to prevent parameter typo or tampering. This has happened before. Can't remember where is our old discussion at, there was a delusional anonymous tampering the parameter number in attempt of having his video first on the list - in assumption of only the first three videos will embed on the page. This won't be the case when parameters weren't there. They can paste their url anywhere in the list, doesn't matter. Also with JS they wouldn't be thinking about the edit save grinding.
 
* Quality categories added: checks if the video url is accepted for embedding and checks for the missing caption.
== Cons/Issues ==
* Requires <code><nowiki>{{#vardefineecho:videogallery|}}</nowiki></code> to avoid issues with equal sign ("=") in template. Fun fact, most video urls have equal sign!
* Listed ascending
* Video without caption will have erratic caption:
{{VideoGallery/sandbox|{{#vardefineecho:videogallery|
https://www.youtube.com/watch?v=sam9lDWDvXE
}}}}
 
* Using unmatched (or perhaps any) double open square brackets breaks this template:
{{VideoGallery/sandbox|{{#vardefineecho:videogallery|
https://www.youtube.com/watch?v=sam9lDWDvXE Xenoblade JP HD Gameplay 1A [[Dolphin Emulator @ 720p)
}}}}
6,576

edits