Closed (fixed)
Project:
Views Bookmark
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
13 Jan 2008 at 02:23 UTC
Updated:
22 Feb 2009 at 03:56 UTC
I'd like to see a new pref for each bookmark that is 'Show users who've bookmarked when displayi ng a post'. The pref could have these choices:
- none (default)
- show on separate tab
- show at bottom of teaser and detail display
- show at bottom of detail display
I'd like to use this on event nodes on groups.drupal.org instead of signup module (which won't work with date fields yet).
Comments
Comment #1
quicksketchThat sounds great. As a bonus we should include a default view that displays as a block that serves this same function, so you can display it anywhere you like on node pages... actually, would it be possible to include the block and skip the "show at bottom..." options since these could be done with blocks anyway?
Comment #2
moshe weitzman commentedA default View won't work unless it depends on bio module and friends. This is a *user* list.
Shipping with a block is a great idea because it can more easily list users.
Comment #3
quicksketchOh crap you're correct. This will have to be a manual block with a theme function. Fortunately we already have an API function in views_bookmark to retrieve this list.
So I'm thinking the options should simply be a checkbox and the addition of a block.
On the views bookmark configuration:
[ x ] Show tab on node page for users who marked this contentAnd then on the blocks page a new block:
Bookmark: [Bookmark name] user listDo we need the "show at bottom of teaser and detail display" option? It's a bit obscurely labeled, and it'd be possible to include it in the theme layer fairly easily by loading the block and including it that way.
Comment #4
moshe weitzman commentedwe don't *need* it, but it would be nice. it is the diffeence between us doing it once or loads of people doing same thing over and over. i mentioned this because thats where signup.module shows this info for rsvp on a node ... i could deal with just detail view, and omitting teaser view.
Comment #5
mooffie commentedBTW, it's already possible, using Views, to show a "Who has bookmarked this?" tab:
node/$node/whoURL, or similar, and setup Views to provide a tab.However, Views will put this tab on every node, including nodes whose type doesn't accept bookmarks. There's a way to fix this:
Views support a 'url_token' hook that lets modules introduce arguments. For example, Organic Groups uses this hook to introduce a "$group" argument. We could introduce a "$bookmarkable" argument that would only match nodes that are of a bookmarkable type. This way our "node/$bookmarkable/who" tab would appear only on bookmarkable nodes.
Hmmm... well, yeah. There's something I want to add to Views 2 feature-list: in the same way we're allowed to provide PHP code to determine arguments, we should be able to privded PHP code to determine access rights to the view. This will enable us to implement this
Show only for users who marked this contentaccess check too.Comment #6
moshe weitzman commentedgood idea about the url_token hook. i'll try to work up a patch, if you don't beat me to it. .. ALso, there is a bug in Views that needs fixing - http://drupal.org/node/183191. Reviews welcome.
Comment #7
mooffie commentedBTW, there's one nice detail regarding this 'url_token' hook that I didn't mention --because I wanted to keep my message short:
A token may get a parameter. E.g., if we use the URL
node/$node-story/whothen the tab will be shown only for 'story' nodes. (It's a pity we can't specify several content types.)I had this in mind because I thought we would use such a nifty parameter too. That is, we could use
node/$bookmarkable-12/whoto show the tab only on nodes that are associated with book #12.And I now see that in your specific case, Moshe, you could simply use the URL
node/$node-event/whoto show this tab only on event nodes.Just let me know if you want me to do it. I had this on my mind for some time.
I'll have a look at it in a day or two.
Comment #8
mooffie commentedHmmm. You know, this nice
$node-typefeature makes the$bookmarkableproposition almost unneeded. What do you think?I'll propose a patch to Views to be able to specify more than one content types there (i.e.,
node/$node-story,page/who).Comment #9
moshe weitzman commentedi'd love for you to write the patch.
Comment #10
moshe weitzman commentedyeah moofie - seems like your generous help is best used reviewing the views breadcrumb patch that karen posted and adding that multiple node type feature.
Comment #11
quicksketchWow, nice usage moofie! We could include this as a default view, but it is a bit annoying that the tab will show up for all node types, even ones that don't have that particular bookmark type. We could manually make the menu in views_bookmark_menu() and tie it to the path of a default view, but I wonder if that's getting to be too much of a pain to override or disable. An access hook in the views definition would definitely solve the problem, but is this something that we should just do manually until then?
Comment #12
mooffie commented(I'll soon update you.)
Comment #13
mooffie commentedThere are several sub-issues involved here, so I'm starting three offshoot issues so we can focus the discussion:
Issue: Conditionally putting a "Who's bookmarked this" tab on a node
Moshe wrote:
Yeah, I just proposed the patch. All explained in that issue above.
Ditto.
Another offshoot:
Issue: Allow sort by user names
And another:
Issue: Start a "tips and tricks" handbook section
Comment #14
quicksketchClosing the Views Bookmark queue. This module has been replaced by Flag. If interested in migrating the issue to Flag, please move this issue or open a new issue in the Flag queue.