Advertisement:

Author Topic: Ohara YouTube Embed  (Read 199301 times)

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 #120 on: April 03, 2013, 02:04:41 PM »
Faulty? because of a missing & and youtube (a third party service) changing url schemas faster than they change their socks?

Faulty because it does not do all the things you need?

Again, please tell me why should I update the code if all I receive is complains about it?

If it is faulty then simply don't use it, build your own mod and release it here so you can get the same complains I got. Code it or STFO.

I built this because I wanted to know how the BBC hook works, this mod was built because of that, for all I know, this mod has fulfilled its purpose already since I know how the BBC hook works now.

Quote
I think you for providing this mod in the first place;

I suppose you wanted to say "thank"?  if so, where exactly did you do this?
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 Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #121 on: April 03, 2013, 02:10:19 PM »
Quote
I built this because I wanted to know how the BBC hook works, this mod was built because of that, for all I know, this mod has fulfilled its purpose already since I know how the BBC hook works now.

Apparently it's wrong to make things just because we want to make them and were nice enough to share. Apparently we're expected to make it more than what we envisioned and wanted because we're just lowly developers who don't know any better.
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 pwhodges

  • Newbie
  • *
  • Posts: 7
Re: Ohara YouTube Embed
« Reply #122 on: April 03, 2013, 03:03:28 PM »
@Suki  Yes - s/think/thank/  I'm doing it now, as you feel the need for it - and it's no less genuine for having been prompted, I assure you.

Faulty?  Yes, once the parameter no longer worked with a current version of PHP.  But, as I said, it's up to you whether or not to keep your mod up to date. 

At no point have I complained that it was faulty, or didn't do what I wanted - when I found these things I did not ask you for anything, but made the corrections myself (imperfectly, but improved for me over the original), and what's more shared what I did for any one else to try or ignore as they please.  I could have published my (now further improved) version, but I chose not to publish a mod that was simply a direct piggy-back off yours.

One difference between me and you (and other around here, it seems) is that in 44 years coding (yes, I am that old), while I like the satisfaction of doing something right, and also the satisfaction of seeing my code used, I have never looked for thanks other than from my employers.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #123 on: April 03, 2013, 03:14:01 PM »
Quote
Faulty?  Yes, once the parameter no longer worked with a current version of PHP.  But, as I said, it's up to you whether or not to keep your mod up to date. 

It's also clear you believe that people who release things should be 'encouraged' to keep it in sync with other changes.

How often do you make something, give it away for free and then have to keep maintaining it because things outside of your control have changed? Do you enjoy this sort of thing if you do?

Quote
One difference between me and you (and other around here, it seems) is that in 44 years coding (yes, I am that old), while I like the satisfaction of doing something right, and also the satisfaction of seeing my code used, I have never looked for thanks other than from my employers.

You have a decade or so on me, then.

The thing is, it's not about 'looking for thanks'. It's simply that releasing a mod is *guaranteed* to give you a lot of people moaning. Even if you turn out a mod that doesn't require maintenance for whatever reason, and just sharing it because you thought it was nice to do (like this mod), you'll still get a wave of unappreciative people *expecting* you to provide whatever changes *they* want and will try to guilt-trip you into making it.

There are plenty of people around here who actually believe that you should be grateful that they're using your work, yes, seriously.
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 pwhodges

  • Newbie
  • *
  • Posts: 7
Re: Ohara YouTube Embed
« Reply #124 on: April 03, 2013, 04:42:12 PM »
Quote
But, as I said, it's up to you whether or not to keep your mod up to date. 

It's also clear you believe that people who release things should be 'encouraged' to keep it in sync with other changes.

Clear?  As I said, and you quoted, I think it's entirely up to you (Suki in this case).  As it happens, on the evidence of this thread adding that one character to this mod would almost certainly have reduced the complaints/demands/etc relating to it.

How often do you make something, give it away for free and then have to keep maintaining it because things outside of your control have changed? Do you enjoy this sort of thing if you do?

