I have found that you can add " Boomark Count" to the tables in Views. That works well.
Would you mind giving us the correct code to use in node.tpl.php to display how many users "bookmarked" a particular node? Thanks much!
I have found that you can add " Boomark Count" to the tables in Views. That works well.
Would you mind giving us the correct code to use in node.tpl.php to display how many users "bookmarked" a particular node? Thanks much!
Comments
Comment #1
quicksketchOops sorry I answered this in http://drupal.org/node/169334 with the new API function provided there. I'll re-iterate though that a view would probably be the more flexible option.
Comment #2
chadchandler commentedThis is slightly different I think? If you are familiar with " De.licio.us" (social bookmarking), there is a count on the node that shows how many users have saved (or in this case bookmarked) a particular node.
http://del.icio.us/ Check out the number in Blue, as thats what I'm aiming for. Any ideas? Thanks Ske7ch!
Comment #3
quicksketchAh yes, this is a bit different. Here's a nice easy way.
Comment #4
quicksketchComment #5
chadchandler commentedHere is the code I inserted into my custom Node.(type).tpl.php file. Couldn't get it to work.
All I changed was the Viewsbookmark ID I wanted to count. Am I also supposed to change $nid to the node id I want to count bookmarks for? I kind of wanted to to be automatic if it's possible.
Comment #6
quicksketchSorry I left off an 's':
Comment #7
chadchandler commentedThanks Sketch!
Comment #8
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #9
newbstah commentedAm a big fan of your module and I think I'm doing something fundamentally wrong with it. I used the above code - and put it into phptemplate_variables. You can read the discussion here:
http://drupal.org/node/212203
I'm a beginner and it's my first phptemplate variables call and that's why I put it there instead of here. Unfortunately, it doesn't seem that the problem is the phptemplate call. (or maybe what I'm trying to do is a fundamenally flawed idea) I'm thinking that it's something you could see that I'm doing wrong at a glance and I'd be grateful if you'd take a quick look. Wherever you reply I'll make sure the crosslinks work in case anyone else wants to try it later.
Meanwhile, here's the code as it stands now:
Comment #10
newbstah commentedHave a conditional with sentence structure that matches number ('1 member' '2 members') over at this thread:
http://drupal.org/node/212203#comment-699095
Maybe it will save someone ten minutes sometime.
Comment #11
chadchandler commentedComment #12
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.