Closed (fixed)
Project:
Role Signup
Version:
master
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
7 Dec 2007 at 02:10 UTC
Updated:
16 Feb 2008 at 00:01 UTC
Jump to comment: Most recent file
I've this working with User Badges (http://drupal.org/project/user_badges), if someones wants the patch I can post it...
introfini
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | rolesignup.module.patch | 880 bytes | introfini |
Comments
Comment #1
WISEOZ commentedDo you mean that you have this working with Role Signup so that a user gets a certain badge based on the role they are being assigned to. Can you explain what your patch does? I might be interested. Thanks!
Comment #2
introfini commentedIt does exactly that, when the user is creating is account it gets the badge associated with the role.
introfini
Comment #3
WISEOZ commentedI'm certainly interested! I'm looking to have the "user badge" displayed for one particular role everywhere their Username appears. So, it sounds like this would at least create the association between the user and the role and then I'd just need to figure out how to marry the two together in the layout. Thanks!
Comment #4
introfini commentedUser badges does that on is own. Check it out and give it a try...
Comment #5
WISEOZ commentedI TOTALLY missed that! Thanks so much for pointing out the obvious. Duh!
Anyhow, now User Badges does everything I need expect it includes the badge as a new section in the profile. Do you know how I'd go about associating the badge display to the Username wherever it's shown. I've seen this on a few sites that use User Badges but can't quite figure this one out.
Comment #6
introfini commentedOn the theme page put
print user_badges_for_uid($uid);. read the readme.txtintrofini
Comment #7
WISEOZ commentedI gave this a shot a few different ways based on the README but it wasn't quite what I was looking for. I'm still looking for the user badge to appear next to the Username on pages, forums, and whatnot. I guess what I'm looking for may be more complicated. Thanks for your continued advice.
Comment #8
introfini commentedyou have to add that code to the theme or else it will not work
Comment #9
WISEOZ commentedI had added this code to the page.tpl.php within my themes directory. Is that what you meant?
Comment #10
introfini commentedDisplay badges
==============
To display user badges in your theme use :
print user_badges_for_uid($uid);Note: $uid means 'a user id' here, not the literal use of $uid. Most people will use
the uid of the node ($node->uid) or comment ($comment->uid) author.
--------
so the best place is node.tpl.php and comment.tpl.php
Comment #11
WISEOZ commentedAdding it to node.tpl.php did the trick! Thanks so much for hanging in with me.
Comment #12
hdornier commentedI'm very interested by this patch. Could you post it, please.
thank you very much
Comment #13
introfini commentedHi,
You should substitute the function rolesignup_user() for this one:
I can send you a diff file if you prefer.
introfini
Comment #14
cyberswat commentedwould appreciate it if you could post a patch to this issue. Thanks
Comment #15
introfini commentedhi,
here it is...
thanks,
introfini
Comment #16
cyberswat commentedComment #17
cyberswat commentedThanks introfini ... I looked into this and I believe that you will get this functionality with the dev version of http://drupal.org/project/autoassignrole ... the original version of Role Signup did not use Drupal's hooks properly
Comment #18
cyberswat commentedand I hit submit to quick ... I installed the user badge module and I think it's working correctly with the autoassign module ... could you verify? http://drupal.org/project/autoassignrole
Comment #19
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.