Custom vimeo plugin

Hampus No's Avatar

Hampus No

21 Mar, 2014 03:12 PM

Hi,

I'm first time user of The Secretary looking for some helpt with my video portfolio which I will base of my vimeo videos and I will show them using a lightbox plugin I have already implemented. Now each time I want to but a video on a page I have to go get the embeddcode from vimeo add it and then change it. I'm therefore looking to write a small piece of code like this VimeoEmbedder only using the VideoID.

This is my code today.
<a href="//player.vimeo.com/video/VideoID?title=0&byline=0&portrait=0&color=ffffff" width="720" height="405" frameborder="0" class="lightbox" webkitallowfullscreen mozallowfullscreen allowfullscreen>Example</a>

Everytime I have to change it from <iframe> to <a> and add the class="lightbox" and write the title at the end.

What I do like to do is to add section to the projects>manage page that will only contain the two fields Vimeo VideoID and Title to add this to the above code like this:

<a href="//player.vimeo.com/video/(Vimeo VideoID)?title=0&byline=0&portrait=0&color=ffffff" width="720" height="405" frameborder="0" class="lightbox" webkitallowfullscreen mozallowfullscreen allowfullscreen>(Title)</a>

My guess is it would be something like this:

<form action="index.php" method="post"> Name: <input type="text" name="Title"><br> E-mail: <input type="text" name="VimeoID"><br> <input type="submit"> </form>

<a href="//player.vimeo.com/video/<?php echo $_POST["VimeoID"]; ?>?title=0&byline=0&portrait=0&color=ffffff" width="720" height="405" frameborder="0" class="lightbox" webkitallowfullscreen mozallowfullscreen allowfullscreen><?php echo $_POST["Title"]; ?></a>

Is this correct? and if so where do I put it? and where do I post it? Thanks for your help and time!

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac