Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Unique Avatars Details »»
Unique Avatars
Version: 1.1, by mfyvie mfyvie is offline
Developer Last Online: May 2008 Show Printable Version Email this Page

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.

Comments
  #32  
Old 06-06-2007, 07:23 AM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #33  
Old 06-06-2007, 08:03 AM
ABMAC ABMAC is offline
 
Join Date: Oct 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:

Invalid SQL:

            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 <= 8681
            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 <= 8681
            ORDER by displayorder, title
            LIMIT 50,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         : Tuesday, June 5th 2007 @ 04:04:37 PM
Script       : http://megomuseum.com/community/profile.php?do=editavatar&categoryid=3&page=6
Referrer     : http://megomuseum.com/community/profile.php?do=editavatar&categoryid=3&page=5
IP Address   : ***.***.***.***
Username     : ABMAC
Classname    : vb_database
Reply With Quote
  #34  
Old 06-06-2007, 08:17 AM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #35  
Old 06-06-2007, 09:12 AM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #36  
Old 06-06-2007, 09:23 AM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #37  
Old 06-06-2007, 09:35 AM
Andyucs's Avatar
Andyucs Andyucs is offline
 
Join Date: Nov 2006
Location: Okcular, Turkey
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just like to say thanks for your work trying to resole this matter
Reply With Quote
  #38  
Old 06-06-2007, 10:09 AM
Andyucs's Avatar
Andyucs Andyucs is offline
 
Join Date: Nov 2006
Location: Okcular, Turkey
Posts: 115
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #39  
Old 06-06-2007, 03:20 PM
ABMAC ABMAC is offline
 
Join Date: Oct 2005
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #40  
Old 06-06-2007, 03:29 PM
mfyvie mfyvie is offline
 
Join Date: Mar 2007
Location: Zurich, Switzerland
Posts: 336
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #41  
Old 06-06-2007, 08:17 PM
JordanT JordanT is offline
 
Join Date: Mar 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks for fixing my problem. Much appreciated!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:37 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04911 seconds
  • Memory Usage 2,307KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete