Advertisement:

Author Topic: Ohara YouTube Embed  (Read 199320 times)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,870
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #640 on: February 24, 2017, 02:35:13 PM »
What's to test? It flat out will break because everything about this mod relies on features that only exist in PHP 5.3 and up.

Since the only way to install the mod is to go through the hook file, and the hook file tests that you're on 5.3+, how do you end up breaking your installation except by choosing to ignore a warning that was put there for a good reason?
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 Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,471
Re: Ohara YouTube Embed
« Reply #641 on: February 24, 2017, 02:37:56 PM »
how do you end up breaking your installation except by choosing to ignore a warning that was put there for a good reason?

changing hosts, moving to one with a lower php version and just move your files/database over to the new host where you dont need to run the installer as it was already run before the files were copied over.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,870
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #642 on: February 24, 2017, 02:38:36 PM »
How do you end up with a host that has a version of PHP that is nearly 10 years old?
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 shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,522
    • sbulen on GitHub
Re: Ohara YouTube Embed
« Reply #643 on: February 24, 2017, 04:00:08 PM »
I bet they're like my host:  default to an old version, but upgrading is at your discretion.   I bet a scan thru cpanel would be in order.
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline Ninja ZX-10RR

  • SMF Hero
  • ******
  • Posts: 2,152
  • Gender: Male
  • Sniper Legends
    • Flavio93Zena on Facebook
    • Virtual Interactive Games Entertainment Forum
Re: Ohara YouTube Embed
« Reply #644 on: February 25, 2017, 01:52:07 AM »
How do you end up with a host that has a version of PHP that is nearly 10 years old?
Possibly most of them, if not all, considering people can't be bothered to follow php insane development speeds, having to rewrite their softwares every 2 years. If you are, smf 2.1 is on GitHub, feel free to go ahead and recode it to be php 7.0+ compatible :) (and no don't ask me to do so myself, I couldn't, whereas you could).

The answers got me laughing though, thanks for that ;D

@shawnb61 exactly. The one time I got defaulted to php 7.0 while moving a forum it took me a while to figure out why repair settings was acting as if it were smf 1.1 instead of 2.0 :P
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.
♥ Jess ♥

STOP EDITING MY PROFILE

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,870
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #645 on: February 25, 2017, 04:20:15 AM »
Quote
follow php insane development speeds, having to rewrite their softwares every 2 years.

Sorry, but that's BS.

5.3 had very few backwards incompatible issues and debuted in 2009. We're now 8 years on from that.

In fact, let me give you some history. 5.0 debuted in July 2004. 5.3 debuted in 2009. SMF 2.0 final was 2011. And a lot of time was spent during 2010 and 2011 making sure that SMF worked on older versions because we knew at the time that hosts weren't upgrading. We knew that even though PHP 4.4 was end of life in 2007, hosts were still using it.

In this case we're talking about PHP 5.2, a version that came out the same year SMF 1.1.0 did, in 2006. It stopped receiving support in 2011, the same year SMF 2.0.0 came out. We're now in 2017, and hosts are still using 5.2, even though there is virtually no pain in upgrading? (Unlike 4.x to 5.x where there can be significant pain)

This isn't insane. This is reasonable, because you can't manage infinite versions of things even with a team the size of the core PHP dev team.

There are notable changes in 5.3, 5.4, 5.5 and 7.0 that could have but did not significantly affect SMF users.

5.3's introduction of closures is a big deal in terms of programming. Fun fact: SMF is going to have to move to 5.3+ at some point (2.1 already has) because proposed changes for PHP 7.2 will force it to redo how bbcodes work under the hood because closures are a good thing and replace the old lambda function generator which was a hack from the start.

Mods that want to take advantage of this should do - it's been around for 8 years, and heck, even 5.3 isn't supported any more.

5.4 introduced lazy array syntax, so that instead of writing array(1, 2, 3), you could just write [1, 2, 3] which is a good thing. But it will break if you try to use it before PHP 5.4. Good news, PHP 5.4 has been around since 2012 and stopped being supported in 2015, so it's already outside of its end of life phase.

5.5 introduced a number of changes that are all about making PHP better internally, and they do so by phasing out things that shouldn't be used, like the preg-replace thing. It was something that should never have been introduced in the first place, it was far too easy to do something stupid with. And SMF adapted because it had to, which is the correct thing. (When SMF first wrote that code, the 5.5 way didn't exist.)

7's changes, everyone is moaning about them but I doubt anyone understands why the MySQL thing is a thing. It's about making trips to the database faster and use less memory. And it was set up by earlier versions of PHP, too. Because they didn't just remove it from PHP without any warning. We knew in advance what they were going to do because in 5.6 it issues warnings to you that the feature is going away.

But 'recoding' every couple of years? Only if you're doing it wrong. Using techniques that have been around for 5-8 years isn't a problem, the only problem are the hosts running known-insecure versions of PHP on their servers.
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 shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 1,522
    • sbulen on GitHub
Re: Ohara YouTube Embed
« Reply #646 on: February 25, 2017, 10:40:03 AM »
Most admins don't know to look...   

I consider myself reasonably savvy, and I only looked when I couldn't get a mod to work.   Early 2016 and we were defaulting to 5.2! 