Not often.  When I do, it's because I've made something for my own use and published it - and I maintain it as long as I myself need.  I usually ignore suggestions (without comment), unless they are good ideas I can benefit from myself.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #125 on: April 03, 2013, 04:46:34 PM »
Yes... until the next time. And the next time. And the time after that. And the inevitable one after that. As stated, YouTube keeps changing their mind about what they'll accept. And every time they do, there will always be a request to change it in every mod that handles YouTube. So while it's only one character on this occasion, it won't be the next time.

I remember when YT first introduced youtu.be URLs and how many of the mods didn't support it. Some still don't support it properly.
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 #126 on: April 03, 2013, 09:08:00 PM »
@Suki  Yes - s/think/thank/  I'm doing it now, as you feel the need for it - and it's no less genuine for having been prompted, I assure you.

Faulty?  Yes, once the parameter no longer worked with a current version of PHP.  But, as I said, it's up to you whether or not to keep your mod up to date. 

At no point have I complained that it was faulty, or didn't do what I wanted - when I found these things I did not ask you for anything, but made the corrections myself (imperfectly, but improved for me over the original), and what's more shared what I did for any one else to try or ignore as they please.  I could have published my (now further improved) version, but I chose not to publish a mod that was simply a direct piggy-back off yours.

One difference between me and you (and other around here, it seems) is that in 44 years coding (yes, I am that old), while I like the satisfaction of doing something right, and also the satisfaction of seeing my code used, I have never looked for thanks other than from my employers.

Sorry but save to yourself your forced gratitude, I find it really insulting after your very first comment here was to point out my reticent to provide support without even know the backgrounds as to why I made that decision and calling my code faulty because I refuse to add a character to a code that is open source.  I actually added that dammed "&" months ago on the github repo for this mod, but of course you didn't even think of searching for that do you? do I actually need to spoon-feed you the code? do I need to take your hand and guide you like a child?

What does surprise me is that all those years on your back and you still judge people by the first impression... 

Seriously, you don't know me, you don't know how may time I had spent here, providing mods, support, translations, code, etc and all for what? for nothing, well, not entirely nothing, I got complains and people always wanting more and more, I even got some not so nice private messages demanding me to make a completely new version of a mod for free.

I asked the community for help once, to simply test (not asked money, not asked their first born, just asked to use the mod) a free mod that would actually benefit them, guess what I receive? nothing.

I wrote/maintained 26 mods this past 3 years, guess what do I got in return? peoples complains, then I worked my ass off to solve their issues, always with a smile on my face, always willing to help and guess what I got in return? more complains, and then I provide them more support, always with a smile and always willing to help and guess what I got in return? complains. wrong if you do something, wrong if you don't, do people care about you? no they don't, all they want is use you, of course they all get angry if you aren't there for them or if you don't reply to their demands.

After some time, the smile and the willingness slowly started to disappear.

I got 11k post here, 90% of them are actually post providing support, the other 10% posts are rants just like this one ;) what do I got in return? been labeled as drama queen and not been taken seriously or simply been ignored when I have something meaningful (to me of course) to say or act.

So, I would really, really appreciate if you could try and save your judgment/comments about me not providing support for my mods anymore, it is great that you never felt the need to ask for a thank you and in all honestly I don't want you to ever get there, it feels awful. Trust me, when all you receive after 3 years of volunteer work is complains and demands for more free work, you kinda miss the feeling of receiving a simple thank you, it is a shame you cannot see that despite all those years you claim to have.

Funny you mention "employers", I also have employers and let me tell you one thing, all of them have been nothing but kind and grateful to me (I even got some awesome friendships too), even though they don't have to be nice and kind, after all, they paid me, they can yell at me if they want, they are the ones who can demand things from me and I would never ever rant about that, instead, it is the people who always want free stuff the ones who keeps complaining and demanding and acting like me, my time and my skills belongs to them and even get angry if I'm not around at their service.

Lastly, I no longer am in need for a thank you, I learned it will never come, this days I code because I want to code, if people want to use my stuff they can do so, all my code is open source and my github page is publicly available for everyone, I certainly won't spoon-feed anyone anymore, if anyone want something from me then they should work to get it.
« Last Edit: April 03, 2013, 09:28:18 PM by Suki »
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 johnpaul2k2

  • Sr. Member
  • ****
  • Posts: 738
  • Gender: Male
  • Okija amaka
    • Mgbenka
