Go Back   Freethought Forum > Public Works > Forum Administration

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2016, 02:48 AM
Kyuss Apollo's Avatar
Kyuss Apollo Kyuss Apollo is offline
happy now, Mussolini?
 
Join Date: May 2006
Location: location, location
Posts: VMCCCXI
Blog Entries: 7
Images: 17
Default What's with the Youtubes

When I get to a post with an embedded YouTube video, it's all white with a black bar on the left (see screenshot). No video there to play but the link in the video header will still take me to YouTube and play it there. I reset Chrome last night just incase it was me, but it is still doing it.

What up with that? Is this happening to anyone else?
Attached Images
File Type: png busted utubes.png (31.4 KB, 7 views)
__________________
This week's track: MINUTEMEN - History Lesson Part II



Reply With Quote
Thanks, from:
ceptimus (08-16-2016), erimir (08-16-2016), Janet (08-20-2016), slimshady2357 (08-16-2016), SR71 (08-16-2016), Stormlight (08-16-2016), The Man (08-18-2016)
  #2  
Old 08-16-2016, 05:24 AM
Angakuk's Avatar
Angakuk Angakuk is offline
NeoTillichian Hierophant & Partisan Hack
 
Join Date: Dec 2005
Location: Iowa
Gender: Male
Posts: MXCCCLXXXIII
Default Re: What's with the Youtubes

:sadyup:
__________________
Old Pain In The Ass says: I am on a mission from God to comfort the afflicted and afflict the comfortable; to bring faith to the doubtful and doubt to the faithful. :shakebible:
Reply With Quote
Thanks, from:
Janet (08-20-2016), slimshady2357 (08-16-2016), Stormlight (08-16-2016), The Man (08-18-2016)
  #3  
Old 08-16-2016, 11:23 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXVIII
Images: 28
Default Re: What's with the Youtubes

YouTube updated the swf file that their (deprecated) Flash API uses.

The iframe method of embedding still works but is only open to members in the html group.

Really it needs one of our admins to change the code that the youtube tag generates so that it produces the iframe code rather than the object code.

The object code looks like:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/...

The iframe code looks like:
<iframe width="425" height="350" src="https://www.youtube.com/embed/...

Here's YouTube's guidlines for developers on this topic

It's all to do with the phasing out of Flash. :blame: Adobe

Testing that the iframe code really does still work...

__________________

Last edited by ceptimus; 08-16-2016 at 11:34 AM.
Reply With Quote
Thanks, from:
Crumb (08-16-2016), Ensign Steve (08-16-2016), Janet (08-20-2016), JoeP (08-16-2016), lisarea (08-16-2016), SharonDee (08-18-2016), Sock Puppet (08-28-2016), SR71 (08-16-2016), Stormlight (08-16-2016), The Man (08-18-2016), Watser? (08-18-2016)
  #4  
Old 08-16-2016, 01:52 PM
Stormlight's Avatar
Stormlight Stormlight is offline
Quality Contributor
 
Join Date: Jun 2005
Location: Luxembourg
Gender: Male
Posts: XLVDXII
Images: 92
Default Re: What's with the Youtubes

:blame:vm!
:blame: livius!

:mob:
__________________
Reply With Quote
Thanks, from:
BrotherMan (08-16-2016), ceptimus (08-16-2016), Crumb (08-16-2016), curses (08-16-2016), Janet (08-20-2016), JoeP (08-16-2016), Kyuss Apollo (08-16-2016), Sock Puppet (08-28-2016), SR71 (08-16-2016), The Man (08-18-2016), Watser? (08-18-2016)
  #5  
Old 08-16-2016, 02:39 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Quote:
Originally Posted by ceptimus View Post
Testing that the iframe code really does still work...

At least at the moment for me this thinks for a while and then errors out.
error in a tentative manner.png
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (08-16-2016), Janet (08-20-2016), The Man (08-18-2016)
  #6  
Old 08-16-2016, 02:42 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Testes.

__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
Janet (08-20-2016), The Man (08-18-2016)
  #7  
Old 08-16-2016, 02:44 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

OK that works. :cheer:

Actually the old object bbcode is still working for me - :firefox: on :penguin:
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
Janet (08-20-2016), The Man (08-18-2016)
  #8  
Old 08-16-2016, 03:40 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXVIII
Images: 28
Default Re: What's with the Youtubes

Quote:
Originally Posted by JoeP View Post
At least at the moment for me this thinks for a while and then errors out.
All the ones on this page (obviously not including the .png image captured by K A) are working okay for me - this in FireFox and Edge browsers from Windows and on an Android phone.
__________________
Reply With Quote
  #9  
Old 08-18-2016, 04:16 AM
viscousmemories's Avatar
viscousmemories viscousmemories is offline
Admin
 
Join Date: Apr 2004
Location: Ypsilanti, Mi
Gender: Male
Posts: XXXDCCXLVII
Blog Entries: 1
Images: 9
Default Re: What's with the Youtubes

We use the AME - Auto Media Embedding plugin to embed YouTube URLs. It is configurable via the admin control panel. Here's what it's doing currently:

Find:

Code:
[http://]*[a-z]*?[.]?youtube.[a-z]*?/watch?v=([A-Z0-9._%-]*)[&w;=+_-]*
...and replace with:

HTML Code:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/"></param><embed src="http://www.youtube.com/v/" type="application/x-shockwave-flash" width="425" height="350" wmode="transparent"></embed></object>
Can y'all tell me exactly what to put in place of the current replacement code?
Reply With Quote
Thanks, from:
ceptimus (08-18-2016), Crumb (08-18-2016), Ensign Steve (08-19-2016), Janet (08-20-2016), JoeP (08-18-2016), Kyuss Apollo (08-18-2016), mickthinks (08-18-2016), Sock Puppet (08-28-2016), Stormlight (08-18-2016), The Man (08-18-2016)
  #10  
Old 08-18-2016, 10:41 AM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Ooh ooh ooh

First - edit the search string to
Code:
[http://]*[https://]*[a-z]*?[.]?youtube.[a-z]*?/watch?v=([A-Z0-9._%-]*)[&w;=+_-]*
That will address an unrelated niggle that's tripped up many an :ff:er

Then - make the replacement text
HTML Code:
<iframe width="425" height="350" src="https://www.youtube.com/embed/CHICKENBUTT" frameborder="2" allowfullscreen></iframe>
where CHICKENBUTT is whatever comes after '/v/' in the current setting which I believe vb has failed to include in your post. Probably backslash 1 or dollar 1 or ampersand 1.

It wouldn't be a bad idea to wait for ceptimus to check this out - and/or test it on the test board if that's still up.
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
ceptimus (08-18-2016), Crumb (08-18-2016), Ensign Steve (08-19-2016), Janet (08-20-2016), Kyuss Apollo (08-18-2016), Sock Puppet (08-28-2016), The Man (08-18-2016), viscousmemories (08-24-2016)
  #11  
Old 08-18-2016, 05:12 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXVIII
Images: 28
Default Re: What's with the Youtubes

Looks good to me Joe! But my method of debugging is always to suck it and see! :) I figure there's no point staring at a line of code for ages looking for possible bugs when there might not be any bugs to find. Far easier to try it and only search for bugs if and when it doesn't work. :)

Oh, also Youtube sometimes gives a share link where it's not youtube.com but youtu.be and there may be other variants... I've not looked into it enough to know if YouTube or some third party have come up with a RegEx that matches all the various possibilities.

Some other forums I use don't attempt to auto-parse youtube links but instead have a tag like {youtube} {/youtube} or {yt} {/yt} and you just paste the magic letters from the Youtube link into those tags rather than paste the whole link. Didn't we used to have something like that? Testing...

[youtube]G3qfW3ydZuY[/youtube]

[youtube=G3qfW3ydZuY]Cool microglider![/youtube]

[yt]G3qfW3ydZuY[/yt]

[ytube]G3qfW3ydZuY[/ytube]

Edit: I searched a bit and found that the [youtube] tag was a new thing at one time: New Features List - Freethought Forum but I suppose it was removed when this new auto-parser thing was installed.
__________________

Last edited by ceptimus; 08-18-2016 at 08:30 PM.
Reply With Quote
Thanks, from:
Crumb (08-18-2016), Ensign Steve (08-19-2016), Janet (08-20-2016), JoeP (08-18-2016), Kyuss Apollo (08-18-2016), Stormlight (08-19-2016), The Man (08-18-2016), viscousmemories (08-24-2016)
  #12  
Old 08-21-2016, 03:36 PM
MonCapitan2002's Avatar
MonCapitan2002 MonCapitan2002 is offline
Servant of the Dark Lord
 
Join Date: Jan 2005
Gender: Bender
Posts: VMMMCXCIX
Blog Entries: 12
Images: 1
Default Re: What's with the Youtubes

Quote:
Originally Posted by ceptimus View Post
YouTube updated the swf file that their (deprecated) Flash API uses.

The iframe method of embedding still works but is only open to members in the html group.

Really it needs one of our admins to change the code that the youtube tag generates so that it produces the iframe code rather than the object code.

The object code looks like:
<object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/...

The iframe code looks like:
<iframe width="425" height="350" src="https://www.youtube.com/embed/...

Here's YouTube's guidlines for developers on this topic

It's all to do with the phasing out of Flash. :blame: Adobe

Testing that the iframe code really does still work...

Why are they phasing out Flash and why is it Abode's fault? I know they're the ones who maintain and develop new versions of Flash, but that's the extent of my knowledge.
__________________

Allan Glenn. 1984-2005 RIP
:countsheep::countsheep::countsheep::countsheep::countsheep::countsheep::countsheep::countsheep::countsheep::countsheep::countsheep:
Under no circumstances should Quentin Tarantino be allowed to befoul Star Trek.
Reply With Quote
Thanks, from:
Janet (08-31-2016)
  #13  
Old 08-21-2016, 06:37 PM
lisarea's Avatar
lisarea lisarea is offline
Solitary, poor, nasty, brutish, and short
 
Join Date: Jul 2004
Posts: XVMMMDCXLII
Blog Entries: 1
Images: 3
Default Re: What's with the Youtubes

Flash is proprietary standard, owned by Adobe. It's always been sketchy to implement, and unavailable on platforms that don't explicitly support it, for one thing. It's also really vulnerable to attacks, and there was a while a bit ago when it was just one exploit after another, where a lot of people, including me, decided it just wasn't worth it anymore. Especially now that HTML5 can pretty much replace its main functionality using an open source, accessible standard, so if there is any good reason for anyone to still be using Flash instead, I don't know what it is.

It's also been used for and become associated with some of the things that people hate the most about the web: Intrusive, unskippable content, including but not limited to ads, and slow-loading, unnecessarily bloated websites throwing up obstacles between you and the content you're looking for. Opaque, unscalable, platform dependent content that can't be repurposed or reused and that only displays properly on systems that have specific, closed source software installed. It's also totally unusable with screenreaders and noncompliant with any even remotely useful usability standards I've ever seen. It's kind of the opposite of what the web is supposed to be.

Once upon a time, I'd designed a new website for a company I was working for, and we were looking for someone to just finish coding it using my framework and specs. They ran an ad looking for "web developers," and HR wasn't specific enough I guess about what we needed, so we ended up with a bunch of kids straight out of vocational school, and there were a ton of them who apparently only knew Flash. They couldn't even write basic HTML, but they were answering ads for web developers. So I personally started equating Flash with personal idiocy as well, but that's probably not quite as common a sentiment.
Reply With Quote
Thanks, from:
ceptimus (08-21-2016), Crumb (08-22-2016), Ensign Steve (08-24-2016), Janet (08-31-2016), JoeP (08-21-2016), Pan Narrans (08-21-2016), slimshady2357 (08-21-2016), Sock Puppet (08-28-2016), Stormlight (08-22-2016), The Man (08-22-2016), viscousmemories (08-24-2016)
  #14  
Old 08-24-2016, 01:02 PM
viscousmemories's Avatar
viscousmemories viscousmemories is offline
Admin
 
Join Date: Apr 2004
Location: Ypsilanti, Mi
Gender: Male
Posts: XXXDCCXLVII
Blog Entries: 1
Images: 9
Default Re: What's with the Youtubes

Ok, sorry, new information.

The regex/replace text in my first post came from the plugin install code, but I found a place to configure the plugin within the admin gui and here's the code that's in there now:

Find:
Code:
[http://]*[a-z]*?[.]?video.yahoo.com/video/play?vid=([w%]+)[&w;=+_-/]*
Replace with:

HTML Code:
<embed src='' flashvars='' type='application/x-shockwave-flash' width='425' height='350' wmode="transparent"></embed>
Apparently $p1 and $p2 (that are in between the src and flashvars ticks but won't show up no matter what bbcode I use) are "backreferences" to the regex but I don't know what that means.
Reply With Quote
  #15  
Old 08-24-2016, 01:17 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Quote:
Originally Posted by viscousmemories View Post
Ok, sorry, new information.

The regex/replace text in my first post came from the plugin install code, but I found a place to configure the plugin within the admin gui and here's the code that's in there now:

Find:
Code:
[http://]*[a-z]*?[.]?video.yahoo.com/video/play?vid=([w%]+)[&w;=+_-/]*
Replace with:

Code:
<embed src='' flashvars='' type='application/x-shockwave-flash' width='425' height='350' wmode="transparent"></embed>
Apparently and (that are in between the src and flashvars ticks but won't show up no matter what bbcode I use) are "backreferences" to the regex but I don't know what that means.
Quoting to see if I can fix it.
Unticking 'automatically parse links' and 'automatically embed media AND changing < to & lt ; etc helps a bit.
Pasting screenshots would still be easier :brooding:
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #16  
Old 08-24-2016, 01:21 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Anyway that's for Yahoo videos. There must still be a thing for Youtoob?
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #17  
Old 08-24-2016, 01:22 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Quote:
Originally Posted by viscousmemories View Post
Apparently and (that are in between the src and flashvars ticks but won't show up no matter what bbcode I use) are "backreferences" to the regex but I don't know what that means.
:pointlaugh:

They are references back to the regex.

Specifically to the bits between ( parentheses ) aka "capture groups".
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
  #18  
Old 08-25-2016, 02:25 AM
viscousmemories's Avatar
viscousmemories viscousmemories is offline
Admin
 
Join Date: Apr 2004
Location: Ypsilanti, Mi
Gender: Male
Posts: XXXDCCXLVII
Blog Entries: 1
Images: 9
Default Re: What's with the Youtubes

Good god it's amazing I can feed myself.

Okay screenshot it is, and for the correct video provider this time.

Screen Shot 2016-08-24 at 8.23.08 PM.png
Reply With Quote
Thanks, from:
ceptimus (08-25-2016), Janet (08-31-2016), JoeP (08-25-2016), Stormlight (08-25-2016)
  #19  
Old 08-25-2016, 09:32 AM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXVIII
Images: 28
Default Re: What's with the Youtubes

The $p1 is the first parameter recognized by the regex. $p2 would be the second parameter and so on - but in that screenshot you posted, only $p1 is used.

The $p1 parameter extracts the 'magic code' you see in a YouTube link. For example in this link:

https://youtu.be/z2GAmkradW8

the magic code is z2GAmkradW8 and in this iframe embed

<iframe width="420" height="315" src="https://www.youtube.com/embed/1LaCb0iEcOo" frameborder="0" allowfullscreen></iframe>

the magic code is 1LaCb0iEcOo

Note that the regex you posted wouldn't find the youtu.be link - it's only searching for the ones that have youtube.something

I think it's easier and probably better to go back to the old method where we ask the poster to manually cut and paste the magic code into a tag like

{youtube}magic code{/youtube} (except with square brackets instead of curly braces)

The tag code can then always use the iframe method - it doesn't matter whether the original link was youtu.be or youtube.com or something else - once you have the magic code you can always substitute it into the youtube.com iframe version.

To demonstrate I'll post he iframe method below (using youtube.com) for both the examples above and they should both work even though the first one originally was a youtu.be link. I can do this because I'm in the html group but once you've made (re-enabled ?) the tag it will work for everyone.





Quote this post to see how I did it. I used a couple of tricks with html entities to substitute some of the < / and . characters to stop the existing broken auto-parser mangling my post - but with the visible post and the quoted version you can see all that's needed.
__________________

Last edited by ceptimus; 08-25-2016 at 09:54 AM.
Reply With Quote
Thanks, from:
Ensign Steve (08-26-2016)
  #20  
Old 08-25-2016, 10:46 AM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

Quote:
Originally Posted by ceptimus View Post
Note that the regex you posted wouldn't find the youtu.be link - it's only searching for the ones that have youtube.something

I think it's easier and probably better to go back to the old method where we ask the poster to manually cut and paste the magic code into a tag like

{youtube}magic code{/youtube} (except with square brackets instead of curly braces)
Nothing is harder than getting a bunch of people (users...) to change their behaviour. :wink: Why not do both?

We could do the auto substitution with
Code:
[http://]*[https://]*(?:[a-z]*?[.]?youtube.[a-z]*|youtu.be)?/watch?v=([A-Z0-9._%-]*)[&w;=+_-]*
although this could do with some testing. As a first, safe step, we don't even need to change the 'find' text.
'Replace with' should just be
Code:
<iframe width="420" height="315" src="https://www.youtube.com/embed/$p1" frameborder="0" allowfullscreen></iframe>
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Thanks, from:
Crumb (08-25-2016)
  #21  
Old 08-25-2016, 01:10 PM
testuser's Avatar
testuser testuser is offline
Member
 
Join Date: Jun 2004
Posts: XXXV
Blog Entries: 1
Default Re: What's with the Youtubes

AURORA - Runaway - YouTube
Reply With Quote
  #22  
Old 08-25-2016, 01:10 PM
testuser's Avatar
testuser testuser is offline
Member
 
Join Date: Jun 2004
Posts: XXXV
Blog Entries: 1
Default Re: What's with the Youtubes

Reply With Quote
  #23  
Old 08-25-2016, 04:12 PM
ceptimus's Avatar
ceptimus ceptimus is offline
puzzler
 
Join Date: Aug 2004
Location: UK
Posts: XVMMDCCCXVIII
Images: 28
Default Re: What's with the Youtubes

Was just testing something, but it didn't work.
__________________

Last edited by ceptimus; 08-25-2016 at 09:24 PM.
Reply With Quote
  #24  
Old 08-26-2016, 12:46 PM
viscousmemories's Avatar
viscousmemories viscousmemories is offline
Admin
 
Join Date: Apr 2004
Location: Ypsilanti, Mi
Gender: Male
Posts: XXXDCCXLVII
Blog Entries: 1
Images: 9
Default Re: What's with the Youtubes

Ok, with the limited brainshare I have available for this I changed the regex to accomodate https and the embed code as demonstrated by testuser. Does this solve most of the problem or is there more to do right away?
Reply With Quote
  #25  
Old 08-26-2016, 01:31 PM
JoeP's Avatar
JoeP JoeP is offline
Solipsist
 
Join Date: Jul 2004
Location: Kolmannessa kerroksessa
Gender: Male
Posts: XXXVMMLXXVI
Images: 18
Default Re: What's with the Youtubes

&feature=player_embedded
__________________

:roadrun:
Free thought! Please take one!

:unitedkingdom:   :southafrica:   :unitedkingdom::finland:   :finland:
Reply With Quote
Reply

  Freethought Forum > Public Works > Forum Administration


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

 

All times are GMT +1. The time now is 04:28 AM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Page generated in 0.88709 seconds with 16 queries