I found an applet on cpanel, and changed it.   I bet many folks similarly have it under their control, and just don't know it...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline OCJ

  • Full Member
  • ***
  • Posts: 494
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #647 on: February 25, 2017, 12:54:30 PM »
Bluehost .... and Im sure I saw it advertised here on SMF (though it could've been a google ad). Other cheap hosts are doing the same.
As the club members would prefer to pay absolutely 0 - nothing, but expect their own website and tons of features, I have no choice but to use cheap hosting.


Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,870
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #648 on: February 25, 2017, 01:03:37 PM »
Bluehost support modern versions of PHP just fine - their knowledge base says they support everything from 5.4 to 7, all of which cover this case off.

Still not sure where the problem is.

Oh, and if PHP 5.3 is a problem, don't upgrade to SMF 2.1, that has a minimum of 5.3.8.
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 OCJ

  • Full Member
  • ***
  • Posts: 494
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #649 on: February 26, 2017, 11:47:06 AM »
Well, as soon as I changed the php version in the htaccess file to the required version, the problem went away. Nothing else was changed.
I remember last year I had similar trouble on ipage cheapest hosting plans (other software). I didn't expect it on Bluehost but it happened.

Just to confirm that, I just ran a php check from the browser.

Current PHP version: 5.4.43 (set to 5.4 in htaccess file)

Renamed htaccess file, cleaned the cache and ran the script again....

Current PHP version: 5.2.17

Thats Bluehost.


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 #650 on: March 12, 2017, 02:58:07 PM »
A new version has been released:

1.2.9 - March 12, 2017
- Fix the "/>" appearing on autoembed
- Fix support for gifv
- Add a link to the video if JavaScript is disabled


To upgrade just uninstall any previous version and install the new one and don't forget to check the "Install in Other Themes" checkboxes for all your installed themes.
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 kaesekopf

  • Newbie
  • *
  • Posts: 1
Re: Ohara YouTube Embed
« Reply #651 on: March 23, 2017, 04:16:23 AM »
Howdy!
This mod is great, and I've found it's very popular at my forum.

However, is there a way to embed the text/title of the video on the embedded screenshot (before someone hits play)?

Example screenshot of current YouTube display:


Desired screenshot:


ETA:  Is this the jQuery issue you mentioned back in 2015
« Last Edit: March 23, 2017, 04:46:16 AM by kaesekopf »

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 #652 on: March 25, 2017, 11:30:59 AM »
It has been requested before and I added it to this mod version for SMF 2.1 heres an example of how it would look, not the same forum engine but I used the same code this mod uses so the result is the same. Unfortunately, I forgot why exactly I didn't backport it to version 1.2.x which is the one compatible with SMF 2.0.x

I don't know what you mean by

Quote
ETA:  Is this the jQuery issue you mentioned back in 2015?

Th jquery $ issue has nothing to do with been able to show the video's title.
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 MULITRI

  • Semi-Newbie
  • *
  • Posts: 74
Re: Ohara YouTube Embed
« Reply #653 on: March 25, 2017, 05:58:17 PM »
Hello,

I really loved this Mod, and installed it without any problem, however i had the same problem that the user luckse asked to be solved,

http://www.simplemachines.org/community/index.php?topic=462968.msg3879825#msg3879825

But after read the whole topic, it seems the solution was not posted and his question lost.

Unfortunately i had to uninstall it, but i will be in touch with this thread in the case one day could be solved.

Thanks for your work... Regards.

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 #654 on: March 25, 2017, 06:24:05 PM »
I can't fix something I cannot reproduce. I asked for more details and got no response.
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 Doug Spinster

  • Newbie
  • *
  • Posts: 1
Re: Ohara YouTube Embed
« Reply #655 on: March 27, 2017, 11:37:11 AM »
I am not sure where to put the files from the download. I am using Go Daddy. Sorry about being a newb, I am not much of a coder. I do understand some things.

Thanks

Offline FragaCampos

  • Sophist Member
  • *****
  • Posts: 1,306
  • Gender: Male
    • docsPT
Re: Ohara YouTube Embed
« Reply #656 on: March 28, 2017, 08:42:29 PM »
Just use the admin panel's package manager. It's very simple.
More info here:
http://wiki.simplemachines.org/smf/SMF2.0:Package_manager


I am not sure where to put the files from the download. I am using Go Daddy. Sorry about being a newb, I am not much of a coder. I do understand some things.

Thanks

Offline jsx

  • Jr. Member
  • **
  • Posts: 355
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #657 on: May 16, 2017, 05:44:56 AM »
I’m lacking the option in this modification, thanks to which it is possible to set place of film because originally is imposed showing film in the middle.

I’m lacking in this modification showing the title right on the top of film before turn it on. Such like this is in the Yet Another YouTube BBCode Tag modification.

I’m lacking the option, thanks to which it is possible to turn off the vimeo and imgur tag. Should be choice.

I think that taking the example from the other modification isn't bad.

Is there a chance of adding these suggestions to the modification?
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Ohara YouTube Embed
« Reply #658 on: May 16, 2017, 09:02:56 AM »
What's the point of making two mods do the same things?
Online Manual

Please do not PM me for support.

Offline Gluz

  • Sr. Member
  • ****
  • Posts: 985
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #659 on: May 16, 2017, 04:51:18 PM »
I’m lacking the option in this modification, thanks to which it is possible to set place of film because originally is imposed showing film in the middle.
That can be done adding in your index.css:
Code: [Select]
.oharaEmbed{
    display: inline-block;
}
Then, it will behave like any text, and you can add the alignment BBCodes to put the video in the left, center or right side.

I’m lacking the option, thanks to which it is possible to turn off the vimeo and imgur tag. Should be choice.
That is in the Admin Panel > Post Settings > BBC. Here you can choose what BBCodes to turn OFF.

I’m lacking in this modification showing the title right on the top of film before turn it on. Such like this is in the Yet Another YouTube BBCode Tag modification.

I think that taking the example from the other modification isn't bad.
I can argue that I installed this because that other MODs didn't do the thing well for me, so having this doing the same as the others means that will cause that this MOD also didn't work well (aesthetically) for me. The variety of doing the same but not looking exactly the same is why some MODs are similar but still each one have different uses.
Need help with PHP, HTML, CSS, Themes or MODs?

Quote
Think in spanish, habla en inglés.