• MODX.com

    1,346 downloads

Spotify for MODX

Spotify for MODX is an extra by aladage, first released on 2012-07-17.

Package Description

Spotify for MODX brings the popular streaming music service to your MODX websites. This snippet lets you embed a pre-styled player widget to a page, or roll your own playlist based on a search or lookup of a specific artist, track or album.

The snippet is a mash-up of the Spotify Play Button and Spotify Web API. Please note: the "extras" parameter in lookup mode is not currently supported (it returns TONS of data and needs some special caching attention that I haven't had time to investigate), but it should be in a future version. All other API functionality should work fine.

Usage/Installation Instructions

Download and install Spotify for MODX from the MODX Repository.Add the snippet wherever you'd like it to appear on your site.

Basic snippet usage:

[[SpotifyMODX]]

Parameters:

  • &mode:Description: determines whether SpotifyMODX uses the pre-styled Play Button, or the more customizable search or lookup API mode.Options: simple, lookup, searchDefault: simpleNote: simple mode will only display songs, albums or playlists, but not tracks or artists.
  • &spotifyURI (simple and lookup modes only):Description: tells SpotifyMODX what content you're trying to display. Found by right-clicking any song, artist, album (all modes) or playlist (simple mode only) and choosing "Copy Spotify URI".Default: you DON'T want to find out ;-)
  • &theme (simple mode only):Description: sets the visual theme for the Play Button widget.Options: white, blackDefault: black
  • &view (simple mode only):Description: sets the view mode for the Play Button widgetOptions: list, coverartDefault: list
  • &width (simple mode only):Description: defines the width of the player, in pixels.Default: 300
  • &height (simple mode only):Description: defines the height of the player, in pixels.Default: 380Note: The larger player is the default, but will automatically switch to the compact player if a height of 80 or less is given.
  • &page (search and lookup modes only):Description: if API results are paginated, determines which page of results to return. Default: 1
  • &searchType (search mode only):Description: determines what Spotify API should search for.Options: track, artist, albumDefault: track
  • &searchTerm (search mode only):Description: the name of the track, artist or album you want to search forDefault: you DON'T want to find out.
  • &simpleTpl (simple mode only):Description: template chunk for simple mode.Default: spotifySimpleTpl
  • &rowTpl (search and lookup modes only):Description: determines the row template for each returned resultDefault: varies, based on &mode and &searchType. Usually a <li> element containing links.
  • &outerTpl (search and lookup modes only):Description: determines the outer wrapper template for the resultsDefault: varies, based on &mode and &searchType. Usually a <ul> element.

Placeholders (search and lookup modes only):

  • Search mode (outer tpl):[[+search_type]][[+search_terms]][[+results_count]]
  • Search mode -- track (inner tpl):[[+track_name]][[+track_link]][[+track_number]][[+track_length]][[+track_popularity]][[+artist_name]][[+artist_link]][[+album_name]][[+album_link]][[+album_released]]
  • Search mode -- artist (inner tpl):[[+artist_name]][[+artist_link]][[+artist_popularity]]
  • Search mode -- album (inner tpl):[[+album_name]][[+album_link]][[+album_popularity]][[+artist_name]][[+artist_link]]
  • Lookup mode -- track (inner tpl):[[+track_name]][[+track_link]][[+track_length]][[+track_number]][[+track_popularity]][[+artist_name]][[+artist_link]][[+album_name]][[+album_link]][[+album_released]]
  • Lookup mode -- artist (inner tpl):[[+artist_name]][[+artist_link]]
  • Lookup mode -- album (inner tpl):[[+album_name]][[+album_link]][[+album_released]][[+artist_name]][[+artist_link]]

Details

Developer(s)
aladage
Released
2012-07-23
First seen
2012-07-17
License
GPLv2
Supported databases
Minimum MODX Requirement
2.2

Spotify for MODX Releases

Vendor Signature Released on
MODX.com 1.0.0-beta1 2012-07-23 (12 years ago)