News:

Wondering if this will always be free?  See why free is better.

Main Menu

Ohara YouTube Embed

Started by Suki, December 21, 2011, 03:04:59 PM

Previous topic - Next topic

I Use Dial

It was obviously a smart-ass response, not a real suggestion.

Arantor

No, it wasn't a smart-ass response and didn't warrant a smart-ass reply.

I Use Dial

Really? You think that making a video named after my handle name (on this forum) is an effective way to inform board users of a post entry feature? Seriously? Also, the suggestion is NOTHING like my request, which specifically asks for a way to add text somewhere around the comments box.

Sorry to waste so much of this support forum's time in asking questions. I swear, this is what I get with the vast majority of open source project 'communities' now, and the forum mods tend to be perfectly happy to send off people looking for solutions so they can support and retain the people who drive them away.

Arantor

He didn't say you had to make a video named after your handle. He was making the suggestion and just addressing it to you.

You know, like me saying:
"You don't have to be so rude to someone just trying to offer a suggestion, I Use Dial." Because that's all he did, he made a comment and wanted to indicate to whom it was intended.

For some forums, yes, it would actually be appropriate. Small forums, close-knit, with not-entirely-technical members, they'd appreciate such a video, actually.

QuoteAlso, the suggestion is NOTHING like my request, which specifically asks for a way to add text somewhere around the comments box.

That's one of the things that you don't necessarily realise. What you want is a way to inform members. There are *other* ways of doing it than what you've thought of.

In fact there are other ways of doing embedding entirely, like not requiring bbcode and just posting the link and have the forum do all the work. But no, you're convinced that your way is the One True Way and won't hear anything against it.

QuoteI swear, this is what I get with the vast majority of open source project 'communities' now

If you act this much like a smart-ass everywhere else, I really wouldn't be surprised.

Quoteand the forum mods tend to be perfectly happy to send off people looking for solutions

Running a forum is not an easy ride. It takes work and dedication. One would assume that if you're already dedicated enough, you'd spend a little time trying to find the answer yourself before posting (this is not directed at you specifically, but as a general observation) - trouble is most of the people who come here asking haven't bothered to search or spend any effort themselves in trying to find an answer.

Remember: those of us who offer help, in whatever form, do so in our spare time and we had to learn it all somewhere first. We didn't magically have it dumped into our brains, we had to work to figure it all out - and we're sharing. Is it so wrong to expect people to spend a little effort first before getting help? Or are you of the belief that you are entitled to something just because you ask for it?

Suki

New version 1.2.

Changelog:

- Adds support for vimeo urls via the vimeo oembed API, currently their API only support this formats:
vimeo.com/[ID]
vimeo.com/channels/[channel name]/[ID]
vimeo.com/groups/[Group name]/videos/[ID]

- Adds auto-embed function for both youtube and vimeo, now you don't have to use their respective tags, just past a valid url. The tags are still supported and you can still use them, Your old tags will still work too. You can mis pure urls with bbc tags.
- Add support for the old [yt] for those who still have those tags.

- This new version requires PHP 5.3 or greater, old version 1.1 can be found at github: https://github.com/MissAllSunday/OharaYouTubeEmbed/releases  the green button is a ready-to-install package.

To upgrade from previous versions, uninstall the old mod and install the new version. You won't lose any tag or setting.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Shazar

Just installed this on my new forum and it works nicely - thanks!   :D

ktysinger1

#146
Is there an easy way to make it have the option to play fullscreen?

Nevermind. I found the solution. Just add allowfullscreen to the two youtube iframes. It appears to work fine.

<iframe width="'. (empty($modSettings['OYTE_video_width']) ? '420' : $modSettings['OYTE_video_width']) .'" height="'. (empty($modSettings['OYTE_video_height']) ? '315' : $modSettings['OYTE_video_height']) .'" src="hxxp:www.youtube.com/embed/$1 [nonactive]" allowfullscreen frameborder="0"></iframe>

kamili34

How not to center the window of the movie.  I would like on the left side of the post not in center.

Suki

In Sources/OharaYTEmbed.php find:

<div style="text-align:center;margin:auto;padding:5px;" class="youtube $1">

and replace with:

<div style="text-align:left;margin:auto;padding:5px;" class="youtube $1">
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

kamili34


Rob Lightbody

Works great on my SMF Forum (2.0.7.) - clean install, first time.

STRRAYNGE

Ive installed this mod, and it works great, other than I cannot get it to auto-embed? I can click the youtube button in the post section and it will insert youtube tags around the URL and it works that way, but for some reason this mod, or any other I have tried just will not auto-embed. This function previously worked with a different mod I was using, but nothing works now? Any suggestions? My PHP version is 5.3

Suki

Did you get any errors during install?  is there any error on your error log?  whats the url you're trying to embed or the urls. do they get converted to regular links?
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

STRRAYNGE

no errors whatsoever during install or in error log? Here is one video im trying to post, just to test, and all that shows up is the URL after I submit post.  https://www.youtube.com/watch?v=PTPn8oLKvho

Suki

mmm, I cannot reproduce the error on my server.  Are you sure you have the latest version installed? only version 1.2 has the autoembed feature.

Can you attach your Sources/Subs.php file here.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

STRRAYNGE

I do have the latest version installed. I also checked the code and it has the correct edits in the subs.php. Could aeva media be causing any issues? I looked at the edits for the post.php, and im not finding a single <img> line. There are only 2 lines with an img code in them? One contains this <img><iframe><object><embed><iframe> and the other is under Aeva media changes which contains this <img><object><embed><iframe>? I will try to attach my subs.php on my lunch break.

STRRAYNGE

Im doing some quick checks. Ill report back shortly if I get this figured out or not. Thank you for responding so quickly!!

FemR

Hi suki,

Thanks for such a great mod, been using it for several years  :D

I installed the latest 1.2, updated PHP to 5.3, works good except no auto-embed as mentioned above. What happens is on post preview it will autoembed fine, but once I hit Post it just gets wrapped in URL tag and shows it like a regular link.

I too have Aeva installed as mentioned above, however have its auto-embedding turned off.

Not a huge deal if autoembed doesn't work, wrapping it the old-fashioned way in youtube tag still works fine. I'm on 2.0.2, attaching my subs.php

Suki

It seems the AEVA code interferes and somehow modifies the $message var so when that var gets passed to OYTE_Preparse() the tags has been already changed and so the checks this mod performs fails, easiest and dirtiest thing to do is just move this mod's code above the AEVA code:

On Sources/Subs.php find:


// Aeva Media changes
if (empty($parse_tags) && empty($context['uninstalling']))
{
global $sourcedir;

if (stripos($message, '[smg') !== false)
{
if (!function_exists('aeva_protect_bbc'))
require_once($sourcedir . '/Aeva-Subs.php');
aeva_protect_bbc($message);
}

// Protect noembed & autolink items from embedding *before* BBC parsing - wrap quotes, but don't protect
if (!empty($modSettings['aeva_enable']) && strlen($message) > 15)
{
if (!function_exists('aeva_preprotect'))
require_once($sourcedir . '/Aeva-Embed.php');
aeva_preprotect($message, $cache_id);
}
}
// End Aeva Media changes

// Ohara youtube embed
$message = OYTE_Preparse($message);


and replace with:



// Ohara youtube embed
$message = OYTE_Preparse($message);

// Aeva Media changes
if (empty($parse_tags) && empty($context['uninstalling']))
{
global $sourcedir;

if (stripos($message, '[smg') !== false)
{
if (!function_exists('aeva_protect_bbc'))
require_once($sourcedir . '/Aeva-Subs.php');
aeva_protect_bbc($message);
}

// Protect noembed & autolink items from embedding *before* BBC parsing - wrap quotes, but don't protect
if (!empty($modSettings['aeva_enable']) && strlen($message) > 15)
{
if (!function_exists('aeva_preprotect'))
require_once($sourcedir . '/Aeva-Embed.php');
aeva_preprotect($message, $cache_id);
}
}
// End Aeva Media changes



And I still don't think thats gonna solve the issue, I haven't installed AEVA in years so I don't know how exactly that mod works, just looking at the code, the call to aeva_preprotect($message, $cache_id); is the responsible for changing the message, appliying this code's changes before calling that function may r may not work, it all depends on what exactly aeva_preprotect($message, $cache_id);  does.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

synewave

Hi,

I've installed and used this mod successfully on an SMF board I use for testing on a standard hosting account.

The forum I want to use it on is hosted by my friend's company and I am having issues. I don't have the standard cPanel. I have previously had issues with Wordpress re: not being able to update automatically or install plugins.

-------------------------------------------------------------------

I'M NOT SURE THIS IS THE ROOT ISSUE

Initially I installed the mod but didn't read the instructions properly and didn't check "Install in Other Themes".

(First time, the installation failed. I created a ./Packages/temp directory and chmod to 777, then it seemed to install okay. However I did not have the - Admin->Configuration->Modifications options nor the Youtube button in posts.)

So I have been trying to uninstall the mod so I can try to re-install it correctly (although I am not convinced this will solve my issue)...but I am getting this error:



I tried chmod to 777 on the files ./Sources/Post.php and ./Sources/Subs.php but I still get the same error.

-------------------------------------------------------------------

Any tips?



SMF Package   SMF 2.0.7   SMF 2.0.7
Sources   2.0.7   2.0.7
Default Templates   2.0.7   2.0.7
Language Files   2.0.7   2.0.4

Advertisement: