Extension:EmbedAnything

What is it?
This extension is designed as a simple way of bringing rich media to any webpage, by allowing Embeds of other webpages and content with custom templates. It uses a mixture of "Embed", "Readability", "stash" and "HtmlFilter" libraries.

Installation
Download from HERE. Rename the folder to "EmbedAnything" if you need to, and place it in your Extensions directory.

.../Extensions/EmbedAnything

In your LocalSettings.php add the line:

Begin embedding!

Usage
Alright so lets get embedding...

There are three ways to embed your link. Replacing "URL" with your link, below:

It is important to note, if you wish to use embeds with other functions. You must use the third option.
 * URL
 * 

Templates
Embed Anything comes with a simple template system for your embeds to match your sites design perfectly.

To use a template within your tag, pass the "template" or "style" attribute, with the template name. ie 

If you are interested in creating your own template (you should be, it's easy!), templates are placed in the following folder:

.../Extensions/EmbedAnything/includes/template

Templates need to be php files, and need to output their content. Take a peek at what is already there to get an idea of how it works.

Templates receive two important php variables: $data and $options.
 * $options - Provides attributes sent from the user through the tag. This is so templates can have customization from within the tag. For example a width tag.
 * $data - Provides the actual data for the embed, and for placing into your template. See below for the data transferred.

Embed Data
Within your template, you will receive an array variable $data. Within it you will find the following information:

Further Customization
There are also a few variables that can be changed to preference. Hiding in a couple files.

In the file data.php

.../Extensions/EmbedAnything/includes/data.php

In the file formHtml.php

.../Extensions/EmbedAnything/includes/formHtml.php

Data Caching
Embed Anything caches information pulled from websites. By default the cache lasts a week, and the entire cache gets flushed out every ten weeks. To change this, adjust the cache expiry time above. Generally though, websites that get embedded are unlikely to change their information, and so should be left to cache cleanly. It should also be noted that Mediawiki caches the html output by Embed Anything's template anyway. The reason for the secondary cache is in speeding up page edits, dynamic __NOCACHE__ pages and any time the same url is embedded elsewhere in the site. It also plays nicely with semantic mediawikis and  functionality. So you can easily and cheaply create huge pages of videos and images by listing links from semantic pages.

HAVE FUN!