Simple Youtube Video Embedder/BBC

Started by xPandax, July 12, 2013, 02:36:25 PM

Previous topic - Next topic

TrueZone

Quote from: xPandax on September 15, 2013, 08:12:53 AM
Quote from: TrueZone on September 14, 2013, 06:48:30 AM
well, for me not work.. when i  make a reply or a new topic the page remain  whit !!! What`s happening ? I folowed all instuction thee...

Are you using any other video related mods?

Could you please attach the Subs.php & Post.php files? Or PM a demo login for your forum?

Thanks.

My firend, i make the changes in a fressh copy of forum on a test page, so, all was in original files, i veryfied 3 times and was eneterd corectly...
I`m not using any othe video mods.. was on emty and fresh instaled forum

Thank you

Neo_TE

Quote from: TrueZone on September 16, 2013, 06:46:35 AM
My firend, i make the changes in a fressh copy of forum on a test page, so, all was in original files, i veryfied 3 times and was eneterd corectly...
I`m not using any othe video mods.. was on emty and fresh instaled forum

Thank you

Could you please PM me the link to your forum along with a demo login.

TrueZone

Quote from: xPandax on September 17, 2013, 12:21:19 PM
Quote from: TrueZone on September 16, 2013, 06:46:35 AM
My firend, i make the changes in a fressh copy of forum on a test page, so, all was in original files, i veryfied 3 times and was eneterd corectly...
I`m not using any othe video mods.. was on emty and fresh instaled forum

Thank you

Could you please PM me the link to your forum along with a demo login.

I resolved this problem in the meanwile. The problem was with my Subs-Post.php file, that was quarantined  by the host...

Have a good day

TrackMustangsOnline


DaRKeN_58

... :-X Dime de que presumes y te diré de que careces ;)...

gijs007

I have one problem with this mod: My SMF forum runs on https and the embedded youtube video's are non https.
Some browsers block non https items on https websites.

Is it possible to edit the mod so it uses https instead of http?

rnorth6920

This mod is awesome!! My only complaint is that when pages are viewed using a mobile browser and there are a lot of videos, it crashes the browser.  Anyone else have this issue?

Neo_TE

Quote from: gijs007 on November 12, 2013, 07:03:16 AM
I have one problem with this mod: My SMF forum runs on https and the embedded youtube video's are non https.
Some browsers block non https items on https websites.

Is it possible to edit the mod so it uses https instead of http?

In, /Sources/Subs.php, replacing http (marked with bold) with https should work.

Quote
         array(
            'tag' => 'youtube',
            'type' => 'unparsed_content',
            'content' => '<iframe style="border:0;" width="642" height="392" src="http://www.youtube.com/embed/$1" allowfullscreen></iframe>',
            'validate' => create_function('&$tag, &$data, $disabled', '
            if (isset($disabled[\'url\']))
               $tag[\'content\'] = \'http://www.youtube.com/watch?v=$1\';
            $pattern = \'~(?:http|https|)(?::\/\/|)(?:www.|)(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[a-z0-9;:@?&%=+\/\$_.-]*~i\';
            if (preg_match($pattern, $data, $matches))
               $data = $matches[1];'),
            'disabled_content' => 'http://www.youtube.com/watch?v=$1',
         ),



Quote from: rnorth6920 on November 12, 2013, 11:59:44 AM
This mod is awesome!! My only complaint is that when pages are viewed using a mobile browser and there are a lot of videos, it crashes the browser.  Anyone else have this issue?

It has nothing to do with this mod. Its the flash player that's crashing the browser.

rnorth6920

Even though mobile browsers so not support flash?

Arantor

Except that YouTube won't be using Flash. The obscene amount of memory that gets allocated to make this stuff work in iframes is the problem: too many embeds on one page has *always* been an issue. It's just worse on mobile where there's a limited amount of memory and the browser crashes when the oomkiller pays a visit.
Holder of controversial views, all of which my own.


gijs007


mycousinvinny

Great Mod Simple and Eloquent. Very Nice work Pandax. Thanks Very Much

FragaCampos

Hi there.

I was trying to substitute Aeva's mod by this one, since xPandax's mod is more up-to-date and supports short links and https, but after years using Aeva, by forum's Youtube links get "weird" after uninstalling it, and Simple Youtube Video Embedder/BBC doesn't recognize them.
They show up like this after uninstalling Aeva:
[url=http://www.youtube.com/watch?v=bZwMIIJLWOw#ws]www.youtube.com/watch?v=bZwMIIJLWOw#ws[/url]

Since I have hundreds of Youtube links in my forum I don't know how to solve this issue. Any thoughts?


amadeos

It's probably the wrong discussion, but anyway is there a mod to enable Vimeo video?

margarett

FragaCampos, tás bom? :P

It should be possible to write a SQL query to automagically fix the links for you. Not sure if I can do it, though. But I can try ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

While you can do a SELECT ... WHERE body RLIKE... to do a regular expression search, you can't do a regex replace directly in SQL :(
Holder of controversial views, all of which my own.


FragaCampos

[portuguese mode on]Está tudo rijo, margarett. Espero que contigo também. [/portuguese mode off] ;)

Yes, I thought this wouldn't be easy to do via SQL, but it is worth the shot.

Thanks again for your help, margarett and Arantor.
Any suggestion would be much appreciated. ;)

margarett

Well, I put up a script that, I believe, could be resumed in 1/3 of the lines. regex is still really, really far in my to-learn list :P

It works, as far as I could test here. FragaCampos, you will backup, right? :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Nickwan

Works like a charm for 2.0.2 too.
Thx alot for this great mod!

Arantor

You really should use the package manager to update through 2.0.3, 2.0.4, 2.0.5 to 2.0.6.
Holder of controversial views, all of which my own.


Advertisement: