Posted by droople on October 26, 2007 at 8:35pm
Jump to:
| Project: | Avatar Selection |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | stella |
| Status: | postponed |
Issue Summary
How do I make users have a random avatar upon registration out of a group of avatars that the admin has predefined
for example say I have 50 predefined avatars, that users can choose from, is there a way of making the default avatar be random
----------
Or the other situation will be, out of the 50 above, 25 are female oriented and the other 25 are male oriented avatars. If after puting a mandatory profile field upon registration to select male/female
the code executes so that the male/female avatar is chosen according to the user's selected gender
----
This however should all be ignored if the user then posts his/her own avatar
THANKS
Comments
#1
Hi,
I don't think assigning avatars based on gender will work. It's not a standard profile field. I haven't played with adding custom fields to the profile, but I imagine there's no standard way of identifying which field is the gender.
Currently, using the standard drupal user picture config, it is possible to configure one image as the default avatars. I haven't looked into it yet, but it could be possible to set up a group of avatars available to anonymous users (which is what you are when registering) and then randomly assign an avatar out of those. I'll look into it and get back to you.
Cheers,
Stella
#2
Hi,
Sorry for the delay in getting back to you. I've just checked in some code to CVS that will randomly assign an avatar to a user when they edit/register their account and haven't uploaded or selected an avatar from the list. If the account already exists with an avatar, then they will keep that one.
This will be included in the next release.
Cheers,
Stella
#3
Automatically closed -- issue fixed for two weeks with no activity.
#4
Released in Avatar Selection 5.x-2.3.
Cheers,
Stella
#5
how bout this.
after Admin creates a set of profile fields he can then go over to Avatar selection and select a default avatar based on a profile field by selecting from a list of all profiles fields.
basically you have a drop down list of all profile fields that have a drop down list of admin created answers such as gender: male or female.
you slect an avatar based on the profiled fields answer
#6
Marked #224218 as a duplicate of this issue.
#7
underpressure: I looked into what you suggested. Unfortunately, there is no api provided by the profile module that returns a list of profile fields or a list of profile fields of a certain type. The nearest function to this requires advanced knowledge the profile category. I also couldn't find an api for getting the default list of values of a profile field. I've checked both 5.x and 6.x versions. So I'm afraid this won't be implemented any time soon.
Cheers,
Stella
#8
you might want to look at how google adsense module handles this issue
#9
Setting to postponed until I have time to look at the google adsense module (and so it appears in my issues list again!).
Cheers,
Stella
#10
joncup: I took a look at how the adsense module uses the profile fields. As I mentioned before, there is no API function that can return the list of profile fields or their default values. To overcome this the adsense module queries the database directly, which I am reluctant to do.
However if enough people request this feature (by adding their +1 s to this issue), then I might implement it despite my reluctance to directly query the db. It's not a small piece of work, so the availability of an API would really help.
Cheers,
Stella
#11
i need this feature too.
subscribe
#12
+1
Looking for something for Drupal6 that can randomly assign an avatar to anonymous users not looking for for the gender option so much.
#13
The random avatar feature is already present. The only remaining requested feature not implemented is the avatar by gender option.
Cheers,
Stella
#14
+1
#15
+1
#16
+1
any help needed?
How about creating a small module or adding this to an existing - something like "CCK gender" and let the Avatar Selection module using it if installed?
#17
Have not seen that the discussion is for Drupal 5.x - should i change to Drupal 6.x or create an other issue?
#18
#19
#20
+1
#21
A D7 port of this module would be nice :)