BBcode oddity

Need some custom code changes to the phpBB core simple enough that you feel doesn't require an extension? Then post your request here so that community members can provide some assistance.

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: NO OFFICIAL SUPPORT IS PROVIDED IN THIS SUB-FORUM
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

BBcode oddity

Post by 2600 »

I have added a BBcode that auto plays audio from a link in my profile. In this case the link is from Amazon S3 storage. When I go to the profile page as a guest the audio is not heard. But if I change the BBcode to allow guests to use that BBcode the audio will play. Why is that? Is this a flaw that might need to be fixed? The audio BBcode does work in posts however for guests. So there's a difference between hearing audio play in the profile page vs. hearing audio played in a post by guests. It may help to know that in order for me to use BBcodes in profile fields, I use the extension, '3Di - BBCode Enabled Profile Fields.'

If it helps, here is the BBcode.


BBcode Usage:

Code: Select all

[audioauto]{URL}[/audioauto]
HTML Replacement:

Code: Select all

<audio autoplay>
      <source src="{URL}">
</audio>
Helpline:

Code: Select all

Autoplay
Group permissions: Administrators & now guests to allow guests to hear audio in profile fields.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: BBcode oddity

Post by EA117 »

This might be an ABBC3 question rather than phpBB. I was like "what do you mean, prevent guests from using a BBCode? ....ohhh...."

That will be an interesting question to hear the answer to. It certainly "makes logical sense" off the top of my head that BBCode permissions would be to indicate "whom is allowed to use them", and not "whom is allowed to see the effect of using them."

But that's certainly a choice that is up to ABBC3 and how it decided to handle permissions. It might very well keep the BBCodes from being rendered for a group which does not have permission to use them.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: BBcode oddity

Post by 2600 »

I don't think it's an issue with ABBC3, but rather perhaps the 3DI extension that is used to parse BBcode in profile fields. Because with ABBC3 all BBcode parses to guests, etc like it should be in posts. It's just the profile field that it doesn't. If you go to my profile field you'll see the sound work because I've allowed guests to use the BBcode. Which doesn't make since because guests can't even post. Once they register and end up in the NRU group, that permission is revoked. Whether users can hear the audio I don't know now. I have to confirm that with a test account now that I discovered this issue. Only Admins were allowed to use the audio BBcode.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: BBcode oddity

Post by EA117 »

John connor wrote: โ†‘Thu Aug 15, 2019 4:14 am I don't think it's an issue with ABBC3, but rather perhaps the 3DI extension that is used to parse BBcode in profile fields.
Fair enough; ABBC3 just came to mind because phpBB itself doesn't have a permissions setting for who can use individual BBCodes. But I can understand your conclusion that it's ABBC3's permissions in conjunction with some other context where BBCodes don't normally get parsed, which has been enabled through presence of yet another extension.

Maybe the "divide and conquer" approach is to test whether the audio will play for a guest, when the audio BBCode is being used in just a normal message post, or other place that ABBC3 would have already been fully aware of. Since if the BBCode doesn't work for guests there, either, then it seems reasonable to approach ABBC3 with the question. Else, if the failure truly only happens when the BBCode is viewed by a guest from usage within a profile display, then perhaps asking 3DI what the implications might be makes the better sense.
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: BBcode oddity

Post by 2600 »

BBcode does parse for guests in posts as I mentioned. Now I see that other groups that don't have the audio BBcode use ability and can't hear the audio in a profile field unless I allow that BBcode to be used for that group. All this time, as an Admin I could hear the audio in my profile field, but now I see other groups can't hear it.

I'll see if 3DI has an answer. It could very well be an issue between 3DI's extension and the ABBC3 extension and how each BBcode can be used. It's just funny because in posts themselves the audio BBcode is only allowed to be used by an Admin and it will parse to a guest or registered user. Just not in profile fields.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: BBcode oddity

Post by 3Di »

John connor wrote: โ†‘Wed Aug 14, 2019 2:27 am In this case the link is from Amazon S3 storage.
As long as the link is public there are no differences.
John connor wrote: โ†‘Wed Aug 14, 2019 2:27 am But if I change the BBcode to allow guests to use that BBcode the audio will play.
Is not clear to me how you do that.

And anyway, I don't think that's a problem with my extension.
If we could prove it, I'd be right behind you looking for a solution.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: BBcode oddity

Post by 2600 »

This is what the permission box looks like for BBcodes using ABBC3.


hjngym.jpg


Right now I allowed Guest, and when I do that the Guest group can hear the audio play. If I were to allow a Registered group to use that BBcode, then not only will they be able to use that BBcode (which I don't want), but can then hear the audio play in the profile field.

If you would like to test this, install the ABBC3 extension and your extension, use my BBcode posted here in this topic and play an audio in your profile. The source URL doesn't matter if it's external or internal. I did have it internal, but switched to to the Amazon S3 link instead.

https://www.phpbb.com/customise/db/exte ... bcode_box/
Last edited by 2600 on Thu Aug 15, 2019 8:39 pm, edited 1 time in total.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: BBcode oddity

Post by 2600 »

Again, members can hear this BBcode in post's, just not in profile fields using this audio BBcode unless I allow that BBcode to be used for that group. Don't matter for posts. They can hear the audio, just can't use the BBcode in a post to make their own audio play.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: BBcode oddity

Post by 3Di »

Try to not use ABCC3 for this bbcode, remove it completely from there...
and use instead the native phpBB's ACP facility in the posting's tab to add it.

Or use a fresh test board with only my extension.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: BBcode oddity

Post by 3Di »

BTW, I did it for you.
Used a 3.2.7 fresh board with my latest validated version of '3Di - BBCode Enabled Profile Fields'.

I can confirm I have had no problems at all. It works as intended. :geek: :)

