Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=3034)
Introduction
This mod allows you to insert media embed code from known websites without any hassle.
Just copy the embed code like <object ... , <embed ... , <iframe ... , short/long url youtube and paste it inside the embed tag and the media will be displayed in your post.
Features
* Creates a bbcode button that inserts streaming media in the post.
* If you uncheck 'Embed flash into posts' from 'Post Settings' you disable the embed as well.
Languages
english
english-utf8
greek
greek-utf8
History
2.0 - Fixed the regex for non http, https on dailymotion and vimeo urls
1.9 - Added wmode parameter to avoid video overlay
1.8 - Fixed the regex for non http, https on youtube url
1.7 - Added slashes on regex for special characters
1.6 - Minor fixes
1.5 - Added HTTPS and privacy-enhanced mode for youtube
1.4 - Added support for SMF 1.1.x
1.3 - Added security checks
- Now accepts embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube
1.2 - Reworked and added dailymotion iframe embed code
1.1 - Removed iframe code creation on post and replaced with embed code
- Added old youtube link insertion
1.0 - Initial release
very nice.. thanks :)
Worked like a treat but when I tried to embed more than one in a single topic the iframe just enclosed a link to the main index page - cms portal page. I use SMF embedded in Joomla, perhaps the problem is there.
domain.com/smf displayed domain.com/index.php
Useing embed once on a page was ok though.
i kinda like the idea using embed code instead of just the url like the other embed mod does
in reality we don't have to update the pattern when there is a code change and also url embed mod has limited patterns to the video sites
anyway i haven't test this mod yet, still upgrading my site, but doesn't this sorta give member the ability to use html in post?
i downloaded the MOD, but, how do i install it please ?
am using SMF_v2.0 RC5
Quotei kinda like the idea using embed code instead of just the url like the other embed mod does
There 're mods that don't even have a button to insert the url. Members aren't admins nor psychics to know about it.
Quotein reality we don't have to update the pattern when there is a code change and also url embed mod has limited patterns to the video sites
True.
Quoteanyway i haven't test this mod yet, still upgrading my site, but doesn't this sorta give member the ability to use html in post?
Doesn't flash button do the same?
Quotei downloaded the MOD, but, how do i install it please ?
am using SMF_v2.0 RC5
From Admin -> Package Manager -> Download Packages -> Upload a Package
For some reason after I embed the code into a post, it just shows up on the post as plain text. It does not process the code. I have html and flash enabled on the forum.
I am using SMF version 2.0
I can PM you with a link if you want to see what I am referring too.
Update:
It works with Youtube but not Umapper (a custom map website).
The attachment mod includes the umapper embed code.
Thanks for using it.
Will enabling flash really pose a security risk for the forum?
SMF seems to put much emphasize on how enabling flash will create security risks, and I surely don't want that :(
But, this mod is great, I tried different kinds of code including the "youtu.be" link and it still works :D that's why I want to keep it while still understanding the risks. :)
What is the worst thing people could do by exploiting the enabled flash?
Anyone knows anything about this? any answer is much appreciated, thank you in advance :)
I am having problems getting this to work. It says that it has installed successfully, the .gif for the button is in the correct place, the changes in sub and sub-editor are all there, but still I neither see the new button in my editor nor are [embed] tags processed. Totally no clue why. I tested this on 2 different smf boards (both 2.0), one has already some extra stuff installed which maybe could cause a problem, but the other one is a completly vanilla install.
Anyone has an idea where I could log into to find the problem?
Quote from: Tupsi on August 22, 2011, 07:03:09 AM
I am having problems getting this to work. It says that it has installed successfully, the .gif for the button is in the correct place, the changes in sub and sub-editor are all there, but still I neither see the new button in my editor nor are [embed] tags processed. Totally no clue why. I tested this on 2 different smf boards (both 2.0), one has already some extra stuff installed which maybe could cause a problem, but the other one is a completly vanilla install.
Anyone has an idea where I could log into to find the problem?
You have unchecked 'Embed flash into posts' for 'Post Settings'. You must check it to enable both embedded flash and embedded code in to posts.
You should update file into mod site on Link to mod, or should notify members download new one on Topic support ;)
I did not have this mod successfully on my localhost smf 2.0.1. All other mod is OK, but this mod is successful installed, show button, added code [embed=425,349][/embed] in post (flash enabled) but when save it show as plant text and disappear your code. Any advice, author?
does this work for regular members and subscribers also?
Quote from: Tomy Tran © 2012 on October 03, 2011, 04:41:40 AM
I did not have this mod successfully on my localhost smf 2.0.1. All other mod is OK, but this mod is successful installed, show button, added code [embed=425,349][/embed] in post (flash enabled) but when save it show as plant text and disappear your code. Any advice, author?
yeah,im having the same problem. it does not work as a admin or member or subscriber.
I installed the Mod and for some reason the Embed button its not showing..I had to Fix The Language file thats the only manual Mod i made.. any help?
Quote from: krash661 on October 18, 2011, 03:22:35 PM
Quote from: Tomy Tran © 2012 on October 03, 2011, 04:41:40 AM
I did not have this mod successfully on my localhost smf 2.0.1. All other mod is OK, but this mod is successful installed, show button, added code [embed=425,349][/embed] in post (flash enabled) but when save it show as plant text and disappear your code. Any advice, author?
yeah,im having the same problem. it does not work as a admin or member or subscriber.
Is your video embed code from megavideo, metacafe, dailymotion, veoh, vimeo, youtube?
Quote from: 5p00f3r on October 22, 2011, 10:17:33 PM
I installed the Mod and for some reason the Embed button its not showing..I had to Fix The Language file thats the only manual Mod i made.. any help?
Double check the installation.
From youtube. I had un-installed it then (sorry for bad news but it doesn't work).
Using SMF 2.0+, I can add youtube via flash button by change youtube url from
http://www.youtube.com/watch?v=iTA463bLJsw
to
http://www.youtube.com/v/iTA463bLJsw
(change = to / and remove watch?) and it work very good, not test other media channel.
You used the shorturl or the embed code of youtube video for this mod?
Nope, I used normal link with your mod look like: http://www.youtube.com/watch?v=iTA463bLJsw
After failed with your mod, I has played around with code of SMF 2.0.1 and discovered I can do shorturl with flash button without any mod and it still works fine.
OK, then.
Thanks for trying my mod.
Just to be sure for others i tested your youtube link on my test site and works fine.
So, there is no problem with my mod.
I installed this mod last night. The only problem I has was locating the BBC button the first time I tried it. But moving the cursor around over the buttons revealed it.
It worked fine of the couple of YouTube videos I tried.
Doesn't embed when I tried this video: http://www.bbc.co.uk/doctorwho/dw/news/bulletin_111119_02/The_Christmas_Special_The_Doctor_The_Widow_and_The_Wardrobe
That's because bbc.co.uk uses an external player.
I just get text show of the embed code with youtube
with iframe code & old embed code e>G: <object> any ideas
<iframe width="640" height="360" src="http://www.youtube-nocookie.com/embed/wMbVJPNxvzo?hd=1" frameborder="0" allowfullscreen></iframe>
(wont work)
<object width="640" height="360"><param name="movie" value="http://www.youtube-nocookie.com/v/wMbVJPNxvzo?version=3&hl=en_US&hd=1"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube-nocookie.com/v/wMbVJPNxvzo?version=3&hl=en_US&hd=1" type="application/x-shockwave-flash" width="640" height="360" allowscriptaccess="always" allowfullscreen="true"></embed></object>
& i did wrap it with [embed=640,360][/embed]
hxxp://www.youtube-nocookie.com is not the youtube domain.
So i cant embed using the no tracking cookie option ?.
can this be added to or not (I don't know coding so asking if possible) as I hate tracking cookies :P
Will try without & reply or update this post. thanks for the quick reply.
UPDATE:
Yes can confirm works when the tracking cookie is left on !. (can you still answer about the tracking cookie if it can be added to or not please)
Updated to support HTTPS and privacy-enhanced mode for youtube.
Done
portuguese files
<file name="$languagedir/Modifications.portuguese_pt.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['embed'] = 'Inserir vídeo Código Embed';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_pt-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['embed'] = 'Inserir vídeo Código Embed';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['embed'] = 'Inserir vídeo Código Embed';
]]></add>
</operation>
</file>
<file name="$languagedir/Modifications.portuguese_brazilian-utf8.php" error="skip">
<operation>
<search position="end" />
<add><![CDATA[
$txt['embed'] = 'Inserir vídeo Código Embed';
]]></add>
</operation>
</file>
hi... i installed this mod and i want to add embed code in my post but not working.. only code is apearing..
i wnt to add below code,
<object id="mpl" style="" width="600" height="480" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="src" value="http://sakitvs.com/player/play.swf" /><param name="quality" value="high" /><param name="allowfullscreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="wmode" value="opaque" /><param name="menu" value="false" /><param name="flashvars" value="streamer=rtmp://210.210.27.37:1935/live&file=livestream1&autostart=true&menu=false&image=/player/logo.png&&logo.hide=false&logo.position=bottom-right&logo.link=http://www.sakitv.com&logo.out=1&logo.margin=-1&stretching=exactfit" /><embed id="mpl" style="" width="600" height="480" type="application/x-shockwave-flash" src="http://sakitvs.com/player/play.swf" quality="high" allowfullscreen="true" allowscriptaccess="always" wmode="opaque" menu="false" flashvars="streamer=rtmp://210.210.27.37:1935/live&file=livestream1&autostart=true&menu=false&image=/player/logo.png&&logo.hide=false&logo.position=bottom-right&logo.link=http://www.sakitv.com&logo.out=1&logo.margin=-1&stretching=exactfit" /></object>
how i can do this??? whats the problem?
plz help me.
Did you read the first post?
Quote1.3 - Added security checks
- Now accepts embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube
Good job, works perfectly :)
Doesn't work with Vimeo. I get the message: "Sorry. This video does not exist."
Fix?
Quote from: larsenroed on March 30, 2012, 04:34:53 AM
Doesn't work with Vimeo. I get the message: "Sorry. This video does not exist."
Fix?
Fixed and updated the package.
Thanks
larsenroed.
Quote from: nikan on March 30, 2012, 05:15:02 AM
Quote from: larsenroed on March 30, 2012, 04:34:53 AM
Doesn't work with Vimeo. I get the message: "Sorry. This video does not exist."
Fix?
Fixed and updated the package.
Thanks larsenroed.
Haha, that's quick! Thanks.
could you give me an example of how to use the bbc?
I'm having trouble, not yet able to use it right :(
This mod was made to make easier the posting of a video from video hosting sites.
As i wrote at first post:
Just copy the embed code like <object ... , <embed ... , <iframe ... , short/long url youtube and paste it inside the embed tag and the media will be displayed in your post.
Quote from: nikan on May 02, 2012, 11:00:28 AM
This mod was made to make easier the posting of a video from video hosting sites.
As i wrote at first post:
Just copy the embed code like <object ... , <embed ... , <iframe ... , short/long url youtube and paste it inside the embed tag and the media will be displayed in your post.
I know that part, but it looks like when I was testing: See Attachment
Since version 1.3 this mod accepts embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube
Can this mod be used to embed youtube videos that will show in Chrome for Android and other similar mobile device html5/non-flash browsers?
Thanks in advance.
BFM.
I am having trouble with this mod. On my site, the .gif button does not show up. So I cannot embed videos. Can you help? Where exactly do I go to fix this? I am running the Curve Steel theme.
UPDATE: I fixed it!
This mod does not seem to work with viddler videos from sites such as Engadget.com. Any chance of making this compatible with viddler vids?
For iframe and legacy share of viddler videos
Find
elseif (preg_match(\'~embed.+src=(?:"|[\\\'"])((?:http|https)://(?:www.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh).com/.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = $matches[1];
Add bellow
elseif (preg_match(\'~(?:iframe|embed).+src=(?:"|[\\\'"])//www.viddler.com/(?:embed|player)/([a-z0-9]+)/.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.viddler.com/simple/\' . $matches[1];
is it support videobam videos???
I onely see [embed=425,349]
And not [embed=425,349][/embed]
Press the 'Toggle View' button.
Thnx nikan that works.
Shame that this don`t work :(
<script src="http://player.ooyala.com/player.js?height=315&embedCode=1zdWhlNTq2LLA8gBRzX_IZo65ozA2BaH&video_pcode=RvbGU6Z74XE_a3bj4QwRGByhq9h2&deepLinkEmbedCode=1zdWhlNTq2LLA8gBRzX_IZo65ozA2BaH&width=560"></script>
I have installed this mod on SMF 2.0.2 and made my first post with a video code from MetaCafe. Post was visible in the video. But only after one day, there was no video in my post. Just embedded code was visible. Till then I am not able to show any video on the forum. Flash is still on in the post options. Mod is still installed. And I am not sure, but I think that I did't installed any mod after this one.
One more thing, when I tried to uninstall this mod, it gives three errors.
Code: (Find) [Select]
if (empty($modSettings['enableEmbeddedFlash'])) {
$disabled['flash'] = true;
$disabled['embed'] = true;
}
Code: (Replace) [Select]
if (empty($modSettings['enableEmbeddedFlash']))
$disabled['flash'] = true;
Code: (Find) [Select]
array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
array(
'tag' => 'embed',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowScriptAccess" value="always" /><param name="AllowFullScreen" value="true" /><embed src="$1" width="$2" height="$3" AllowScriptAccess="always" AllowFullScreen="true" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" AllowScriptAccess="always" AllowFullScreen="true" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'embed\']))
$tag[\'content\'] = \'$1\';
global $context;
if (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:http|https)://www.(?:youtube|youtube-nocookie).com/embed/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])http://www.dailymotion.com/embed/video/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.dailymotion.com/swf/video/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])http://player.vimeo.com/video/(.*?)\?.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://vimeo.com/moogaloop.swf?clip_id=\' . $matches[1];
elseif (preg_match(\'~http://www.youtube.com/watch[?]v=(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1\';
elseif (preg_match(\'~http://youtu.be/(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1\';
elseif (preg_match(\'~embed.+src=(?:"|[\\\'"])((?:http|https)://(?:www.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh).com/.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = $matches[1];
else
$tag[\'content\'] = \'$1\';
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
Code: (Replace) [Select]
array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="$2" height="$3"><param name="movie" value="$1" /><param name="play" value="true" /><param name="loop" value="true" /><param name="quality" value="high" /><param name="AllowScriptAccess" value="never" /><embed src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed></object>' : '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never" /><noembed><a href="$1" target="_blank" class="new_win">$1</a></noembed>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'url\']))
$tag[\'content\'] = \'$1\';
elseif (strpos($data[0], \'http://\') !== 0 && strpos($data[0], \'https://\') !== 0)
$data[0] = \'http://\' . $data[0];
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
Code: (Find) [Select]
// Links are useless on paper... just show the link.
$disabled['embed'] = true;
Code: (Replace) [Select]
// Links are useless on paper... just show the link.
These errors mean that the mod can't find the necessary code to replace.
I know, but my main question is above these lines. These lines to show that I have problems when uninstalling the mod.
Mod is partially installed.
Why "Embed BBCode" does not support CNBC embed code?
<object id="cnbcplayer" height="380" width="400" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" >
<param name="type" value="application/x-shockwave-flash"/>
<param name="allowfullscreen" value="true"/>
<param name="allowscriptaccess" value="always"/>
<param name="quality" value="best"/>
<param name="scale" value="noscale" />
<param name="wmode" value="transparent"/>
<param name="bgcolor" value="#000000"/>
<param name="salign" value="lt"/>
<param name="movie" value="http://plus.cnbc.com/rssvideosearch/action/player/id/3000138674/code/cnbcplayershare"/>
<embed name="cnbcplayer" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" allowfullscreen="true" allowscriptaccess="always" bgcolor="#000000" height="380" width="400" quality="best" wmode="transparent" scale="noscale" salign="lt" src="http://plus.cnbc.com/rssvideosearch/action/player/id/3000138674/code/cnbcplayershare" type="application/x-shockwave-flash" />
</object>
And also vimeo.com
<iframe src="http://player.vimeo.com/video/56599373" width="500" height="281" frameborder="0" webkitAllowFullScreen mozallowfullscreen allowFullScreen></iframe>
Because if you go down that road, you get into the realms of something like Aeva which supports nearly 200 video and audio sites and it still isn't enough for some people.
Quote from: nikan on June 02, 2011, 07:29:55 PM
1.3 - Added security checks
- Now accepts embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube
Is there some way by which we can remove that security check? or modify it to include more websites ?
this mod doesn't work when viewing the forum on an iphone (Safari browser). Any ideas? It just shows a non-clickable link.
Quote from: HusaBob on April 15, 2013, 01:59:26 PM
this mod doesn't work when viewing the forum on an iphone (Safari browser). Any ideas? It just shows a non-clickable link.
This mod takes the link of the video from the embed code and play it with the same function that smf plays flash videos.
Probably the flash inside post is not enabled in smf.
it's enabled.
Flash videos are not supported on iPhone/Mobile Safari...
Quote from: Arantor on April 16, 2013, 10:32:05 AM
Flash videos are not supported on iPhone/Mobile Safari...
So, all I'm trying to do is use the short YouTube link. This mod makes you use the <embed> tag. As I said, this makes it NOT appear on an iPhone Safari browser.
I can watch the normal long URL YouTube vids on the iPhone.
Yes... because the embed tag forces it to use the Flash player which doesn't work on iPhones.
gotcha - thanks. So there's no way around this huh?
Is there a way to change the default sizes the embed tag comes up with?
I installed this mod but I can not where the post setting and no gif icon the post area
This is a great mod. I tried another one and it didn't work for me. This one is simple and effective.
The only problem I have found so far is, if you edit a post, the embed code stops working. It looks the same, but you don't get the video - only the raw code.
I noticed that when editing, the code highlights the embedded hyperlinks. So I unticked the SMF option to automatically parse URL's and now I can edit posts without losing the video itself.
Just wondering if that was the problem or if there could have been another reason? It's fixed, but if there is a simpler solution I would like to get back my URL parsing if possible.
Thanks for using my mod Cobber.
I tried both enabled and disabled URLs parsing but i can't reproduce this problem.
Ah well, such is the fickleness of computers and software.
I will continue to use your mod though, as it does its job which is the main thing.
Hey Nikan any chance of being able to use this mod with www.imgur.com photo albums. They uses iframe
<iframe class="imgur-album" width="100%" height="550" frameborder="0" src="http://imgur.com/a/albumserialnumberhere/embed"></iframe>
They look really nice when embedded in a post.
Thanks
Quote from: nikan on July 24, 2012, 04:35:49 AM
For iframe and legacy share of viddler videos
Find
elseif (preg_match(\'~embed.+src=(?:"|[\\\'"])((?:http|https)://(?:www.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh).com/.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = $matches[1];
Add bellow
elseif (preg_match(\'~(?:iframe|embed).+src=(?:"|[\\\'"])//www.viddler.com/(?:embed|player)/([a-z0-9]+)/.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.viddler.com/simple/\' . $matches[1];
I still can't get this mod to work to embed <iframe>
I'm using smf 2.0.5 - In which file will I find the above code?
I love this mod, but can someone explain to me how to post vimeo videos? I've tried several times and just get the url or embed code to pop up. :( Also was wondering how to change the default size as well. Thanks. x
Enable flash on posts.
[ embed=640,480 ] or any values for width and height
Got it! Thank you so much! :D
Hello Forum,
I just downloaded this mod and everything went well, but I don't see the embed button and I'm not sure how to get it to work. I downloaded it, uploaded and installed it and it said everything worked. I went into a new post and looked for an "embed button" but I don't see one.
I also went into post settings and enabled flash posts and made sure in the bbc code section that the embed tag was active, but I still don't see how to use it.
1. I tried just posting a youtube embed script in a post but that didn't do anything. I also tried writing [embed][/embed] tags around my youtube script and that didn't work either.
Is there anyone that knows what I am doing wrong?????
Thanks a BUNCH!!! :)
What version of SMF you're using and which theme.
What youtube script you are inserting, post it here inside code tag.
If you have enabled flash in posts you should see the button, try cleaning smf cache.
The script should work if you type the embed tag by hand as all smf tags.
You see the youtube embed code or nothing at all?
If you see nothing just give dimensions in embed tag like [embed=400,300]youtube embed code[/embed]
nikan
Thanks for the reply,
I just converted to 2.0.7 SMF
<iframe width="560" height="315" src="//www.youtube.com/embed/_o1E8K5WwWg" frameborder="0" allowfullscreen></iframe>
That is just a random video, but I assume I should use the embed code instead of the url? (I've tried using both.)
I attached the message I get when I use the embed tag you suggested ( [embed=400,300]youtube embed code[/embed] ). I am the owner and administrator of the forum so I should have all access, not sure what I need to change.
Currently NOTHING happens or I get the message that I attached below.
Thanks for your help.
I just tested your example code and i can see the video.
It must be a problem in your forum setup after the conversion.
QuoteI just tested your example code and i can see the video.
It must be a problem in your forum setup after the conversion.
What does the bbcode button look like? I'm not seeing it. I actually installed this mod in 2.0.6 and wasn't able to use the embed mod then, so I tried converting to 2.0.7 to see if that would work.
Oh, I forgot to tell you, I am using the NOVO theme by Diego Andres. I actually went to the SMF parser and looked in my php files to see the changes that the mod does and they are all there, any idea why the button is not showing or why I am getting the attached message?????
Other than installing the mod and making sure flash is allowed, are there any other needed admin changes?
So, you did an upgrade not convert your forum.
For different themes it only needs the image 'embed.gif' to be copied in Themes/YourThemeName/images/bbc folder.
There is an option at the installation to select in which theme will be installed.
Nothing else is needed.
Try the repair tool: http://download.simplemachines.org/index.php?thanks;filename=repair_settings.php
nikan!
It's solved NOW!!!
Thanks so much for your help and your replies. Much appreciated. I had to go through and deactivate flash and activate it again and that worked in my post settings and then the embed gif appeared as well.
Thanks a bunch!!!
Hi, thanks for this mod :)
I use 2.0.8 version and
<iframe width="560" height="315" src="//www.youtube.com/embed/_o1E8K5WwWg" frameborder="0" allowfullscreen></iframe>
Work fine, but can I embed a map?
<iframe frameBorder="0" src="http://es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=7121902&measures=off&title=off&near=off&images=off&maptype=S" width="500" height="400"></iframe>
Try also less http:
<iframe frameBorder="0" src="//es.wikiloc.com/wikiloc/spatialArtifacts.do?event=view&id=7121902&measures=off&title=off&near=off&images=off&maptype=S" width="500" height="400"></iframe>
But not work
Sorry, from version 1.3 you can use embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube.
I am using SMF 2.0.8 with the 1.9 version of Embed BBCode. How would I go about embedding a soundcloud stream in an iframe? Adding the iframe code between the embed tags just results in text.
Quote from: Sethv2 on July 02, 2014, 02:39:11 AM
I am using SMF 2.0.8 with the 1.9 version of Embed BBCode. How would I go about embedding a soundcloud stream in an iframe? Adding the iframe code between the embed tags just results in text.
Try the following
Open Sources/Subs.php file and find
array(
'tag' => 'embed',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowScriptAccess" value="always" /><param name="AllowFullScreen" value="true" /><param name="wmode" value="transparent" /><a href="$1" target="_blank" class="new_win">$1</a></object>' : '<object type="application/x-shockwave-flash" data="$1" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="wmode" value="transparent" /><a href="$1" target="_blank" class="new_win">$1</a></object>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'embed\']))
$tag[\'content\'] = \'$1\';
global $context;
if (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/www\.(?:youtube|youtube\-nocookie)\.com\/embed\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'?wmode=transparent\';
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])http\:\/\/www\.dailymotion\.com\/embed\/video\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.dailymotion.com/swf/video/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])http\:\/\/player\.vimeo\.com\/video\/(.*?)\?.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://vimeo.com/moogaloop.swf?clip_id=\' . $matches[1];
elseif (preg_match(\'~http\:\/\/www.youtube.com\/watch[?]v=(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1&wmode=transparent\';
elseif (preg_match(\'~http\:\/\/youtu\.be\/(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1&wmode=transparent\';
elseif (preg_match(\'~embed.+src=(?:"|[\\\'"])((?:https?\:)?\/\/(?:www\.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh)\.com\/.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = $matches[1];
else
$tag[\'content\'] = \'$1\';
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
Replace it with
array(
'tag' => 'embed',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowScriptAccess" value="always" /><param name="AllowFullScreen" value="true" /><param name="wmode" value="transparent" /><a href="$1" target="_blank" class="new_win">$1</a></object>' : '<object type="application/x-shockwave-flash" data="$1" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="wmode" value="transparent" /><a href="$1" target="_blank" class="new_win">$1</a></object>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'embed\']))
$tag[\'content\'] = \'$1\';
global $context;
if (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/www\.(?:youtube|youtube\-nocookie)\.com\/embed\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'?wmode=transparent\';
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])http\:\/\/www\.dailymotion\.com\/embed\/video\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.dailymotion.com/swf/video/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])http\:\/\/player\.vimeo\.com\/video\/(.*?)\?.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://vimeo.com/moogaloop.swf?clip_id=\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"]).+(https?\%3A\/\/api\.soundcloud.com\/tracks\/[0-9]+)\&.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches)) {
$data[0] = \'https://player.soundcloud.com/player.swf?url=\' . urlencode(urldecode($matches[1]));
$data[1] = \'100%\';
$data[2] = \'81\';
}
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"]).+(https?\%3A\/\/api\.soundcloud.com\/playlists\/[0-9]+)\&.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches)) {
$data[0] = \'https://player.soundcloud.com/player.swf?url=\' . urlencode(urldecode($matches[1]));
$data[1] = \'100%\';
$data[2] = \'255\';
}
elseif (preg_match(\'~http\:\/\/www.youtube.com\/watch[?]v=(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1&wmode=transparent\';
elseif (preg_match(\'~http\:\/\/youtu\.be\/(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1&wmode=transparent\';
elseif (preg_match(\'~embed.+src=(?:"|[\\\'"])((?:https?\:)?\/\/(?:www\.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh)\.com\/.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = $matches[1];
else
$tag[\'content\'] = \'$1\';
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
Thanks for the great plugin, however, there's a thing I want to change that I really can't see where to edit.
When I embed it says
[embed=425,349][/embed]
I would love to change the size 425,349 instead of always have to change it manually. How do I do this?
In file ./Sources/Subs-Editor.php
Find:
array(
'image' => 'embed',
'code' => 'embed',
'before' => '[embed=425,349]',
'after' => '[/embed]',
'description' => $txt['embed']
),
Quote from: nikan on August 27, 2014, 05:41:10 AM
In file ./Sources/Subs-Editor.php
Find:
array(
'image' => 'embed',
'code' => 'embed',
'before' => '[embed=425,349]',
'after' => '[/embed]',
'description' => $txt['embed']
),
That is exactly what I needed! Perfect mod! Thanks alot!
Would have been awesome if it was possible to change this in the admin panel, but this works too :)
Hey
I have installed the Mod Name: Embed BBCode ( EmbedBBCode20.zip - http://custom.simplemachines.org/mods/index.php?mod=3034)
I have version SMF 2.0.9
When i am adding a new post and put embed code of youtube in the post, i cant see the video, I see only the link.
Can someone tell me what is wrong?
This is the post https://forum.arabinstruments.com/index.php?topic=16.0
Can you help?
Thanks
Enable flash in posts
Hey
Where do i enable the flash on post?
Can you show me ? Print screen?
Please...
Admin -> Posts and Topics -> Post Settings
Hello,
I need your help.
I have installed the Mod (by manual) Name: Embed BBCode (EmbedBBCode20.zip - http://custom.simplemachines.org/mods/index.php?mod=3034)
I used SMF 2.0.9 and I enabled the flash in posts already.
I try to put the embed codes from many websites but the embed code show in my post only youtube code.
The other embed codes did not show, It show <iframe>..........</iframe> code
Example code is not work :
[embed=425,349]<iframe width='640' height='320' src='http://www.majortrailers.com/embed.php?tid=1606&w=640&h=320&sd=0' frameborder='0' allowfullscreen></iframe>[/embed]
Example youtube code, it's work:
[embed=425,349]<iframe width="560" height="315" src="//www.youtube.com/embed/XBPPHBu-WDs" frameborder="0" allowfullscreen></iframe>[/embed]
Please see a screenshot of my post;
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fupic.me%2Fi%2Frg%2F44untitled-1.jpg&hash=1d60893536ff67ba87f2193d6789b6493ffbcd97)
I need to use all embed VDO.
Please suggest me.
How I can solve this issue?
Thank you
Thananit
Try to replace your single quotes with double quotes
I try it but still don't show the VDO.
For security I don't think this mod does any and all iframes (which means it doesn't do random video sites for your users' security) - the main description suggests it does YouTube, DailyMotion and Vimeo.
Is it possible to use this mod with onedrive embedded links?
Hi,
I'm using the youtube short url for videos on my forum and it works on desktop, but not on my android phone, you only see the live link. It works to embed my vimeo videos on my phone and on desktop, but only youtube videos won't show on mobile. Is there a way to remedy this? I have already looked around the forum but didn't see a definitive answer.
Thanks.
I cannot reproduce your problem. Both youtube and vimeo videos plays on my desktop and on my android phone.
Please give the following information:
SMF version
Mod version
Installation method of the mod
Embed code you use (youtube and vimeo)
Thanks for your reply Nikan,
Version: SMF 2.0.7
Mod: Embed 1.8
Installation method: Download from SMF site and upload .zip file then install.
Here is an example of a youtube file that works on my desktop (firefox browser) but doesn't work on my android: http://youtu.be/x8d36hJes4w
I did notice my vimeo link that DOES show on my desktop and phone, I don't use the [embed][/embed] code. http://www.vimeo.com/76123849
I have simple A/V embedder and Embed BBC code installed. I assume since I have vimeo video playing without the [embed] code around it, it is being played by the simple a/v. When I DO put [embed] around the vimeo links they don't render, alternatively when I DON'T put [embed] around YouTube links they don't render anywhere. I thought for a minute that the two mods were conflicting with each other so I uninstalled embed BBC code and just tried to use simple a/v, but the Youtube links wouldn't render without [embed], so I know it is key to using youtube, but it doesn't actually work for vimeo right now.
Any ideas? Should I just uninstall simple a/v and see if I can get vimeo to run with the [embed] even though with them both installed it doesn't work?
Thanks.
You need to update your forum and embed mod.
Do your tests with one mod at a time, not both mods enabled.
Thanks for the help Nikan. Will do!
Quote from: halpaslan on February 25, 2015, 03:32:38 AM
Is it possible to use this mod with onedrive embedded links?
Bump!
Hi there.
What's the difference between this mod and using html tags?
I just got this running in
SMF 2.1 Beta 3 I needed this to work because I was using it in a site that I upgraded when I changed servers.
Installing the MOD resulted in =>
Execute Modification ./Sources/Subs.php | successful |
failed | successful |
Execute Modification ./Sources/Subs-Editor.php | successful |
failed | successful |
So I had to manually do the following:
in
./Sources/Subs.phpCode (Find)
array(
'tag' => 'flash',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => '<embed type="application/x-shockwave-flash" src="$1" width="$2" height="$3" play="true" loop="true" quality="high" AllowScriptAccess="never">',
'validate' => function (&$tag, &$data, $disabled)
{
if (isset($disabled['url']))
$tag['content'] = '$1';
$scheme = parse_url($data[0], PHP_URL_SCHEME);
if (empty($scheme))
$data[0] = '//' . ltrim($data[0], ':/');
},
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
Code (Add After) (NOTE: This includes my own mods to embed Archive.org streams and Real.video iframes)
array(
'tag' => 'embed',
'type' => 'unparsed_commas_content',
'test' => '\d+,\d+\]',
'content' => ($context['browser']['is_ie'] && !$context['browser']['is_mac_ie'] ? '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowScriptAccess" value="always" /><param name="AllowFullScreen" value="true" /><param name="wmode" value="transparent" /><a href="$1" target="_blank" class="new_win">$1</a></object>' : '<object type="application/x-shockwave-flash" data="$1" width="$2" height="$3"><param name="movie" value="$1" /><param name="AllowFullScreen" value="true" /><param name="AllowScriptAccess" value="always" /><param name="wmode" value="transparent" /><a href="$1" target="_blank" class="new_win">$1</a></object>'),
'validate' => create_function('&$tag, &$data, $disabled', '
if (isset($disabled[\'embed\']))
$tag[\'content\'] = \'$1\';
global $context;
if (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/www\.(?:youtube|youtube\-nocookie)\.com\/embed\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'?wmode=transparent\';
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/www\.dailymotion\.com\/embed\/video\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.dailymotion.com/swf/video/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/player\.vimeo\.com\/video\/(.*?)\?.+(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://vimeo.com/moogaloop.swf?clip_id=\' . $matches[1];
elseif (preg_match(\'~http\:\/\/www.youtube.com\/watch[?]v=(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1&wmode=transparent\';
elseif (preg_match(\'~http\:\/\/youtu\.be\/(.+)~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1] . \'&fs=1&wmode=transparent\';
elseif (preg_match(\'~embed.+src=(?:"|[\\\'"])((?:https?\:)?\/\/(?:www\.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh)\.com\/.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = $matches[1];
// begin masodos MOD to embed Archive.org iFrames
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/archive.org\/stream\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$tag[\'content\'] = \'<iframe src=https://archive.org/stream/\' . $matches[1] . \' width=$2 height=$3 frameborder=0 allowfullscreen></iframe>\';
// end masodos MOD to embed Archive.org iFrames
// begin masodos MOD to embed real.video iFrames
elseif (preg_match(\'~iframe.+src=(?:"|[\\\'"])(?:https?\:)?\/\/www\.real\.video\/embed\/(.*?)(?:"|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$tag[\'content\'] = \'<iframe src=https://www.real.video/embed/\' . $matches[1] . \' width=$2 height=$3 frameborder=0 allowfullscreen></iframe>\';
// end masodos MOD to embed real.video iFrames
else
$tag[\'content\'] = \'$1\';
'),
'disabled_content' => '<a href="$1" target="_blank" class="new_win">$1</a>',
),
~AND~in
./Sources/Subs-Editor.phpCode (Find)
array(
'code' => 'table',
'description' => $editortxt['table']
),
array(
'code' => 'code',
'description' => $editortxt['bbc_code']
),
Code (Add After)
array(
'image' => 'embed',
'code' => 'embed',
'before' => '[embed=425,349]',
'after' => '[/embed]',
'description' => $txt['embed']
),
Last (and perhaps least) had to convert the "embed.gif" to "embed.png" so it shows on the toolbar in editor.
see in action: http://DeBurger.com/vestibule/
I see you're running live. I have 32 mods on my 2.0.15 site. Did you have a lot of mods, if so was the transition successful for them, (besides this one) after upgrade?
Does anyone know how to add Rumble to this mod list? Great mod but I need Rumble as well.