User:Muz/Custom Artist Page Component View

From MusicBrainz Wiki
Jump to navigationJump to search

This is a crackpot idea by Muz. He will populate this page with something soon.

What is it?

Well, firstly it's a very longwinded and bad name for an idea Muz has had knocking about for a while. In short it is to give users the option of which release types to view by default when hitting up an artist page.

An example would be, going to Artist X's page, and upon landing there, seeing Albums, EPs, Singles and Live releases only. The option to "View all" will exist as it currently does, and there perhaps being a "hop to" option for only viewing a certain type of releases from an artist, like say "Albums" only.

How will it work?

  • There being an additional section under User Settings where this data can be set. By default, it will have the current site defaults selected.
  • The addition of an extra column to the database "moderator" table, containing an array of type IDs. Initial population will contain the current site defaults.
  • The addition of an extra database table, containing 2 columns, 1 for ID, and the second for release type. This may not be necessary, as this information may be derived from elsewhere.

1) User goes to an Artist Page: Blind Guardian

2) The server checks the user's memcached object for a viewprefs array.

2a) If it doesn't exist for whatever reason, fall back to selecting the current site defaults.

2b) Otherwise, for each integer in the array, show that component, in that given order.

3) The user can do whatever, or now hit the "view all" link which will show all releases, as is currently the case.

4) The user can select from a drop down, a list of available release types, and upon selection be directed to a page only showing, say EPs or Singles.

Backend Coding

As touched upon, some DB work will need to be done, as will storing a link of ID to release types somewhere, be it in the DB or from existing methods, which I'll document later when I have the time.

I've every intention of making use of the reusable display component ability of the TemplateToolkit branch to do this. The affected files would be:

/root/artist/ - This needs to select only releases with release types from step 2.

/root/artist/ - Add the drop down thinger

/root/artist/ - This would be a new file, which'd use the URL to determine the user's requested release types and onyl show those. E.g,[ALBUMS|EPS|SINGLES|LIVES] or whatever

Here be Dragons

This is mostly me spewing thoughts out onto "paper". This is no guarantee I will do this work or complete it any time soon, but hey, here's what I've got so far. Go go open sauce devving.