News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

Ohara YouTube Embed

Started by All Colours Sam, December 21, 2011, 03:04:59 PM

Previous topic - Next topic

All Colours Sam

To disable the auto embedding you can remove this line form your Sources/Subs.php file:

$message = OYTE_Preparse($message);

Although doing it will remove the auto embedding everywhere.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Ecnelis

Are there any plans for embed based on id only?

Quote

All Colours Sam

Not really, is not something that many people has requested and it would be too annoying having to handle urls or IDs on the same tag.

If you know the ID you only need to add youtube.com/  to it.

What would be the benefit of using only the ID?
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Ecnelis

It's not for any benefits, really. I have just upgraded my SMF-based forum from 1.1.20 to 2.0.9 and the old YT plug-in is not working anymore. And it has the ID-only embed... So it's problem just with me. ;) Got to fix this manually.

All Colours Sam

oh, OK, can you point me to the old mod you used to have?
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

DanesDK

Hey,

Is there anyway to get this youtube video start in like 720p.???

Thanks

All Colours Sam

Open your /Sources/OharaYTEmbed.php file and find 2 instances of this:


src="http://www.youtube.com/embed/$1"


Change both of them to this:


src="http://www.youtube.com/embed/$1&vq=hd720"
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

hcfwesker

#287
Are there an reported issues with the embed video not having the fullscreen option displayed in the bottom right?

http://i.gyazo.com/4761072a72a2834fc0ef8b7b7978c6b5.png

^ It shows for me in Opera browser so I never knew there was an issue until some members brought it up that they don't have the fullscreen option in browsers like chrome, firefox, IE, etc.   I checked, myself, on the browsers and sure enough the fullscreen option doesn't appear.

A quote from one of my members ...

QuoteUpon further investigation, it's an iframe in the older HTML embedding an HTML5 page that disables the full screen button. When the page returns the need to use Flash Player instead, full screen button shows.

All Colours Sam

Don't really understood you, are you reporting an issue with the mod? I can't recall any reported issue like that.

I'm not sure if there is something I can do, the iframe option is considered the best option since it selects the right tool for the user's browser.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Bigguy

I installed this yesterday on 2.1 and it all works fine. Fullscreen mode is there


All Colours Sam

Thanks, it is fixed on the new version but thats only for SMF 2.1 will see about back porting the regex to the SMF 2.0.x compatible version.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

karavan2





are not displayed, showing black Screen.


All Colours Sam

If its showing a black screen then it means you or your users cannot see those videos.

However, if you see a blank (as in nothing) screen then it means the mod didn't catch those urls but on those cases the mod should print an error message.

So which is it? a blank or a black screen?
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

karavan2


All Colours Sam

Then it means the videos you are trying to see are the issue.

If the mod converts the links into a video, then the mod has fulfilled its job. Some youtube videos has restrictions and this mod cannot bypass those restrictions. There is nothing I can do.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Myth_72

I used until now other mod it's had possibility to show video from youtube only with the ID of video  like this for example [yotube]wifH74R3yJA[youtube]
but now with Ohara YouTube Embed this links aren't working.

Is there possibility to add this functionality in Ohara to show video only with ID of video?

Tanks in advance.

P.S. Sorry for my bad English.

All Colours Sam

Untested and will probably never be included since not that many people uses the ID

Open your Sources/OharaYTEmbed.php  find this:


if (empty($data))
return sprintf($txt['OYTE_unvalid_link'], 'youtube');


And add this below:



// Did the user used the ID?
if (strlen($data) == 11)
return '<iframe width="'. (empty($modSettings['OYTE_video_width']) ? '420' : $modSettings['OYTE_video_width']) .'" height="'. (empty($modSettings['OYTE_video_height']) ? '315' : $modSettings['OYTE_video_height']) .'" src="//www.youtube.com/embed/'. $data .'" frameborder="0"></iframe>';


Keep in mind that this relies on the user putting the exact eleven chars youtube uses, of course if youtube changes the way their Ids works, which is very likely,this will have to be updated again.
Oh, wouldn't it be great if I *was* crazy? ...then the world would be okay
Suki

Myth_72


420Connect.co.uk

Can I make this mod, EXCLUDE youtube links only when said, in my SimplePortal 'shoutbox'?
(so they become [link] instead of



Many thanks
www.420Connect.co.uk ~ A Social Network For The #CannabisCommunity ~ Come say "High" ;)

Advertisement: