Issue with Youtube BBCode since the forum change

Discussions, suggestions and error reports for the forums and website.
Post Reply
User avatar
Fitzpatrick
Honorary Member
Posts: 470
Joined: 21 Jan 2016 19:34

Issue with Youtube BBCode since the forum change

#1 » Post by Fitzpatrick » 09 Apr 2016 22:51

Since a few weeks ago, when the forums were updated, I've had issues with the BBC YT code.

Using the code {YouTube}{/YouTube} (obviously with brackets instead) and placing the string after "youtu.be/" now occasionally fails to work properly. In the message, there will be the standard banner placed for using the YT code, but clicking the down arrow does nothing, and where the title and description would normally be instead has a filler "Loading...". However, the thumbnail for the youtube video I'm linking still displays properly.

I've double checked that I'm using the correct address string for the video, and I'm certain the video is still posted. I've also tried using Explorer instead of my default Chrome with no success. I've also tried pausing both Adblock and Kaspersky to see if they are the culprit. The code also still works sometimes.

An example: http://www.truewow.org/forum/viewtopic.php?f=35&t=34077

What am I screwing up?
Fitzsimmons / Bibimbap / Fitzpatrick
Image

User avatar
Nyeriah

Re: Issue with Youtube BBCode since the forum change

#2 » Post by Nyeriah » 09 Apr 2016 22:57

Uncaught ReferenceError: $ is not defined
viewtopic.php:568
Uncaught ReferenceError: $ is not defined

562 $.get("https://www.googleapis.com/youtube/v3/v ... MLRwEJLN9M", function(data) {
...

568 $(document).ready(function() {
$(".youtubebbcode_button").off('click').click(function() {
$(this).siblings('.youtubevideo').slideToggle("medium");
$(this).siblings('.youtubevideo').css("display","inline-block");
$(this.parentNode).toggleClass("youtubebbcode_open");
var $iframe = $(this).siblings('.youtubevideo').find("iframe");
if(!$iframe.prop('src').length){
$iframe.prop("src", function(){
...

broken javascript

User avatar
Etro
Honorary Member
Posts: 2558
Joined: 14 Oct 2012 08:24
Location: Behind ccrs

Re: Issue with Youtube BBCode since the forum change

#3 » Post by Etro » 10 Apr 2016 01:43

Fixed, thanks to ccrs. It seems I'm still too much of a noob at js to understand that you need to define stuff before you use it and not after.
"With life, no matter what you do, you are all in. This is going to kill you. Might as well play the most magnificent game you can while you're waiting, because... Do you have anything better to do? Really?"

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest