Ohara YouTube Embed

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

Previous topic - Next topic

Arantor

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?

Illori

Quote from: Arantor on February 24, 2017, 02:35:13 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.

Arantor

How do you end up with a host that has a version of PHP that is nearly 10 years old?

shawnb61

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

Ninja ZX-10RR

Quote from: Arantor 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?
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

Arantor

Quotefollow 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.

shawnb61

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

OCJ

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.


Arantor

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.

OCJ

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.


Suki

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.

kaesekopf

#651
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

Suki

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.

MULITRI

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.

Suki

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.

Doug Spinster

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

FragaCampos

Just use the admin panel's package manager. It's very simple.
More info here:
http://wiki.simplemachines.org/smf/SMF2.0:Package_manager


Quote from: Doug Spinster 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

jsx

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?

Steve

What's the point of making two mods do the same things?
DO NOT pm me for support!

Gluz

Quote from: jsgrom 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.
That can be done adding in your index.css:
.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.

Quote from: jsgrom on May 16, 2017, 05:44:56 AM
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.

Quote from: jsgrom on May 16, 2017, 05:44:56 AM
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.

Advertisement: