Skip to content

t3solution/t3s_discogs

Repository files navigation

EXT:t3s_discogs — Discogs Collection for TYPO3

Something for vinyl fans! In addition to records (vinyl) and CDs, Discogs accepts virtually any physical audio medium that has ever been commercially or officially produced for the public.

Display your Discogs collection with cover images, tracklists, credits and community ratings on your TYPO3 website.

Live Demo

Requirements

  • TYPO3 >= 14.3
  • PHP >= 8.2
  • A Discogs account with a personal API token

Installation

Via Composer (recommended)

composer require t3s/t3s-discogs

Via TYPO3 Extension Repository (TER)

Install via the TYPO3 Extension Manager:

Or download directly from extensions.typo3.org/extension/t3s_discogs

Setup

1. Generate a Discogs User Token

  1. Log in to discogs.com
  2. Go to Settings → Developers
  3. Click "Generate new token"
  4. Copy the token and keep it private

Direct link: https://www.discogs.com/settings/developers

2. Add the Content Element

  • Open a page in the backend
  • Insert a new content element of type "Discogs Collection"
  • In the "Plugin" tab, fill in:
    • Discogs Username (as shown in your profile URL)
    • Discogs User Token (from step 1)
    • Configure columns, sorting and other options as desired

3. Bootstrap

The templates require Bootstrap 5.3.

Plugin Settings (FlexForm)

Setting Description Default
username Your Discogs username
token Personal API token
perPage Items per page (12 / 24 / 48 / 100) 24
columns Bootstrap grid columns (2 / 3 / 4 / 6) 4
sort Sort field (added / artist / title / year / format) added
sortOrder Sort direction (asc / desc) desc
viewMode Display as grid or list grid
disableCache Fetch fresh data on every request no

Features

List View

  • Responsive Bootstrap 5 grid or table list view (switchable via plugin settings)
  • Cover image, artist, title, year, format, primary genre
  • Every cover and title links to the detail view
  • Page-based pagination with readable URLs (e.g. /my-collection/page/2)

Detail View

  • Large cover image + all additional release images as thumbnails
  • Community rating (average score, number of ratings, have/want counts)
  • Full metadata: year, release date, country, label, catalogue number
  • Format with all descriptions (e.g. Vinyl (12", 33⅓ RPM, LP))
  • Genres & styles as badges
  • Credits: producers, mixers, guest artists with their roles
  • Tracklist as a table (position, title, track artists, duration)
  • Videos as YouTube links with duration
  • Free-text notes from the Discogs database
  • Data quality indicator

Caching

API responses are cached via the TYPO3 caching framework (FileBackend, cache group pages):

  • Collection lists are cached for 1 hour
  • Release details are cached for 24 hours, since master data rarely changes

To force a refresh, flush the TYPO3 page cache. Caching can be disabled per plugin instance via the disableCache FlexForm setting.

Discogs API Rate Limits

Authenticated requests are limited to 60 per minute. With caching enabled, normal usage stays well within this limit.

Routing Configuration

To get clean readable URLs for the detail view and pagination, add the following to your site's config/sites/<your-site>/config.yaml:

routeEnhancers:
  T3sDiscogsShow:
    type: Extbase
    limitToPages:
      - 12  # UID of the page with the plugin
    extension: T3sDiscogs
    plugin: Collection
    routes:
      - { routePath: '/release/{releaseId}', _controller: 'Discogs::show', _arguments: {'releaseId': 'releaseId'} }
      - { routePath: '/page/{page}', _controller: 'Discogs::list', _arguments: {'page': 'page'} }
    defaultController: 'Discogs::list'

This produces URLs like:

/my-collection/release/2548209
/my-collection/page/2

Exclude parameters from cHash

Add the following to config/system/additional.php to prevent TYPO3 from appending a cHash parameter to these URLs:

$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_t3sdiscogs_collection[releaseId]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_t3sdiscogs_collection[action]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_t3sdiscogs_collection[controller]';
$GLOBALS['TYPO3_CONF_VARS']['FE']['cacheHash']['excludedParameters'][] = 'tx_t3sdiscogs_collection[page]';

Overriding Templates

Set custom template paths via TypoScript:

plugin.tx_t3sdiscogs_collection {
    view {
        templateRootPaths {
            10 = EXT:my_sitepackage/Resources/Private/Templates/
        }
        partialRootPaths {
            10 = EXT:my_sitepackage/Resources/Private/Partials/
        }
        layoutRootPaths {
            10 = EXT:my_sitepackage/Resources/Private/Layouts/
        }
    }
}

About

Discogs Collection for TYPO3

Resources

License

GPL-2.0, GPL-2.0 licenses found

Licenses found

GPL-2.0
LICENSE
GPL-2.0
LICENSE.txt

Stars

Watchers

Forks

Packages

 
 
 

Contributors