News:

Join the Facebook Fan Page.

Main Menu

Embed BBCode

Started by nikan, June 02, 2011, 07:29:55 PM

Previous topic - Next topic

nikan

Since version 1.3 this mod accepts embed code only from: megavideo, metacafe, dailymotion, veoh, vimeo, youtube

Babyfacemagee

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.

median

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!


Babyfacemagee

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?

nikan

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];

hellboy78

is it support videobam videos???

weerforum

I onely see [embed=425,349]

And not [embed=425,349][/embed]

nikan

Press the 'Toggle View' button.

weerforum

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>

bukharifaran

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=(?:&quot;|[\\\'"])(?:http|https)://www.(?:youtube|youtube-nocookie).com/embed/(.*?)(?:&quot;|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.youtube.com/v/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:&quot;|[\\\'"])http://www.dailymotion.com/embed/video/(.*?)(?:&quot;|[\\\'"])~i\'.($context[\'utf8\'] ? \'u\' : \'\'), $data[0], $matches))
$data[0] = \'http://www.dailymotion.com/swf/video/\' . $matches[1];
elseif (preg_match(\'~iframe.+src=(?:&quot;|[\\\'"])http://player.vimeo.com/video/(.*?)\?.+(?:&quot;|[\\\'"])~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=(?:&quot;|[\\\'"])((?:http|https)://(?:www.)?(?:youtube|youtube-nocookie|dailymotion|vimeo|metacafe|megavideo|veoh).com/.*?)(?:&quot;|[\\\'"])~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.

My Forum: Mobile Fun | My Blog: Mobile Fun Blog

nikan

These errors mean that the mod can't find the necessary code to replace.

bukharifaran

I know, but my main question is above these lines. These lines to show that I have problems when uninstalling the mod.
My Forum: Mobile Fun | My Blog: Mobile Fun Blog

nikan

Mod is partially installed.

flash_os

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>

Arantor

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.

Aaruni

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 ?

HusaBob

#56
this mod doesn't work when viewing the forum on an iphone (Safari browser). Any ideas? It just shows a non-clickable link.

nikan

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.

HusaBob


Arantor

Flash videos are not supported on iPhone/Mobile Safari...

Advertisement: