News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Yet Another YouTube BBCode Tag

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

Previous topic - Next topic

dougiefresh

Quote from: Gryzor on August 26, 2015, 04:27:37 AM
Nah, Aeva was probably messing it up, I think it's fine after I removed it... thanks!
Good to know!!  Thanks!

Gryzor

My pleasure man, thanks for your great work!

firepatriot

hey love the code. and it looks great.  wondering something?     the line        $orders = permute($preg);  no longer exists in 2.1 beta 2 so i dont know where to put the code.
  im uploading my subs.php file for your to look at if you want.
trying to figure it out on my own but if someone could help me would love your forever

dougiefresh

In the nightly version found on GitHub, the SMF team has reworked that section of the parse_bbc function so that it no longer needs the permute function, instead relying on a complete different implementation to address the issue brought up in the REPORT: Potentially "Fatal Flaw" in SMF's bbcode parser thread.....  In the next few days, I will release an update that will make that particular operation optional....

Gryzor

Ah, I had read that and I think I have understood most of it :D

Hopefully the fix won't break support for older versions...

dougiefresh

Making this change won't break support for SMF 2.0.x and SMF 2.1 Betas 1 and 2 from the SMF website.  It'll just make it so that the operation is ignored if the operation isn't found.

Geor'G

Quote from: dougiefresh on September 04, 2015, 07:47:35 AM
In the nightly version found on GitHub, the SMF team has reworked that section of the parse_bbc function so that it no longer needs the permute function, instead relying on a complete different implementation to address the issue brought up in the REPORT: Potentially "Fatal Flaw" in SMF's bbcode parser thread.....  In the next few days, I will release an update that will make that particular operation optional....
This mode is the same?
http://custom.simplemachines.org/mods/index.php?mod=4069

dougiefresh

The solution that my mods with too many parameters has is to rearrange the parameters so that they are in the proper order before it gets checked for validity.  The mod you referenced (v1.x) does essentially the same thing for all bbcodes, however, my mod suffers from several different issues that may break the expected output of the parser.  SMF 2.1 Beta 2 Nightly's solution, while different than mine, solves many of the problems that I have not been able to figure out before being notified of the nightly's code change.

dougiefresh

Uploaded v3.4 - August 21st, 2015
o Fixed issue where necessary tag cannot be added if other mods have modified same lines.
o Rewrote the "fix parameter order" function to be called only when necessary.
o Operation that calls "fix parameter order" function now skipped for nightly SMF 2.1 Beta 2.

dreep

Hi,

I have installed this mod on my forum, but when i post a link with, i have that :

Can you help me ?

dougiefresh

@dreep:  I apologize about getting back to you so late.  I've been working multiple mandatory 12+ shifts over the last 2 weeks and haven't had time or energy to do much.

Quote from: dreep on September 21, 2015, 04:19:55 AM
I have installed this mod on my forum, but when i post a link with, i have that :
I need an actual link to work with, so if I can duplicate it, I can see for myself what is happening....

dreep

Quote from: dougiefresh on October 03, 2015, 10:28:41 AM
@dreep:  I apologize about getting back to you so late.  I've been working multiple mandatory 12+ shifts over the last 2 weeks and haven't had time or energy to do much.

Quote from: dreep on September 21, 2015, 04:19:55 AM
I have installed this mod on my forum, but when i post a link with, i have that :
I need an actual link to work with, so if I can duplicate it, I can see for myself what is happening....

no pb for time...
this is youtube link i try to insert in my example : https://youtu.be/ou1VO6yM3Xc [nofollow]

PaulKet

First, thank you for this mod.

I'm using 2.1 beta 2 and can't get the size of the videos to change no matter what I do, they are all being shown at 300 by 150 pixels, adding to the default settings in my ACP does nothing and adjusting [youtube width=x height=y] to [youtube width=560 height=315] does nothing either. Is this just a problem with 2.1 beta 2 or am I overlooking something?

dougiefresh

Uploaded v3.5 - November 4th, 2015
o SMF 2.1: Fixed BBCode-YouTube.css install location.




@PaulKet: Thank you for the bug report.  It's been fixed.

@dreep:  I apologize about the lateness of this reply.  I tested the link that you sent and I am not seeing the result you are seeing.  Can you post a link with the YouTube URL being used so that I can see if I can track down the cause of this issue?  Thanks!

natcip

For some reason the align-tags get ignored.

[center][youtube]https://www.youtube.com/watch?v=q8eHo5QHlTA[/youtube][/center]

The video is embedded and works fine but it's not centered. :-\

I have Version 3.5 installed.

dougiefresh

I just used the code provided and it was properly centered within the post area. Unless you change the maximum width in the Modification Settings, the default size is to take up the entire post area.   I had set a maximum width of 640 in the Modification Settings area so that it doesn't take up the entire post area. 

To specify a width on a post-by-post basis, use this form:
[center][youtube width=640]https://www.youtube.com/watch?v=q8eHo5QHlTA[/youtube][/center]

Hope this helps you.

natcip

Whoops my bad, I didn't see the Modification Settings. I changed the width in the BBCode-YouTube.css file. I guess that's why the align didn't work.
Thanks!

dougiefresh

 O:) Yeah, the stuff in the BBCode-YouTube.css is to make the video stuff responsive to the post area size.  It shouldn't be messed with.  ;D

PavelK

Very good mod, better than others.

dougiefresh

Uploaded v3.6 - November 30th, 2015
o Added auto-embed for YouTube URLs.

Advertisement: