Auto Embed Video Clips v1.3
By Karl Benson
By Karl Benson
Introduction
A modification to automatically convert links from Youtube/Myspace/GoogleVideo/Metacafe/Stage6 and MANY other sites into embedded clips without the need for bbcode.
Just post a plain link to the page in the post and the mod will do the rest.
Its the ultimate user friendly way of posting clips, but safe from a security standpoint.
New in v1.3
Use bbcode to prevent links being converted (By this mod only)
Requires: Auto Convert Links to be enabled.
Note: Due to a problem/bug in SMF. If you try to post with only a link to a clip on any of the supported video sites in it, you will get an "empty message" error because there is no actual content to the post.
However I have posted a Mod to Fix the issue for this and ALL other video clip embed/type mods.
Features
o Supports the following Video sites
- YouTube (Standard & Playlists)
> Global | Brasil | France | Ireland | Italia | Japan | Nederland | Polska | Espa United Kingdom
> Australia | Hong Kong | Mexico | New Zealand
- Google Video
> Global(.com) | Australia(.com.au) | United Kingdom(.co.uk) | Deutsch(.de) | Espaes)
> France(.fr) | Italia(.it) | Nederland(.nl) | Polska(.pl) | Canada(.ca)
- MetaCafe
- MySpaceTv
- Stage6 *(Requires Installation of Dixv Plugin)
- Veoh
- Gametrailers
- LiveLeak
- CellFish
- MyVideo.de
- ClipFish.de
- Liberio.it
- 123video.nl
- VSocial
- IFilm
- Sevenload
- Revver
- BrightCove
- Aniboom
- Vimeo
- Guba
- Glumbert
- Tudou
- dv.ouou
- Biku
- GameVideos
o Safe from security standpoint
- Properly validates/sanitizes/parses the video id before including it in the url
- Disables script access (allowScriptAccess="never")
o Use bbcode to prevent links being converted to embedded clips
o Includes a 'hard-coded' limit to the number of links PER PAGE that can be converted to embedded objects (default: 12)
- Prevents overloading pages with flash
- The limit ONLY applies to links converted by this mod (not other video clip mods)
There are no admin settings with this mod. To disable it, you must uninstall it.
Installation
Installation affects source files only. No manual theme/language edits will be required
If you have installed any other mods that add video embedding functionality, like my YouTube BBCode mod,
those mods will take precedent for bbcoded links, and this mod will work as normal for non-bbcoded links
This mod is compatible with SMF 1.1.x and
with SMF 2.0 Beta 1 (which is currently available to Charter Members).
Customizing
The mod has been designed to be fully functional 'out of the box' and not require any manual theme or language edits.
However some 'hardcoded' capability has been included for those who understand php/smf and maybe wish to customize the mod.
Note, any changes will prevent the mod from being automatically and fully uninstalled.
Enable/Disable Specific Sites
Eg to enable/disable Stage6
Open Sources/Subs.php
FIND
Código:
$embed[] = array(
'name' => 'Stage6',
'enabled' => 1,
Change number 1 to 0 to disable (1 = enabled, 0 = disabled)'name' => 'Stage6',
'enabled' => 1,
And vice versa to enable for Stage6 and any of the other sites supported.
Increasing/Decreasing The Limit On The Number Of Links Converted Per Page (Not Recommended)
Open Sources/Subs.php
FIND
Código:
static $autoembedmax = 12 ;
Change 12 to another numberSupport
Please use the modification thread for support with this modification.
(Please don't ask me to do the edits for you)
Changelog
1.0 - 9th October 2007
o Initial release per request
1.1 - 19th October 2007
o Added support for Youtube embed player url
o Added support for Youtube playlists
o Added support for many more video sites
Veoh, Gametrailers, LiveLeak, CellFish, MyVideo.de, ClipFish.de, Liberio.it, 123video.nl,
VSocial, IFilm, Sevenload, Revver, BrightCove, Aniboom, Vimeo, Guba, Glumbert, Tudou, dv.ouou, Biku, GameVideos,
o Improved security of mod by denying script access to flash objects (allowScriptAccess="never")
o Disables the convert for 'print' pages so is printer friendly. (Shows the link instead of object)
o Re-coded the arrays to be lighter, less html, using a generic object to embed
o Got rid of <embed> (forever?)
1.2 - 20th October 2007
o Fixed Gametrailers
o Added support for old style LiveLeak links
o Added support for different style Google video links
o Fixed Cellfish (their current player doesnt work, so switched to older one)
o Fixed Glumbert
o Fixed Gamevideos (although, it won't work in Firefox still for some reason)
1.3 - 29th October 2007
o Fixed a minor bug in the <object> code that affected xhtml validity
o Added warning to readme, requires auto convert urls to be enabled
o Added support for more YouTube localised versions
- Australia, Hong Kong, Mexico, New Zealand
o Fixed Metacafe sizes
o Fixed Googlevideo sizes
o Added a 'hard-coded' limit to the number of links PER PAGE that can be converted to embedded objects (default: 12)
o Added LINK bbcode to protect links from being embedded.
