![]() |
Unique Avatars
*** Staff note: The author of this modification has passed away in a diving accident. We wish his family all strength in dealing with this traggic issue. ***
Have you ever been frustrated by the fact that many of your users choose the same avatars from your pre-defined avatars? Now you can prevent users from selecting avatars that others are already using. Features
Installation (30 seconds)
VBulletin Options -> Unique Avatar Version History 1.0 - Initial release (02.06.2007) 1.1 - 1 minor bugfix (20.01.2008) See screenshots for further details. |
That is a great idea. I like it!
If two people on the board already have the same avatar and you install this, what effect will it have on those two people?? |
I like this idea....nice of ya to rls it.
|
No effect, but if one of them selects a different avatar, then they won't be able to reselect it (since at least one other person is using it).
If you configure the mod to show the count of how many people are using a given avatar you can get an overview of which avatars are used. It would be possible to craft some queries to show you which users were using a duplicate avatar (count of 2 or higher), and theoretically it would be possible to make a query which removed the avatar from these users (forcing them to choose again, and therefore no more duplicates possible from that point on). |
Nice idea.
Thanks for the share, Mat |
Not a bad idea. Once I get my forum going with some more advatars, I'll give this hack a crack.
|
Great idea .. thanks mfyvie
Clicked install. |
i love the idea, great one mate!
|
Nice thank you installed
|
Very nice! Can't believe this isn't a default feature.
|
very nice...installed
|
Nice buddy :)
|
Awesome idea, mfyvie! Great work. :)
|
Yes! I have been asking for this of late, here and within the vBulletin forums. Many thanks!
|
Here is a query that will allow you to quickly identify existing users on your board that have the same avatars as others.
If you don't know how to run an SQL query, in your admincp go to Maintenance -> Execute SQL Query, then copy and paste the query below: Code:
/* Note: I found that when I ran this inside the admincp it only gave me the number of rows returned. If you run it in another mysql tool you'll get the full results, including the usernames affected, etc. |
What if u have a thousand member ,! Installed indeed .
|
Installing now!
|
Ha! This is very nice - I was looking for something similar.
This will do just fine - Thanx very much for the sharing! Jacquii. |
Installed, awesome idea, I have been waiting for something like this for a long time :-)
|
i get this error when i enable it
in my usercp change avata PHP Code:
|
Hi Andy, I can't think why that is happening. The query is correct. Can you confirm that you aren't using any table prefixes (in other words, the tables in your database are actually called avatar and user). Also please tell us the version of php and mysql that you are using. You are the first to report any problems with this, so I'm interested to know if there is something different about your setup.
Mark |
Does this conflict at all with the default Avatar / No Avatar image?
|
Quote:
|
Quote:
PHP 4.3.11 no table prefixes hope that helps |
Quote:
|
sorry
MySQL client version: 4.1.21 |
Quote:
|
Would you like something that will automatically REMOVE the avatar for those users who already have the same avatar as others?
The following two queries will do this. The first one will report how many duplicates you have, the second will delete the avatars. WARNING: The second query will actually change your database. I've tested it on my system and am confident that it works. However, if you run this query on a live system and it breaks it, and you didn't back it up - don't come running to me about it! First query: Code:
select avatarid,count(1) from user Second query: Quote:
Note that these queries, as well as the one I posted a few days back will work even if you don't have this mod installed (might be a bit slow due to lack of an extra index though). If there are two users using the same avatar it won't delete both of their avatars - the lowest userID (usually the oldest member) gets to keep theirs, only the "new" guy will lose theirs. Once you've used this to eliminate all the duplicates you can be sure that no more will happen when you are running this mod. The only side effect is the users might wonder where their avatar went... By the way - in case anyone thinks I am any good at making or changing these queries - I'm not. I gave it to some database gurus to do. They had to scratch their heads a bit before coming up with the final solution. They said it wasn't so simple to figure out. |
Thanks for the hack and agreed, this should be a default feature in VB.
|
I have the same problem as Andy:
Code:
Database error in vBulletin 3.6.6: |
JordanT - your issue is not the same as Andy's - the error message is totally different.
It looks like you are the first guy to use table prefixes, and I see a small mistake in the query, I'll work on a fix soon, but am still looking at Andy's issue. I'll update this thread with more info soon. |
I'm also having trouble getting this mod to work. I would appreciate any help you can offer.
PHP version 4.4.7 MySQL version 4.0.23 Code:
Database error in vBulletin 3.6.7: |
Ok, so far we've had two people with error 1064 - reporting a syntax error. This is very strange, since the syntax seems to be correct. Please run a repair / optimise on your database to see if it corrects the issue. To be honest this is a stab in the dark, but I can't think what else would cause this.
The report of error 1146 is a bug which affects people with table prefixes. I've made some changes, but waiting for the guy who reported it to get back to me so I can get him to test it. ABMAC - please report back after running a repair/optimise |
ABMAC - apparently subqueries (which this one is using) are only available in mysql 4.1 and up. You are running 4.0 - would you consider upgrading? Andy is running 4.1 and having the same issue, but the cause may be different.
|
Ok, I've updated the XML file - it was not handling situations where people are using table prefixes. This will resolve JordanT's issue, but not the issue seen by ABMAC or Andy.
|
just like to say thanks for your work trying to resole this matter
|
ok installed on another site and get the same
as soon as i enable Force unique avatars? to yes i get the error runs fine as in the screen shot |
Thanks, mfyvie, I'll see about getting MySQL 4.1 installed. Should I still run repair/optimise on my database? My board is fairly new and shouldn't have any problems yet.
|
You don't have to, but it probably wouldn't hurt. I wasn't able to figure out Andy's issue, but he has no control over his mysql settings so we were limited in what we could do. Your issue should be fixed by an upgrade though.
I'm going to look at re-writing the query so that people with < mysql 4.1 can also use this mod, but it's not simple. |
Thanks for fixing my problem. Much appreciated!
|
All times are GMT. The time now is 07:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|