2

How can I let users create their own playlists of a particular content type?

I have used the Flag module but it allows only a single list. I want the user to be able to create multiple lists.

I have tried the Flag Lists module but cannot seem to get it working.

Any help would be appreciated.

2 Answers 2

4

Flag module

Use the Flag module to create 1 flag for each of the lists you want to use it for (do NOT make it a 'global' flag though). The flags are to be created by an admin, but each user (authorized to use a flag) will then be able to build their own "lists" using such flag.

Then create a view (with the views module) for each such playlist you want, whereas you create a "views relationship" with one of those flags.

This approach requires the types of flags to be pre-defined (via admin), such as playlist-flags named like Bookmarked, Revisit Later, Add to my queue, Played, etc. Though it is ony like a 5 min admin update to add any other relevant flag later on (eg if a user requests another variation).

If you're not familiar with the Flag module, checkout the set of 8 video tutorials about the flag module.

You might also want to look at some of the Flag related modules, such as (partial list):

  • Views, to create lists of flagged content, users, etc, such as in the video about Creating global flags and listing flagged content in Views.
  • Rules, to trigger rules for anything that is flagged, such as in the video about Triggering rules with Flag, or to set flags with the Rules module, such as in the video about Setting flags with Rules.
  • Flag Lists, to allow users to create custom lists.
  • Flag Weights, to add weights to Flags (to be used for sorting).
  • DraggableViews, to make Views draggable (so that they can be rearranged by Drag'n'Drop.).
  • Flag Friend, a pre-built flag for marking other users as friends (using the Flag module).
  • Flag Abuse, a pre-built flag for marking offensive content, with some extra administrative features.
  • Flag, Hide & Mute, for users to hide individual nodes, such as site-wide announcements or advertisements, and/or to suppress all posts by users they do not want to see.
  • Flag Files, to flag media files.
  • Flag Service, to allow Flag to be accessed via a web services interface through the Services module.
  • DLike, provides a Facebook like "Like" functionality using the Flag and Lightbox2 module.
  • Conditional Flags, provides an extra API to Flag module, for custom conditions between flags.
  • Organic Groups Flag Integration, extends the flag module with organic groups support allowing the administrators of each group to override the global flag settings for their group.
  • Context Flag, allows the use of Flags as conditional triggers for use with the Context module.

Refer to its community documentation for way more details.

Entity Reference module

Create a content type like "Playlist" for which each user should be able to create/edit "their" nodes for (with 1 node for each Playlist they want). And add a field in it using the Entity reference module for it (with multiple values allowed). Combine this with the Node Access module to ensure that each user can only "edit" their own Playlist nodes.

Other usecases

Refer to my answer to How to motivate visitors to comment (technically)? for other usages of the Flag module as illustrations of other great things you can do with the Flag module, and some other great modules that play well with it (i.e. the Rules module).

3
  • Could you please give me some more details? I am getting the gist of what your trying to say, but details will help. Thanks. EDIT: Just saw the tutorial link. Will have a look at that , thanks. Commented May 28, 2015 at 22:39
  • But I dont want the admin to create the flags - each user can create one or more lists and name them whatever they want. If I use the flag module how can I allow the users to create flags? I saw the video tuts - though they were helpful in display but still confuses me about my main question. Commented May 29, 2015 at 1:09
  • Thanks for your help. I ended up using the "Flag Lists" - drupal.org/project/flag_lists module. Commented Jun 3, 2015 at 16:41
1

I used the Flag Lists module. Here is a quote about it (from its project page):

Flag lists allows regular users to create unlimited private flags called lists. Flag lists extends Flag. In Flag, a site administrator creates the flags that any authorized users may use. In Flag lists, users create their own lists, and they may only add to their own lists.

An example use case would be a shopping site where users make private wishlists that they name and manage: "Books I need for my Drupal library" or "Guitar strings I've tried on my Yamaha acoustic". The site builder can then work with the lists, most likely using Views, to provide useful content display, perhaps integrating with a shopping cart or an email broadcast.

1
  • as of 2017-09-27 flag lists doesn't work with flag v3.9 -- it throws an error during installation. Commented Sep 27, 2017 at 19:59

Not the answer you're looking for? Browse other questions tagged or ask your own question.