Author Topic: Youtube Video Embed  (Read 2562 times)

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Youtube Video Embed
« on: April 22, 2016, 03:01:50 PM »
I've noticed that the Videos are no longer embedded, all used to work fine a few days ago. Youtube's player has changed today so maybe that's causing it?
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0


Offline Badger

  • Permanent Artifact
  • Giga Heavyweight
  • Posts: 6318
  • Rep: 3
  • I wish to be with my people
  • Awards BOTM Winner Donated money for site hosting 2019
    • View Profile
    • Awards
Re: Youtube Video Embed
« Reply #2 on: April 24, 2016, 12:26:38 PM »
I think I have it working now.


You got it working with https links too, and inside quotes, what a legend! Thanks trov.


Would it be possible to auto-spoiler them in quotes, like images already are?
also lol at most toxic guy around calling others out on this sh**
Google Drive with my newer bots

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Youtube Video Embed
« Reply #3 on: April 24, 2016, 12:31:56 PM »
I'll take a look at it and see what I can do.

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Youtube Video Embed
« Reply #4 on: April 24, 2016, 01:16:56 PM »
Thanks, what was the reason why they broke in the first place?(guess some forum settings got changed/updated)
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Youtube Video Embed
« Reply #5 on: April 24, 2016, 02:08:09 PM »
TBH, I'm not quite sure what happened. The SMF plugin that we were using was very old and outdated so I replace it with a plugin that was still being updated. I've actually been meaning to do this for quite some time.

On a side note, I looked into how to change the behavior of embedded videos when they are quoted but it looks like I would have to replace the auto-embedding nature of them and make it so that you needed to wrap the URL in a bbcode (something like [video]VIDEO_URL[/video]) for the link to embed. Are you guys alright with this? Personally, I think it would be better but it would also be more work for me. I've already tweaked the plugin once so, either way, I'm going to have to manually update the plugin whenever there is an update.

Offline R01

  • Heavyweight
  • Posts: 769
  • Rep: 1
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: Youtube Video Embed
« Reply #6 on: April 24, 2016, 03:03:42 PM »
TBH, I'm not quite sure what happened. The SMF plugin that we were using was very old and outdated so I replace it with a plugin that was still being updated. I've actually been meaning to do this for quite some time.

On a side note, I looked into how to change the behavior of embedded videos when they are quoted but it looks like I would have to replace the auto-embedding nature of them and make it so that you needed to wrap the URL in a bbcode (something like [video]VIDEO_URL[/video]) for the link to embed. Are you guys alright with this? Personally, I think it would be better but it would also be more work for me. I've already tweaked the plugin once so, either way, I'm going to have to manually update the plugin whenever there is an update.
The problem of having bbcode is that all old topics(including the ones of past tournaments, which are locked) would have no embeds anymore. I can definitely see why having bbcode is better, sadly it breaks the reverse compatiblity(unless you have some kind of script which automatically adds the code)
Tournament History:
Showcases:
https://gametechmods.com/forums/index.php?topic=18882.0
https://gametechmods.com/forums/index.php?topic=19197.0

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Re: Youtube Video Embed
« Reply #7 on: April 24, 2016, 07:27:10 PM »
TBH, I'm not quite sure what happened. The SMF plugin that we were using was very old and outdated so I replace it with a plugin that was still being updated. I've actually been meaning to do this for quite some time.

On a side note, I looked into how to change the behavior of embedded videos when they are quoted but it looks like I would have to replace the auto-embedding nature of them and make it so that you needed to wrap the URL in a bbcode (something like [video]VIDEO_URL[/video]) for the link to embed. Are you guys alright with this? Personally, I think it would be better but it would also be more work for me. I've already tweaked the plugin once so, either way, I'm going to have to manually update the plugin whenever there is an update.
The problem of having bbcode is that all old topics(including the ones of past tournaments, which are locked) would have no embeds anymore. I can definitely see why having bbcode is better, sadly it breaks the reverse compatiblity(unless you have some kind of script which automatically adds the code)
Since I'm the webmaster of GTM, I can perform operations on the database itself instead of manually going into old threads just to add the new tags. The easiest way of fixing this would be to perform a mysqldump on the database to get a single file representing the entire forum, open it up in Notepad++, use a regular expression to add the bbcode around all video links, and run mysqlimport to add it back to the database (after deleting everything that is already there). Sadly, I would have to switch the forum into maintenance mode while I did this so that posts wouldn't get lost in the process.