DoubleYou Posted August 15, 2014 Share Posted August 15, 2014 Discussion topic: Template:Video Template:RelatedVideos Link to comment Share on other sites More sharing options...
z929669 Posted August 18, 2014 Share Posted August 18, 2014 Could you show an example of how/where this might be used on the wiki and place this info on the template page? Just trying to envision when/why/how to employ ... also, you should probably move it to "RelatedVideos" and edit accordingly. Link to comment Share on other sites More sharing options...
DoubleYou Posted August 18, 2014 Author Share Posted August 18, 2014 I've been using it extensively on the Mod Organizer guide to integrate videos throughout. I need to figure out how to make it parse so that I don't have to put the whole<hsyoutube title="Mod Organizer: Introduction (by Gopher)" caption="" autoplay>http://www.youtube.com/watch?v=j4ZQpzf_iAE</hsyoutube>code in every time, as that is annoying. Probably should move it to RelatedVideos, or perhaps RelVids for short. Link to comment Share on other sites More sharing options...
DoubleYou Posted August 18, 2014 Author Share Posted August 18, 2014 I see you're working on https://wiki.step-project.com/Template:RelatedVideosTestOnly thing I see that you might not be figuring on is, I want to use it for potentially more than one video, which is why it is "Related Videos." For instance, see my current usage here: https://wiki.step-project.com/Guide:Mod_Organizer#tab=Installing_Mods Link to comment Share on other sites More sharing options...
z929669 Posted August 18, 2014 Share Posted August 18, 2014 Unfortunately, I cannot find a way to incorporate symbols into the template without either screwing up the template calls or rendering the embedded YT HTML tags useless (e.g., using < or >). I even tried creating templates for the symbols, but same problems. If there is a way to do this, I have not found it other than possibly using a beta extension that s4n will not want us to use, due to security risk. You might also want to play with the embedvideo plugin:{{#ev:youtube|NnvZok9J3Qw|200|left|caption}} Link to comment Share on other sites More sharing options...
DoubleYou Posted August 18, 2014 Author Share Posted August 18, 2014 I got a working template here using the{{#tag:tagname|content|attribute1=value1|attribute2=value2}}"magic words" https://wiki.step-project.com/User:DoubleYou/testpack/RelVids Only thing is, I'm stuck on being able to allow it to show multiple videos. I think I can manage it by separating it into two separate templates, one to display the video, and one two do the whole "Related Videos:" thing. I thought about using the embedvideo plugin, but not sure as of now. Maybe I'll expand it so the basic Video template has that option (far easier than remembering all those parameters!). Link to comment Share on other sites More sharing options...
DoubleYou Posted August 18, 2014 Author Share Posted August 18, 2014 Well, it was working a moment ago, but I'm guessing you're messing around with something... Edit: Ah! NVM. It was I who was messing around... Edit2: OK. I got a working solution. Will create/replace/delete templates Link to comment Share on other sites More sharing options...
DoubleYou Posted August 18, 2014 Author Share Posted August 18, 2014 Working Video template and RelatedVideos template are up. Edited OP. I want to add the embedded video plugin as an option for the Video template next. Link to comment Share on other sites More sharing options...
z929669 Posted August 19, 2014 Share Posted August 19, 2014 Wow, I became very confused in looking at your User: template page before reading on but then saw that you did employ the #tag parser function in a way that made sense. Nice work! I knew there must be a way, but I did not explore all of the magic words links that kept beckoning me in my searches for a solution :P ... glad you hunted down the method. Isn't 'programming' in wiki fun? Now, off with you to the SMW tutorials! Link to comment Share on other sites More sharing options...
EssArrBee Posted August 19, 2014 Share Posted August 19, 2014 Where exactly is parameter 3 going to show?Also, is there a built in page break after the videotemplate? Link to comment Share on other sites More sharing options...
z929669 Posted August 19, 2014 Share Posted August 19, 2014 Param 3 is the caption and would show in the lower left of the frame depicting the video. There is no brake built into the video template, but the RelatedVideo template uses bullets, which act as breaks between the Video template calls. You can do: {{Video|j4ZQpzf_iAE|This is the title|This is the caption}}{{Video|j4ZQpzf_iAE|This is the title|This is the caption}}or: * {{Video|j4ZQpzf_iAE|This is the title|This is the caption}}* {{Video|j4ZQpzf_iAE|This is the title|This is the caption}}or a break could easily be added ... or use: {{clear}}... or a could be added to the template, but that would require changes to RelatedVideo template. Link to comment Share on other sites More sharing options...
EssArrBee Posted August 19, 2014 Share Posted August 19, 2014 I'm getting a page break automatically and I don't want one. I think that is just the nature or the template in general. Link to comment Share on other sites More sharing options...
DoubleYou Posted August 19, 2014 Author Share Posted August 19, 2014 Which template is giving you a page break?Edit: Ok, I see what you're getting. I'll look into that. Edit2: Ok, I fixed it. Seems that you need to have right after the to not get a paragraph added to the template, which is strange, but whatever. BTW, I also fixed it so that if you don't have a caption, it doesn't display {{{3}}} as the caption. Link to comment Share on other sites More sharing options...
DoubleYou Posted August 19, 2014 Author Share Posted August 19, 2014 Boy has this template been useful! I've used it 21 times in the Mod Organizer Guide, and now I don't have to look up the highslide code every time! Link to comment Share on other sites More sharing options...
DoubleYou Posted August 23, 2014 Author Share Posted August 23, 2014 Updated Video templateMade having a title optionalAdded Embedded Video optionAdded custom width of embedded video optionAdded custom alignment of embedded video optionFully backwards-compatible with old template code. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now