MyBB Community Forums

Full Version: Would a 'randomly assign default avatar' plugin be hard to make?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Exactly as title reads. It would be pretty boring to assign the same default avatar for all users. I want to have an assortment if possible. Can it be done? Also, it doesn't even need to be random, it can be in order.
Example: I have 5 default avatars, let's call em One, Two, Three, Four, and Five.

And let's say I have 12 users. Their names are A, B, C, D, E, F, G, H, I, J, K, and L.
This is how the pairing would go.
A-One
B-Two
C-Three
D-Four
E-Five
F-One
G-Two
H-Three
I-Four
J-Five
K-One
L-Two

As you can see there is an ordered pairing... Not sure if it would make it easier, but just another (worse but possibly easier idea)

Anyhow, I don't believe this plugin exist. Would it be easy to implement? If so, I hope it'd be free, if anyone's willing to take up on it.
So you mean to have Random avatars OR want to assign a Unique avatar to the userID ?
(2011-04-20, 05:23 AM)Yaldaram Wrote: [ -> ]So you mean to have Random avatars OR want to assign a Unique avatar to the userID ?

I'm sorry I don't fully understand the difference by the way you phrased it. Whichever works? As said, it doesn't really matter if the person is given an assigned avatar by random, or if it's by order. Whichever is easier to develop, I'll take.
Released: http://yaldaram.com/showthread.php?tid=645

The plugin randomly pick an avatar from the Specified Folder with Specified Image Type and automatically assinged it to the New Registrant.

- You can select Custom/Default Avatar's Path. (Please do not add a Trailing slash after the folder name)
- You can select Image's Type (You can select which image type should be fetched from e.g. If you select .png from the option list then plugin automatically detect its image extension and pull the URL of that Particular Avatar from all the Avatar images)
- You can select Random Value. This value is useful for randomization. Please note that Lesser the Random_Value greater will be the Randomization.

You can add thousands of avatars images to that folder with only number names like 1.gif , 2.gif , 3.gif and so on.. After that Raise the value of Random_value and leave the plugin to do the rest of the work done Wink