Jump to content


Photo
Template

Videos / Related Videos

template

  • Please log in to reply
28 replies to this topic

#1 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 15 August 2014 - 09:13 AM

Video template

 

and

 

RelatedVideos template



#2 z929669

z929669

    Ixian Inventor

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,062 posts

Posted 18 August 2014 - 12:24 PM

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.



#3 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 18 August 2014 - 02:08 PM

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.



#4 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 18 August 2014 - 02:58 PM

I see you're working on https://wiki.step-pr...latedVideosTest

Only 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-pr...Installing_Mods



#5 z929669

z929669

    Ixian Inventor

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,062 posts

Posted 18 August 2014 - 04:40 PM

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 &lt; or &gt;). 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}}


#6 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 18 August 2014 - 04:54 PM

I got a working template here using the

{{#tag:tagname|content|attribute1=value1|attribute2=value2}}

"magic words"

 

https://wiki.step-pr...estpack/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!).



#7 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 18 August 2014 - 05:07 PM

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



#8 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 18 August 2014 - 05:27 PM

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.



#9 z929669

z929669

    Ixian Inventor

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,062 posts

Posted 19 August 2014 - 10:57 AM

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!



#10 EssArrBee

EssArrBee

    Incompatibilism Manager

  • VIP-Supporter
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,461 posts

Posted 19 August 2014 - 02:39 PM

Where exactly is parameter 3 going to show?

Also, is there a built in page break after the videotemplate?


  • 0

#11 z929669

z929669

    Ixian Inventor

  • Administrator
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,062 posts

Posted 19 August 2014 - 03:44 PM

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}}<br>{{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 <br> could be added to the template, but that would require changes to RelatedVideo template.

#12 EssArrBee

EssArrBee

    Incompatibilism Manager

  • VIP-Supporter
  • PipPipPipPipPipPipPipPipPipPipPipPipPipPipPip
  • 7,461 posts

Posted 19 August 2014 - 04:22 PM

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.


  • 0

#13 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 19 August 2014 - 04:34 PM

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 <noinclude> right after the </includeonly> to not get a <p> 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.



#14 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 19 August 2014 - 06:57 PM

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!



#15 DoubleYou

DoubleYou

    Wiki Stepper

  • Uber Moderator
  • PipPipPipPipPipPipPipPipPipPipPip
  • 4,844 posts

Posted 22 August 2014 - 11:51 PM

Updated Video template

  • Made having a title optional
  • Added Embedded Video option
  • Added custom width of embedded video option
  • Added custom alignment of embedded video option

Fully backwards-compatible with old template code.





Also tagged with one or more of these keywords: template, Template

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users