Spotify BBcode

Get help developing custom BBCodes or request one.
Post Reply
TheDani
Registered User
Posts: 394
Joined: Tue Apr 10, 2012 12:48 pm

Spotify BBcode

Post by TheDani »

Need help with this.

BBCode usage

Code: Select all

[spotify]{SIMPLETEXT}[/spotify]
HTML replacement

Code: Select all

<iframe src="https://embed.spotify.com/?uri={SIMPLETEXT}" width="380" height="80" frameborder="0" allowtransparency="true"></iframe>
Help line

Code: Select all

[spotify]Spotify URI[/spotify]
Examples

Code: Select all

[spotify]spotify:album:2XQwZUu0MM9ECgwHbcc8qR[/spotify]

[spotify]spotify:track:5v3TSHYm8BzbON2u6QBEG7[/spotify]

Problem: the bbcode is simply not parsed!
User avatar
Brf
Support Team Member
Support Team Member
Posts: 53400
Joined: Tue May 10, 2005 7:47 pm
Location: {postrow.POSTER_FROM}
Contact:

Re: Spotify BBcode

Post by Brf »

ACP wrote:{SIMPLETEXT} Characters from the latin alphabet (A-Z), numbers, spaces, commas, dots, minus, plus, hyphen and underscore
It does not say "colons"
TheDani
Registered User
Posts: 394
Joined: Tue Apr 10, 2012 12:48 pm

Re: Spotify BBcode

Post by TheDani »

I tried {TEXT} which gave me a XSS warning and no diff.
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Spotify BBcode

Post by Lumpy Burgertushie »

the only way I can figure it out is to use two different bbcodes. one for track and one for album.

track:


[track]{SIMPLETEXT}[/track]

html replacement:

Code: Select all

<iframe src="https://embed.spotify.com/?uri=spotify:track:{SIMPLETEXT}" width="380" height="80" frameborder="0" allowtransparency="true"></iframe>
do the same for album but replace track with album.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
TheDani
Registered User
Posts: 394
Joined: Tue Apr 10, 2012 12:48 pm

Re: Spotify BBcode

Post by TheDani »

Yeah that could work. No ideal solution as it will require me to have 3 different bbcodes, on for tracks, one for albums and one for playlists.

[spotify_album]...[/spotify_album]
[spotify_track]...[/spotify_track]
[spotify_playlist]...[/spotify_playlist]

instead of just

[spotify]...[/spotify]
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Spotify BBcode

Post by Lumpy Burgertushie »

TheDani wrote:Yeah that could work. No ideal solution as it will require me to have 3 different bbcodes, on for tracks, one for albums and one for playlists.

[spotify_album]...[/spotify_album]
[spotify_track]...[/spotify_track]
[spotify_playlist]...[/spotify_playlist]

instead of just

[spotify]...[/spotify]
the problem is the colon in the address. that is not even valid for urls anyway, but it works.

there is no bbcode varible for a colon.

you could make it all in one, however, to use it you would have to copy and paste two different parts of the url into your bbcode brackets and that would be very confusing for everyone.

separate buttons for each would be the best.


robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
TheDani
Registered User
Posts: 394
Joined: Tue Apr 10, 2012 12:48 pm

Re: Spotify BBcode

Post by TheDani »

Lumpy Burgertushie wrote:the problem is the colon in the address. that is not even valid for urls anyway, but it works.
What do you mean by that? All urls have a colon.

https://www.phpbb.com/

But ok, Ill consider making three buttons then...
User avatar
Lumpy Burgertushie
Registered User
Posts: 69223
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Spotify BBcode

Post by Lumpy Burgertushie »

TheDani wrote:
Lumpy Burgertushie wrote:the problem is the colon in the address. that is not even valid for urls anyway, but it works.
What do you mean by that? All urls have a colon.

https://www.phpbb.com/

But ok, Ill consider making three buttons then...
well, technically you are correct, I meant in the actual file/folder name section.

spotify:album: etc.

that is not valid as far as I know. certain characters are not allowed

robert
Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
TheDani
Registered User
Posts: 394
Joined: Tue Apr 10, 2012 12:48 pm

Re: Spotify BBcode

Post by TheDani »

How do I embed a playlist? Say I want to embed this playlist: http://open.spotify.com/user/nme.com/pl ... kIILZYkPYL

I tried:
BBCode usage:

Code: Select all

[spotify_plist]{SIMPLETEXT1} {SIMPLETEXT2}[/spotify_plist]
HTML replacement

Code: Select all

<iframe src="https://embed.spotify.com/?uri=spotify:user:{SIMPLETEXT1}:playlist:{SIMPLETEXT2}" width="300" height="380" frameborder="0" allowtransparency="true"></iframe>
¨


EDIT: updated and solved.
User avatar
millipede
Registered User
Posts: 208
Joined: Mon Feb 25, 2008 5:13 am
Contact:

Re: Spotify BBcode

Post by millipede »

Can this still be done?
Oh, and since this post has a nice red check-mark, will it still get noticed that I responded?

I originally planned on putting some playlists on a /tunes page on my site. Then I considered some sticky topics in the forum instead so as to keep people engaged with the forum more.
So, I just went and tried and of course, it doesn't work... so I started searching, and searching, and this was one of the topics I found. Tried what was posted at the end and, trying to submit it I get a 403 forbidden page.
Was hoping to share music on my site, and hoping to do it more on the forum...
Will it work on the forum? Do I need to do it just on a regular page instead?

EDIT: Well, weird. I figured I couldn't get it to work so, while making a post, I just pasted the url of the playlist so people could go off site to play it if they want. The player popped up... in the forum. A little confused how that happened... just posted what I thought was a direct link and, there's the playlist in the post.

If that will work again for another list, problem solved. This isn't a danger though right? or is it? Should that have not happened?
User avatar
Mick
Support Team Member
Support Team Member
Posts: 26505
Joined: Fri Aug 29, 2008 9:49 am

Re: Spotify BBcode

Post by Mick »

What extensions have you got installed? You should start your own topic (you can link back to this one if you wish) as this one is marked solved as you mentioned.
  • "The more connected we get the more alone we become" - Kyle Broflovski©
  • "The good news is hell is just the product of a morbid human imagination.
    The bad news is, whatever humans can imagine, they can usually create.
    " - Harmony Cobel
Post Reply

Return to “Custom BBCode Development and Requests”