Advertisement:

Author Topic: Ohara YouTube Embed  (Read 199319 times)

Offline I Use Dial

  • Semi-Newbie
  • *
  • Posts: 15
Re: Ohara YouTube Embed
« Reply #140 on: May 05, 2013, 06:16:53 PM »
It was obviously a smart-ass response, not a real suggestion.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,870
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #141 on: May 05, 2013, 06:24:58 PM »
No, it wasn't a smart-ass response and didn't warrant a smart-ass reply.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline I Use Dial

  • Semi-Newbie
  • *
  • Posts: 15
Re: Ohara YouTube Embed
« Reply #142 on: May 05, 2013, 06:38:16 PM »
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.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,870
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #143 on: May 05, 2013, 06:44:35 PM »
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.

Quote
Also, 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.

Quote
I 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.

Quote
and 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?
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,558
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #144 on: March 05, 2014, 12:49:07 PM »
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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline Shazar

  • Newbie
  • *
  • Posts: 8
Re: Ohara YouTube Embed
« Reply #145 on: March 14, 2014, 05:35:39 PM »
Just installed this on my new forum and it works nicely - thanks!   :D

Offline ktysinger1

  • Newbie
  • *
  • Posts: 2
Re: Ohara YouTube Embed
« Reply #146 on: March 15, 2014, 10:29:37 PM »
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/ [nonactive]$1" allowfullscreen frameborder="0"></iframe>
« Last Edit: March 16, 2014, 12:56:26 AM by ktysinger1 »

Offline kamili34

  • Jr. Member
  • **
  • Posts: 232
  • Gender: Male
  • noob
    • pilarki.org
Re: Ohara YouTube Embed
« Reply #147 on: March 16, 2014, 10:29:11 AM »
How not to center the window of the movie.  I would like on the left side of the post not in center.

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,558
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #148 on: March 16, 2014, 10:40:22 AM »
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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline kamili34

  • Jr. Member
  • **
  • Posts: 232
  • Gender: Male
  • noob
    • pilarki.org
Re: Ohara YouTube Embed
« Reply #149 on: March 16, 2014, 05:34:52 PM »
thanks :)

Offline The QE2 Story Forum

  • Charter Member
  • Jr. Member
  • *
  • Posts: 151
    • The QE2 Story
Re: Ohara YouTube Embed
« Reply #150 on: March 23, 2014, 12:40:14 PM »
Works great on my SMF Forum (2.0.7.) - clean install, first time.

Offline STRRAYNGE

  • Jr. Member
  • **
  • Posts: 119
Re: Ohara YouTube Embed
« Reply #151 on: March 24, 2014, 11:47:20 AM »
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

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,558
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #152 on: March 24, 2014, 12:09:20 PM »
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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline STRRAYNGE

  • Jr. Member
  • **
  • Posts: 119
Re: Ohara YouTube Embed
« Reply #153 on: March 24, 2014, 12:25:18 PM »
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

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,558
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #154 on: March 24, 2014, 01:28:26 PM »
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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline STRRAYNGE

  • Jr. Member
  • **
  • Posts: 119
Re: Ohara YouTube Embed
« Reply #155 on: March 24, 2014, 01:53:50 PM »
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.

Offline STRRAYNGE

  • Jr. Member
  • **
  • Posts: 119
Re: Ohara YouTube Embed
« Reply #156 on: March 24, 2014, 02:06:38 PM »
Im doing some quick checks. Ill report back shortly if I get this figured out or not. Thank you for responding so quickly!!

Offline FemR

  • Semi-Newbie
  • *
  • Posts: 21
  • SMF 2.0.2
Re: Ohara YouTube Embed
« Reply #157 on: April 17, 2014, 07:52:19 AM »
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

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,558
  • Oh, wouldn't it be great if I *was* crazy?
    • MissAllSunday on GitHub
    • SMF mods
Re: Ohara YouTube Embed
« Reply #158 on: April 17, 2014, 12:13:03 PM »
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:

Code: [Select]
// 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:


Code: [Select]
// 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.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline synewave

  • Newbie
  • *
  • Posts: 2
Re: Ohara YouTube Embed
« Reply #159 on: April 18, 2014, 03:12:42 AM »
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