Can YOUTUBE Tags Be Automatically Converted to MEDIA Tags?

  • Thread starter Thread starter A.T.
  • Start date Start date
Join the discussion
Registration is free. Start your own thread to ask a follow-up.
20 replies · 3K views
Science Advisor
Messages
13,453
Reaction score
4,334
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".
 
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.
 
Greg Bernhardt said:
btw, I really messed up the old youtube bbcode conversion.

Oops, you did :)
 
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   Reactions: Greg Bernhardt
Can I help? Or is this beyond help? (save the kittehs)
 
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.
 
Evo said:
You poor thing.

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

Or am I wrong, Greg?
 
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   Reactions: DataGG
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!
 
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: