s9e Media BBCodes pack

s9e Media BBCodes pack 20231102

No permission to download
@JoshyPHP

Let's say I have several historic posts using a media bbcode from your add-on.

Then I disable that bbcode, or maybe uninstall your add-on...

...What happens? Will all those bbcodes be automatically converted back to their old regular links?

Or will they become defunct and show the MEDIA tag...?

Is there a way to restore them to plain links?
 
@HenryRocket For GIFs I recommend using the BBCode instead.

@DroidOne That's not a kind of URL I'm familiar with. It looks like the URL used to embed something, is there another URL where the original document can be edited or accessed?
 
@HenryRocket For GIFs I recommend using the BBCode instead.

@DroidOne That's not a kind of URL I'm familiar with. It looks like the URL used to embed something, is there another URL where the original document can be edited or accessed?

There's an option to "Publish" charts created in Google Sheets directly via the chart itself. It's pretty neat. It looks like this and should be the same for any chart created within Google sheets:

sheets.webp

I'm not sure if it's embed friendly though. The iframe embed code looks like this:

HTML:
<iframe width="768" height="460" seamless frameborder="0" scrolling="no" src="https://docs.google.com/spreadsheets/d/e/2PACX-1vSiIAqvsn0REStt7fvSKOae-kXGXotUTfxvjLHtjT5E5L56JGESE8rHsgX7F6XP147gBCc6fnOFK0QN/pubchart?oid=1465127183&amp;format=interactive"></iframe>
 
The answer to this question does not matter. If you're having issues with SoundCloud, post the URL you're having issues with.
 
Sorry, I should have started by providing more info.

XF 1.5.13
Most recent version of the s9e Media BBCodes addon.

Here are some examples that aren't working for my users -

Example URL #1
Code:
https://soundcloud.com/john-sawyer-11/sawbox-99-cohiba-3-string
BBCode from post edit -
Code:
[MEDIA=soundcloud]https://soundcloud.com/john-sawyer-11/sawbox-99-cohiba-3-string[/MEDIA]

Example URL #2
Code:
https://soundcloud.com/bill-steele/dr0000-0019
BBCode from post edit -
Code:
[MEDIA=soundcloud]https://soundcloud.com/bill-steele/dr0000-0019[/MEDIA]


In each case, only the embed frame seems to show within the post, as pictured -

Screen Shot 2017-10-09 at 7.37.23 PM.webp

Finally, here are the match codes from the Admin Panel -
Code:
@https?://(?:api\.)?soundcloud\.com/(?!pages/)(?P<id>[-/\w]+/[-/\w]+|^[^/]+/[^/]+$)@i
@(?P<id>)api\.soundcloud\.com/playlists/(?P<playlist_id>\d+)@
@(?P<id>)api\.soundcloud\.com/tracks/(?P<track_id>\d+)(?:\?secret_token=(?P<secret_token>[-\w]+))?@
@(?P<id>)soundcloud\.com/(?!playlists|tracks)[-\w]+/[-\w]+/(?=s-)(?P<secret_token>[-\w]+)@
@(?P<id>)soundcloud\.com/(?!playlists/\d|tracks/\d)[-\w]+/[-\w]@
@(?P<id>)soundcloud\.com/\w+/sets/@
 
Check out your server logs in the admin panel, there may be an error. By the looks of it, your server is unable to contact SoundCloud's to retrieve some of the information it needs to display the embedded player.

It can be due to the PHP configuration. For example, if cURL is disabled and HTTP/HTTPS isn't in the list of allowed streams.
 
I've checked all my server logs. Not seeing any errors. Also nothing in the admin panel to indicate it.
Screen Shot 2017-10-09 at 8.01.39 PM.webp

cURL is enabled. 7.38.0
Both http and https protocols are allowed.
Screen Shot 2017-10-09 at 9.00.43 PM.webp
 
Last edited:
Judging by that phpinfo it should work. I'll contact you when I have time, to see if we can debug it somehow.

In the meantime, if you go to the track's page on SoundCloud and retrieve the Embed code from the Share dialog you should be able to copy/paste it into XenForo's Add Media dialog to embed the track. For instance, if you copy/paste this into XenForo's dialog:
Code:
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/346126330&color=%23ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true"></iframe>
...it should get replaced with this:
Code:
[MEDIA=soundcloud]track_id=346126330[/MEDIA]
 
Judging by that phpinfo it should work. I'll contact you when I have time, to see if we can debug it somehow.

In the meantime, if you go to the track's page on SoundCloud and retrieve the Embed code from the Share dialog you should be able to copy/paste it into XenForo's Add Media dialog to embed the track.
Manually adding the embed code with the Add Media dialogue works fine. That made me think it had to be an issue with the BBCode, somehow. I triple checked the Match URL's looking for an issue. I finally noticed that if I replace https with http in the Site URL definition for the addon that it works now.

Screen_Shot_2017-10-09_at_8_51_05_PM.webp

I don't recall ever manually editing that to https? Regardless, this issue went away after the change.
Thanks for responding!
 
Last edited:
It's just a coincidence but I'm glad that it works now. :)

The value in "Site URL" isn't used at all when embedding content. Its only purpose is to link the site's name to the site's homepage in the "Add Media" dialog. However, when you edit a media site it causes the cache to be cleared and rebuilt and that may have something to do with it. It's either a one-time cosmic accident or something that will resurface after every update. If that's the latter case, message me and we'll try to do the debugging thing.
 
Top Bottom