MyBB Community Forums

Full Version: Request SoundCloud bbcode
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
hi any to make soundcloud bbcode

there two way to do it neeed both

https://soundcloud.com/damjan_eltech this code and solo song code https://soundcloud.com/damjan_eltech/dam...t-sajsi-mc
Not exactly sure what the mycode would do for their profile page, but here's the code for a song:

Regular Expression:
\[soundcloud url="([a-zA-Z0-9.:/]*?)".*?/\]

Replacement (HTML5):
<iframe width="100%" height="166" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=$1"></iframe>

Or Replacement (Flash):
<object height="165" width="100%"><param name="movie" value="https://player.soundcloud.com/player.swf?url=$1&auto_play=false&show_artwork=true&show_playcount=true&show_comments=true"></param><param name="allowscriptaccess" value="always"></param><embed allowscriptaccess="always" src="https://player.soundcloud.com/player.swf?url=$1&auto_play=false&amp;show_artwork=true&amp;show_playcount=true&amp;show_comments=true" type="application/x-shockwave-flash" width="100%" height="165"></embed></object>

It'll accept the Wordpress code that shows up in the 'Share' box. You might want to play around with the width and height on the replacement to suit your needs.

Off Topic: I opened his profile page and still have it open, his songs are pretty good.
what about this code https://soundcloud.com/damjan_eltech to show all songs like in SMF, and i forgat say thank you give rep+ to you
(2012-12-16, 10:33 PM)lexy Wrote: [ -> ]what about this code https://soundcloud.com/damjan_eltech to show all songs like in SMF

Could you link an example? I tried copying the wordpress code from the 'Share' button underneath his avatar and it works with the MyCode but only shows the first song and moves onto the next song after it finishes. I think you might be referring to a playlist, which may also work.
see here both code song and playlist http://custom.simplemachines.org/mods/in...p?mod=3247
(2012-12-16, 10:40 PM)lexy Wrote: [ -> ]see here both code song and playlist http://custom.simplemachines.org/mods/in...p?mod=3247

Edited my earlier post. Apparently the HTML5 player doesn't support the playlist/profile view, but the flash version does.
Flash version has more options for toggling comments, volume, download and info too but doesn't show the author.
Were you able to get this to work on profiles?
I'm looking for the same thing... maybe there's a way to add a user field that when you enter the url and save it in usercp it will render out the soundcloud widget for that url on the profile page.