Re: Ohara YouTube Embed
« Reply #127 on: April 05, 2013, 05:26:42 AM »
Care to explain more details then?  simply stating "doesn't work" or "stop working" is not really helpful.

Since you said the only thing that fixes it is reinstalling, I gotta say is not really a bug but its you messing around with your files, removing or changing things this mod needs, if that is the case, simply stopping doing it will solve your problem.
now i know the reason

if you embedded with  "https" , it will not work. except you remove the "s" .making it "http"  only

Offline Oldiesmann

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,872
  • Gender: Male
  • Ask me about the function DB :)
    • oldiesmann on Facebook
    • Oldiesmann on GitHub
    • https://www.linkedin.com/in/michaeleshom on LinkedIn
    • @oldiesmann on Twitter
    • Archie Comics Fan Forum
Re: Ohara YouTube Embed
« Reply #128 on: April 12, 2013, 02:40:17 AM »
For those wanting to support both the "https" and the regular "http" URLs, I was able to get it to work by adding (?:s) after the http  in the regex, so it looks like this:

Code: [Select]
(http(?:s)://(?:www\.)?youtu(?:be\.com/watch\?v=|\.be/)(\w*)(&(amp;)?[\w\?=]*)?)
I think there has to be a ?: in there to make the "http|https" version work as well, but the "(?:s)" is shorter and accomplishes the same thing.
Michael Eshom
Cincy Space - now open!

Offline johnpaul2k2

  • Sr. Member
  • ****
  • Posts: 738
  • Gender: Male
  • Okija amaka
    • Mgbenka
Re: Ohara YouTube Embed
« Reply #129 on: April 13, 2013, 02:01:51 AM »
For those wanting to support both the "https" and the regular "http" URLs, I was able to get it to work by adding (?:s) after the http  in the regex, so it looks like this:

Code: [Select]
(http(?:s)://(?:www\.)?youtu(?:be\.com/watch\?v=|\.be/)(\w*)(&(amp;)?[\w\?=]*)?)
I think there has to be a ?: in there to make the "http|https" version work as well, but the "(?:s)" is shorter and accomplishes the same thing.

where exactly id the file? i mean the place to edit it

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 #130 on: April 19, 2013, 03:37:00 PM »
For those wanting to support both the "https" and the regular "http" URLs, I was able to get it to work by adding (?:s) after the http  in the regex, so it looks like this:

Code: [Select]
(http(?:s)://(?:www\.)?youtu(?:be\.com/watch\?v=|\.be/)(\w*)(&(amp;)?[\w\?=]*)?)
I think there has to be a ?: in there to make the "http|https" version work as well, but the "(?:s)" is shorter and accomplishes the same thing.

Won't work unless you also change the $1 with $2 on this part:  preg_replace($pattern, '$1', $data);

since with your change, $1 holds the "http" thing and not the ID, $2 holds the ID now.

Anyway, the mod has been updated:

1.1 - April 19, 2013,
- Fix the http/https url issue.
- Fixed the parsing smiles after a video issue.
- Fixed the pass by reference issue.
- Updated the regex to include more valid urls.

No support.
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 sangham.net

  • Full Member
  • ***
  • Posts: 497
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #131 on: April 20, 2013, 08:16:13 AM »
Thanks for your great work!

Some members of our board requested to have such possibility and I am really happy that I am able to forward them your work!

Much gratitude!


Offline pwhodges

  • Newbie
  • *
  • Posts: 7
Re: Ohara YouTube Embed
« Reply #132 on: April 21, 2013, 04:02:45 PM »
Thanks for the update - the smiley correction in particular is much appreciated.

One comment: In the regex, you have added an option with ".+&" before the "v=" to allow a parameter before the video ID.  However, in my system this needs to be ".+&" to work.  As I don't know if this is always true, I have used ".+&(?:amp;)?" instead which seems fine.

Oh, and clicking the Admin menu item with this version installed gives me a fatal error:
Quote
Fatal error: Call to undefined function OYTE_Who() in D:\WebPages\SMF-v2\Sources\Who.php on line 731
Uninstalling doesn't clear this, but reinstalling an older version does - I think maybe this is a left-over problem that only occurs if the older version has been previously installed; I guess the uninstall misses something.  Anyway, as a workaround, I just added back the OYTE_Who() function from the older version, and it resolved the issue for me.
« Last Edit: April 22, 2013, 10:13:04 AM by pwhodges »

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 #133 on: April 22, 2013, 10:05:42 AM »
Thanks for the update - the smiley correction in particular is much appreciated.

One comment: In the regex, you have added an option with ".+&" before the "v=" to allow a parameter before the video ID.  However, in my system this needs to be ".+&" to work.  As I don't know if this is always true, I have used ".+&(?:amp;)?" instead which seems fine.

Oh, and clicking the Admin menu item with this version installed gives me a fatal error:
Quote
Fatal error: Call to undefined function OYTE_Who() in D:\WebPages\SMF-v2\Sources\Who.php on line 731
Uninstalling doesn't clear this, but installing an older version does - I think maybe this is a left-over problem that only occurs if the older version has been previously installed.  Anyway, as a workaround, I just added back the OYTE_Who() function from the older version, and it resolved the issue.

Sorry, but from now on I will refrain from having any kind of conversation with you, go ahead and post this on your forum so your members can talk trash about me again :)

Oh, the OYTE_Who() is because you need to uninstall any old version first. Adding that function back does not solve the issue, the only thing it does is repeating my copyright in the credits page.
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 rw012

  • Newbie
  • *
  • Posts: 1
Re: Ohara YouTube Embed
« Reply #134 on: April 23, 2013, 01:41:31 PM »
I have a question.   When I click the youtube icon after installing the latest version on 2.04 , I get these tags:

Code: [Select]
[/youtube][youtube]   rather than 
Code: [Select]
[youtube][/youtube]
Can you give me some suggestions on how to fix that?

Thanks.

Offline johnpaul2k2

  • Sr. Member
  • ****
  • Posts: 738
  • Gender: Male
  • Okija amaka
    • Mgbenka
Re: Ohara YouTube Embed
« Reply #135 on: April 25, 2013, 04:48:44 PM »
For those wanting to support both the "https" and the regular "http" URLs, I was able to get it to work by adding (?:s) after the http  in the regex, so it looks like this:

Code: [Select]
(http(?:s)://(?:www\.)?youtu(?:be\.com/watch\?v=|\.be/)(\w*)(&(amp;)?[\w\?=]*)?)
I think there has to be a ?: in there to make the "http|https" version work as well, but the "(?:s)" is shorter and accomplishes the same thing.

Won't work unless you also change the $1 with $2 on this part:  preg_replace($pattern, '$1', $data);

since with your change, $1 holds the "http" thing and not the ID, $2 holds the ID now.

Anyway, the mod has been updated:

1.1 - April 19, 2013,
- Fix the http/https url issue.
- Fixed the parsing smiles after a video issue.
- Fixed the pass by reference issue.
- Updated the regex to include more valid urls.

No support.


working perfectly ok :D

Offline I Use Dial

  • Semi-Newbie
  • *
  • Posts: 15
Re: Ohara YouTube Embed
« Reply #136 on: May 04, 2013, 02:02:05 PM »
Can someone tell me an easy way to me to inform users of this feature? Like putting
Code: [Select]
[youtube]<YouTube share link>[/youtube] text in the WYSIWYG or bellow the comments box?

Offline sangham.net

  • Full Member
  • ***
  • Posts: 497
  • Gender: Male
Re: Ohara YouTube Embed
« Reply #137 on: May 05, 2013, 12:27:52 PM »
You could send an News-PM to every member including a funny video and make a topic, I Use Dial.

Offline I Use Dial

  • Semi-Newbie
  • *
  • Posts: 15
Re: Ohara YouTube Embed
« Reply #138 on: May 05, 2013, 06:10:06 PM »
Also, you could leave here and never return.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,863
    • StoryBB/StoryBB on GitHub
Re: Ohara YouTube Embed
« Reply #139 on: May 05, 2013, 06:12:53 PM »
Also, you could be a little more respectful of someone offering a suggestion, just because the suggestion doesn't work for you. On some forums it would be quite acceptable to do so.
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.