Adding soundcloud bbcode?

Get help developing custom BBCodes or request one.
xgarb
Registered User
Posts: 20
Joined: Thu Jan 24, 2008 4:31 pm

Re: Adding soundcloud bbcode?

Post by xgarb »

I'm doing something like this for the HTML5 player. Flash isn't supported on many devices. I'm using the track ID which you have to get from one of the embed options. You don't want to be allowing people to paste whole URLs in an iFrame on your site.

BBCode Usage:

Code: Select all

[soundcloud]{IDENTIFIER}[/soundcloud]
HTML replacement:

Code: Select all

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{IDENTIFIER}"></iframe>
Help Line:

Code: Select all

Embed the tracks from SoundCloud into your post. Use the track ID: [soundcloud]123456789[/soundcloud]
Settings ~ Display on Posting Page (Your choice)
youngjediknight
Registered User
Posts: 385
Joined: Wed Apr 22, 2009 2:58 pm

Re: Adding soundcloud bbcode?

Post by youngjediknight »

xgarb wrote:I'm doing something like this for the HTML5 player. Flash isn't supported on many devices. I'm using the track ID which you have to get from one of the embed options. You don't want to be allowing people to paste whole URLs in an iFrame on your site.

BBCode Usage:

Code: Select all

[soundcloud]{IDENTIFIER}[/soundcloud]
HTML replacement:

Code: Select all

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F{IDENTIFIER}"></iframe>
Help Line:

Code: Select all

Embed the tracks from SoundCloud into your post. Use the track ID: [soundcloud]123456789[/soundcloud]
Settings ~ Display on Posting Page (Your choice)
Thanks for this and to the OP as well!

xgarb, can this be configured to accept URLs rather than track IDs? My concern is that members might find tracking the ID through the embed screen a bit tedious. Unless there's an easier way to get to the track ID?

Thanks again to you both.
xgarb
Registered User
Posts: 20
Joined: Thu Jan 24, 2008 4:31 pm

Re: Adding soundcloud bbcode?

Post by xgarb »

Not that I know of. You don't want to allow people to add whole iFrames as they could be anything.

It is tedious to add the code. Maybe you could ask Soundcloud to put it somewhere clearer.
User avatar
mungbean
Registered User
Posts: 120
Joined: Sun Aug 14, 2011 7:03 am

Re: Adding soundcloud bbcode?

Post by mungbean »

Can someone post how to do Soundcloud now?

Nothing works any more.
User avatar
mungbean
Registered User
Posts: 120
Joined: Sun Aug 14, 2011 7:03 am

Re: Adding soundcloud bbcode?

Post by mungbean »

I worked out it's because all links are now https.

sigh
User avatar
Theriddler1
Registered User
Posts: 449
Joined: Sat Aug 27, 2011 11:00 pm
Location: NL
Name: Theriddler❶
Contact:

Re: Adding soundcloud bbcode?

Post by Theriddler1 »

BBCode:

Code: Select all

[soundcloud]{URL}[/soundcloud]
HTML:

Code: Select all

<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url={URL}&color=ff5500&auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false"></iframe>
Helpline:

Code: Select all

Use the track URL taken from your browser address bar: example [soundcloud]https://soundcloud.com/forss/speech-craft-no-sleep-til-dawn-remix-by-forss[/soundcloud]
Theriddler - Former Moderator @ phpBB.nl | phpBBservice.nl Team-member
Image My Extensions | buy me a beer Image
Hypolite
Registered User
Posts: 1
Joined: Sun Dec 11, 2016 1:04 am

Re: Adding soundcloud bbcode?

Post by Hypolite »

Thanks for the HTML5 version, however it doesn't work for me in an iframe.When I got to

https://w.soundcloud.com/player/?url=ht ... /sets/an-i

in my browser, it shows the embedded player for the associated playlist, but when I try

Code: Select all

<iframe width="100%" height="300" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https://soundcloud.com/hindelstark/sets/an-i"></iframe>
It doesn't work with a weird JS error. The Soundcloud background shows up but it's unable to load the player.

Does anyone have any idea what iframe attribute could help the player load?

Thanks!
Post Reply

Return to “Custom BBCode Development and Requests”