I added controls to the HTML to watch the behaviour of it.

Code: Select all

<audio controls autoplay>
      <source src="{URL}">
</audio>
Attachments
CPF-profile-guest-audio.png
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
MattF
Extensions Development Coordinator
Extensions Development Coordinator
Posts: 5859
Joined: Sat Jan 17, 2009 9:37 am
Location: Los Angeles, CA
Name: Matt Friedman

Re: BBcode oddity

Post by MattF »

ABBC3 only has a setting that allows who can USE a BBcode... Not who can SEE it. In other words it only applies to posting, not viewing.

The prime example is the Moderator Message BBCode. It's meant to only be used by Admins and Moderators. But obviously everyone can view it, as the point is it's a way for moderators/admins to post official business messages at users.

Also the OP is talking not about their BBCode appearing or not, but instead whether or not audio will play or not - so the BBcode is rendering, but for some reason, unrelated to ABBC3, Amazon is not streaming audio to their audio player. Maybe it's something Flash based, and they have Flash setting in phpBB restricted in the ACP or permissions for guests.
Formerly known as VSE โ€ข My Extensions โ€ข Please do not PM me for support.
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: BBcode oddity

Post by 3Di »

VSE wrote: โ†‘Thu Aug 15, 2019 11:31 pm Also the OP is talking not about their BBCode appearing or not, but instead whether or not audio will play or not - so the BBcode is rendering
In fact, since some browsers like FF do block auto-play in some cases, I added the controls and told FF to avoid such restriction on my test site.
I confirm there is no problem playing (as per the above grab) the audio file (hosted locally into the images' folder) also for guests, I am logged out in fact.
VSE wrote: โ†‘Thu Aug 15, 2019 11:31 pm Amazon is not streaming audio to their audio player.
The OP uses an "Amazon storage" extension, to add.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
2600
I've Been Banned!
Posts: 2567
Joined: Fri Nov 14, 2014 5:14 pm
Location: Area-51

Re: BBcode oddity

Post by 2600 »

This is not flash. It is HTML5. I have tried internal and the external link. Same result.

The audio BBcode I have is not that, it's an auto play BBcode. Look at my code I have here in this topic to use it.

Again. The BBcode plays the audio automatically to users in posts. In the profile field it does not unless I allow that group to use the BBcode. So it's like they need to be able to parse with the audio auto BBcode.
Morpheus: Unfortunately, no one can be told what The Matrix is. You'll have to see it for yourself.
Hack me.
Consider a canary token.
The nature of my chosen username
:ugeek:
User avatar
3Di
I've Been Banned!
Posts: 17538
Joined: Mon Apr 04, 2005 11:09 pm
Location: I'm with Ukraine 🇺🇦
Name: Marco
Contact:

Re: BBcode oddity

Post by 3Di »

John connor wrote: โ†‘Fri Aug 16, 2019 1:27 am The audio BBcode I have is not that, it's an auto play BBcode. Look at my code I have here in this topic to use it.
:?: Where do you see is not an autoplay anymore? And yes it works also without such controls bit.
I just copied your bbcode (select all, copy & paste). ;)

http://syntaxxx.com/html5-audio-autopla ... r-website/
3Di wrote: โ†‘Thu Aug 15, 2019 9:16 pm I added controls to the HTML to watch the behaviour of it.

Code: Select all

<audio controls autoplay>
      <source src="{URL}">
</audio>
bbcode-ap.png
John connor wrote: โ†‘Fri Aug 16, 2019 1:27 am Again.
Again?
Since you don't seem to understand that I tested it... I am done with this topic.

Good luck.
๐Ÿ†“ Free support for our extensions also provided here: phpBB Studio
๐Ÿš€ Looking for a specific feature or alternative option? We will rock you!
Please PM me only to request paid works. Thx. Buy me a coffee -> Image
My development's activity ยบ PhpStorm's proud user ยบ Extensions, Scripts, MOD porting, Update/Upgrades
User avatar
EA117
Registered User
Posts: 2158
Joined: Wed Aug 15, 2018 3:23 am
Contact:

Re: BBcode oddity

Post by EA117 »

VSE wrote: โ†‘Thu Aug 15, 2019 11:31 pm Also the OP is talking not about their BBCode appearing or not, but instead whether or not audio will play or not - so the BBcode is rendering, but for some reason, unrelated to ABBC3, Amazon is not streaming audio to their audio player.
For what it's worth, that's more information that I could surmise from looking at the site. Since he hasn't even shown us his site with the "Guest" access removed from the BBCode, I couldn't say whether the BBCode is actually rendering in that case or not.

(Mr. Conner, maybe you need to turn off Guest access for the BBCode and break the playback for a bit, so that we can see the difference. What I get right now when viewing the profile is <audio autoplay=""><source src="https://upload-3456.s3-us-west-2.amazonaws.com/goldeneye.mp3"></audio><br>, rendered right before the "matix" smilely of a guy sitting in front of multiple computer screens.)

Image

The other evidence which seems antithetical to this explanation is that all Mr. Conner has to do in order to "make Amazon suddenly be willing to stream audio" is change the "Guest" access for the BBCode. It's not obvious for me anyway how the BBCode permission setting creates a problem for the Amazon streaming. What would make sense for getting that result is the BBCode not being rendered; but that's certainly not the only possible explanation.

But should certainly be able to rule that out by viewing the site's generated HTML while the problem is occurring.
Post Reply

Return to โ€œphpBB Custom Codingโ€