• Welcome to Simple Machines Community Forum. Please login or sign up.

Yet Another YouTube BBCode Tag

Started by dougiefresh, December 10, 2014, 06:09:01 PM

Previous topic - Next topic

MastoDon

Has this been tested on mobile devices? I'm running a fresh install of SMF 2.0.9 and added this, videos work wonderfully on desktop but results in a blank post on my mobile devices. This affects default theme and modded themes.


dougiefresh

No, I didn't test on a mobile device prior to releasing this mod.  Today, I did use the FireFox app on my Samsung Galaxy S3 to browse my forum at http://www.xptsp.com to look at the few videos that are posted on my forum.  They did show up, even though they didn't play.  Strangely, they didn't play on my desktop version, either....

That having been said, can you send me a link so that I can try using my cellphone?  Thanks!

Walks Tall

With 2.1 Beta1 the BBCode posting icon image is not visible in the editor.

I checked using firebug and I see that a message is there saying failed to open the image file but if I navigate to the image files address it is there.

I have tried finding how to edit this to try to remedy it myself but cannot seem to find it in the css files any where.

Could I be a terrible nuisance and ask you to see if you can verify this on your test site please, thank you so very much for your time and patience.
Therefore thou art inexcusable, O man,
whosoever thou art that judgest: for wherein thou judgest another,
thou condemnest thyself; for thou that judgest doest the same things.

dougiefresh

DOH!!  Verified this bug report!  I dug into the Sources/Subs-Editor.php and found that it's not referring to .gif files anymore, but .png files for bbcodes integrated via hooks.  I'll make the necessary corrections and upload the new version....

dougiefresh

Uploaded v2.3 - May 1st, 2015
o Fixed missing BBCode button in editor for SMF 2.1 Beta 1.
o Fixed a bug where using YouTube ID instead of URL showed error message.

Walks Tall

I must be doing something wrong chap, still not showing using the default style..

It's looking for the right image but still failing to load it, the image is there on the server where it is supposed to be..

For some odd reason the code for the youtube BBCode doesn't look right when checking with firebug, I have no idea what it's telling me so I took a screenshot so you can see what I am talking about.

Attachment 1 shows the image failed
Attachment 2 shows the code not looking right

What could I be doing wrong, any ideas chap!?
Therefore thou art inexcusable, O man,
whosoever thou art that judgest: for wherein thou judgest another,
thou condemnest thyself; for thou that judgest doest the same things.

dougiefresh

Have you tried a forced reload using CTRL-F5?  It may be that the image is cached by the browser and the browser isn't picking up on the fact that the image may have changed.....  Happens plenty of times with CSS files....

Walks Tall

Quote from: dougiefresh on May 02, 2015, 04:42:31 PM
Have you tried a forced reload using CTRL-F5?  It may be that the image is cached by the browser and the browser isn't picking up on the fact that the image may have changed.....  Happens plenty of times with CSS files....

I have tried that, I have also tried uninstalling and re-installing 3 times now but to no avail, I am still seeing the same thing through firebug where the code for the youtube BBCode isn't 'active' for lack of a better term. All the other BBCode code are dark but the youtube BBCode is grey, not entirely sure what that means.
Therefore thou art inexcusable, O man,
whosoever thou art that judgest: for wherein thou judgest another,
thou condemnest thyself; for thou that judgest doest the same things.

savicmi

Does this mod support playlists? According to the description of the mod, it seems to support this, but if I insert a link in the following way

https://www.youtube.com/watch?v=OPf0YbXqDm0&list=PL55713C70BA91BD6E

it will display only one video, not playlist.

Also, full screen button is there, in the lower right corner of the player, but it's not clickable and can not be open full-screen video. How to fix it?

Walks Tall

Quote from: Stogie Dog on May 03, 2015, 02:57:20 AM
Quote from: dougiefresh on May 02, 2015, 04:42:31 PM
Have you tried a forced reload using CTRL-F5?  It may be that the image is cached by the browser and the browser isn't picking up on the fact that the image may have changed.....  Happens plenty of times with CSS files....

I have tried that, I have also tried uninstalling and re-installing 3 times now but to no avail, I am still seeing the same thing through firebug where the code for the youtube BBCode isn't 'active' for lack of a better term. All the other BBCode code are dark but the youtube BBCode is grey, not entirely sure what that means.

Found the problem, oddly the image float bbcode mod was disrupting things, I uninstalled the image float mod and the youtube button shows now then re-installed the image float mod and they show again and the youtube button is there also.

No idea why it should be so but with the float image mod already installed there were problems for this mod but installed the other way around all was well.
Therefore thou art inexcusable, O man,
whosoever thou art that judgest: for wherein thou judgest another,
thou condemnest thyself; for thou that judgest doest the same things.

dougiefresh

That is really weird....  There shouldn't be anything between the mods that should interfere with each other.  I'll look into the issue....

Walks Tall

Quote from: dougiefresh on May 08, 2015, 07:51:01 AM
That is really weird....  There shouldn't be anything between the mods that should interfere with each other.  I'll look into the issue....

Hmmm, it 'seems' to be browser specific Dougie, haven't had time to look into this properly just yet but there seems to be no problem using Google Chrome but the problem persists through FF, not entirely sure what is going on there but when I have time to investigate further I shall be sure to let you know what I find.
Therefore thou art inexcusable, O man,
whosoever thou art that judgest: for wherein thou judgest another,
thou condemnest thyself; for thou that judgest doest the same things.

Sapozhnik

Quote from: dougiefresh on April 14, 2015, 07:30:14 PM
No, I didn't test on a mobile device prior to releasing this mod.  Today, I did use the FireFox app on my Samsung Galaxy S3 to browse my forum at http://www.xptsp.com to look at the few videos that are posted on my forum.  They did show up, even though they didn't play.  Strangely, they didn't play on my desktop version, either....

That having been said, can you send me a link so that I can try using my cellphone?  Thanks!
Hello!

Check video from this link by mobile device: http://new-aveo.com.ua/index.php?topic=484.msg25180#msg25180
I use Chrome and have some problems. When I open page, browser tries to download different files with name of videos and swf extentions. I don't have any problem when I use PC

Sapozhnik

Can't update my last post.

Problem with /v/ in code:
<iframe class="youtube-player" type="text/html" width="640" height="400" src="http://www.youtube.com/v/sKd9VqxrC8I" allowfullscreen frameborder="0"></iframe>
When I change /v/ on /embed/ all works good and I don't have problem on mobile and tab.
<iframe class="youtube-player" type="text/html" width="640" height="400" src="http://www.youtube.com/embed/sKd9VqxrC8I" allowfullscreen frameborder="0"></iframe>

Now I've inserted string str_replace () in the build html string code:
// Build the HTML string that we are going to display to the user:
$data = str_replace("/v/", "/embed/", $data);
$data = '<iframe class="youtube-player" type="text/html" width="' . $width . '" height="' . $height . '" src="' . $data . '" allowfullscreen frameborder="0"></iframe>';

dougiefresh

Uploaded v2.4 - April 12th, 2015
o Fixed YouTube URLs used for mobile devices.

@Sapozhnik:  If desired, you should be able to replace the Subs-BBCode-YouTube.php file with the fixed file from the new version....  Thanks for finding the solution, Sapozhnik!

Sapozhnik

Quote from: dougiefresh on May 12, 2015, 06:12:04 PM
Uploaded v2.4 - April 12th, 2015
o Fixed YouTube URLs used for mobile devices.

@Sapozhnik:  If desired, you should be able to replace the Subs-BBCode-YouTube.php file with the fixed file from the new version....  Thanks for finding the solution, Sapozhnik!
Doesn't work in both versions (pc+mobile) :(
Look link: example

You inserted 'embed' twice  (original link: http://www.youtube.com/watch?v=Hu3LdtU9-l4):
<iframe class="youtube-player" type="text/html" width="640" height="400" src="http://www.youtube.com/embed/embed/Hu3LdtU9-l4" allowfullscreen frameborder="0"></iframe>

Gryzor

Hello!

Installed this a few days ago and it works great!

Only problem I've found: in Firefox (37, 38 at least) if you press the BB button without having selected any text, it only inserts the opening tag...

dougiefresh

Uploaded v2.5 - April 13th, 2015
o Fixed mistake introduced in v2.4 regarding YouTube links.

Quote from: Sapozhnik on May 13, 2015, 02:27:15 AM
You inserted 'embed' twice  (original link: http://www.youtube.com/watch?v=Hu3LdtU9-l4):
@Sapozhnik:  WHOOPS!!!  Damn, I can't believe I missed that....  This update fixes this problem...

Quote from: Gryzor on May 13, 2015, 03:03:06 AM
Only problem I've found: in Firefox (37, 38 at least) if you press the BB button without having selected any text, it only inserts the opening tag...
@Gryzor:  I can't reproduce this report.  On a clean forum copy, the YouTube button inserts the tags just fine....

Sapozhnik

Quote from: dougiefresh on May 13, 2015, 04:56:08 PM
Uploaded v2.5 - April 13th, 2015
o Fixed mistake introduced in v2.4 regarding YouTube links.

@Sapozhnik:  WHOOPS!!!  Damn, I can't believe I missed that....  This update fixes this problem...
Thanks. It works good!

Gryzor

Quote from: dougiefresh on May 13, 2015, 04:56:08 PM
@Gryzor:  I can't reproduce this report.  On a clean forum copy, the YouTube button inserts the tags just fine....

Thanks mate, might be something else on my forum. It's just weird that it works ok on other browsers :D

Advertisement: