Can YOUTUBE Tags Be Automatically Converted to MEDIA Tags?

  • Thread starter Thread starter A.T.
  • Start date Start date
AI Thread Summary
The discussion centers on the transition from YOUTUBE tags to MEDIA tags due to the former's ineffectiveness. Users are inquiring about the automatic conversion process and how the system identifies video sources from URLs. It is confirmed that pasting the video URL into the editor allows the system to recognize and convert it into a MEDIA tag. There are challenges in fixing old links, with one user struggling to correct the conversion of YOUTUBE links, indicating a need for careful handling of regular expressions. Overall, the community is actively engaged in resolving these technical issues while ensuring video content remains accessible.
A.T.
Science Advisor
Messages
12,919
Reaction score
3,964
The old YOUTUBE tag is not working anymore. Is it possible to automatically convert all YOUTUBE tags to to MEDIA tags, so the embedded videos in old posts still work?
 
Physics news on Phys.org
As far as I am aware Greg is still not finished with these things. Some of the tags have to be modified, my understanding is that Greg's plan is to modify whole database in one sweep once he is ready.
 
Ok, thanks.

I was also wondering how the software knows which of the now several possible video-sites to use, given that the MEDIA tag only contains the video ID. Is it the length of the ID?
 
Actually I'm pretty sure that if you just put the youtube link in the post the system will recognize it and process it. Tag should not be needed any longer.



Yup, the system automatically converts it into a media tag for you. Just pas the URL in the editor.

fyi, in the next few days I'll be converting all the old tags
 
A.T. said:
I was also wondering how the software knows which of the now several possible video-sites to use, given that the MEDIA tag only contains the video ID.

When you use the "Media" button in the editor, the dialog asks you to enter the URL, not just the video ID. The software apparently then recognizes the site from the URL, and picks out the video ID accordingly. If you quote Greg's post, you'll see that the opening tag for the video says "MEDIA=youtube".
 
Pasting just links:



 
jtbell said:
When you use the "Media" button in the editor, the dialog asks you to enter the URL
That is obvious. I was wondering about manually typing editing the tags. But I got it now. The opening MEDIA-tag has a parameter.
 
btw, I really messed up the old youtube bbcode conversion. It will take me a couple days to fix now. Please remain patient.
 
  • Like
Likes DataGG
Greg Bernhardt said:
btw, I really messed up the old youtube bbcode conversion.

Oops, you did :)
 
  • #10
Well this was a lesson for me. I spent 5 hours on this. I can only fix about half of the youtube links.
 
  • #11
Greg Bernhardt said:
Well this was a lesson for me. I spent 5 hours on this. I can only fix about half of the youtube links.

Fix the half about cats please.
 
  • Like
Likes Greg Bernhardt
  • #12
Can I help? Or is this beyond help? (save the kittehs)
 
  • #13
Evo said:
Can I help? Or is this beyond help? (save the kittehs)
Thanks, but there are thousands to fix. I have to do it by use of regular expressions and that is tricky in this instance.
 
  • #14
fyi, the auto embed will work with videos from: dailymotion, facebook, liveleak, metacafe, vimeo, youtube
 
  • #15
You poor thing.
 
  • #16
Evo said:
You poor thing.

My guess is he made himself poor with some hasty SQL command ;)

Or am I wrong, Greg?
 
  • #17
Borek said:
My guess is he made himself poor with some hasty SQL command ;)

Or am I wrong, Greg?
You are very correct and my first regular expression attempt messed things up further. I'm really surprised I haven't nuked PF yet in 13 years lol. Just kidding guys, I have everything under perfect control :D

edit: actually I think I have had to restore from a backup, but it was a long time ago
 
  • Like
Likes DataGG
  • #18
My latest test was very successful. I think can salvage and convert 80% now. The links with the "feature" querystring are tripping me up
 
  • #19
You need a couple of interns to do the remaining 20% by hand. :D

There's probably a regex that will do it but I probably couldn't figure out. My kung-fu is no good!
 
  • #20
Jimmy said:
You need a couple of interns to do the remaining 20% by hand. :D
Say... what are you up to this weekend... :D
 
  • #21
Greg Bernhardt said:
Jimmy said:
You need a couple of interns to do the remaining 20% by hand. :D
Say... what are you up to this weekend... :D

If you don't mind PF getting nuked then sure... :p
 
Last edited:
Back
Top