Version: 1.1, by mfyvie
Developer Last Online: May 2008
Category: Profile Enhancements -
Version: 3.6.7
Rating:
Released: 06-01-2007
Last Update: 01-20-2008
Installs: 81
DB Changes Uses Plugins Auto-Templates
Re-useable Code Translations
No support by the author.
*** 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
No template or file edits, just a single .xml file to install
Phrase-based - update language strings as you like
Can either omit the used avatars from the display, or show them as unavailable
Can optionally display a count of how many times each avatar is used
All options configurable via the admin control panel
Install routine adds an additional index to ensure database performance not impacted on larger boards
The inspiration from this mod came from a similar one for vBulletin 3.0 by VBDev. Even though there is almost no code in common between these mods I've sought and obtained his permission to release this.
Installation (30 seconds)
Download the attached .xml file
Go into your admin control panel -> Plugins & Products -> Manage Products -> Add/Import Product.
Press the browse button to locate the .xml file you just downloaded click OK.
Ensure that "Allow Overwrite" is set to "Yes" and press "Import"
Note: requires MySQL version 4.1 or higher.
Configuration
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.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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:
/*
This query will return a list of all of those users on your board who share an avatar with
at least one other person. This will allow you to contact them, edit them, or do whatever
you like with the information.
If this query doesn't work, you may be using prefixes in front of your table names. In this
case you'll have to edit the table names in the FROM line.
For example if your table prefix was vb then the FROM line would look like this:
FROM vbavatar av1,vbuser usr1, vbuser usr2
If you don't use table prefixes (most people), just do nothing and run this query as is
*/
SELECT distinct usr1.userid ,usr1.username, av1.title, av1.avatarid, av1.imagecategoryid
FROM avatar av1, user usr1, user usr2
WHERE av1.avatarid=usr1.avatarid
AND av1.avatarid=usr2.avatarid
AND usr1.userid <> usr2.userid
and usr1.avatarid>0
and usr2.avatarid>0
order by 4 asc
It can sometimes be interesting to see just how much you actually needed this mod
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.
SELECT avatar.avatarid, avatar.title, avatar.minimumposts, avatar.avatarpath, avatar.imagecategoryid, avatar.displayorder, count(1) FROM user , avatar WHERE user.avatarid = avatar.avatarid AND avatar.imagecategoryid = 3 AND minimumposts <= 1167 GROUP by avatar.avatarid UNION SELECT avatarid, title, minimumposts, avatarpath, imagecategoryid, displayorder, 0 FROM avatar WHERE avatarid not in (select distinct avatarid from user) AND imagecategoryid = 3 AND minimumposts <= 1167 ORDER by displayorder, title LIMIT 0,10;
MySQL Error : You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'select distinct avatarid from user) AND imagecateg Error Number : 1064 Date : Sunday, June 3rd 2007 @ 02:53:25 PM Script : http://www.ucsclan.co.uk/forum/profile.php?do=editavatar Referrer : http://www.ucsclan.co.uk/forum/profile.php?do=editoptions IP Address : 83.100.253.11 Username : FlatLiner Classname : vb_database