Camen Design Forum

Delete

(Leave this as-is, it’s a trap!)

To delete this post you must be either the original author or a designated moderator.
The content of the post will be removed but the name and date will remain.

  • The post will be removed completely from the thread, rather than blanked
  • Only posts on the last page of the thread can be removed completely (so as to not break permalinks)

RE[1]: Video Embedding

Martijn

You will need 2 things to add support for a service:

1. The HTML that you will need to put in place of the URL. Examples of this can be seen on the lines starting with `$replace`.
2. A regular expression that parses the URL of the service and can extract whatever data (like a video ID) you need in the HTML.

You can extend the current regular expression with as many URLs as you would like it to match. So adding liveleak and vimeo doesn’t have to be a problem. But you’ll need to know a little about regular expressions.

After extending it you can add another `if` block with another `$replace` value. That’s it. I am happy to answer some more specific questions, of course!

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn