View Full Version : Avatar Gallery Hack
Hwulex
02-07-2003, 10:00 PM
_/?\_/?\_/?\_/?\_/?\_/?\_
Avatar Gallery Hack
Version 1.2.1
26/10/03
By Hwulex
?\_/?\_/?\_/?\_/?\_/?\_/?
History
=======
One of the users on my board requested this earlier today, and rather than doing my uni work, thought I'd tuck into a bit of vBulletin. :D
Strange request, but it's interesting, and useful imo being able to browse through seeing who's using what.
All this hack does is display a list of your forum member's avatars.
Unlike v1.1, there is now only the one option; view only those with an avatar set.
This hack has not been tested on a large scale but worked perfectly on a local test installation of vB 2.3.2.
Working Example:
=================
At present, I do not have an online demo of version 1.2 of this hack working.
You can see version 1.1 of this hack working on my forums:
Xaprief Forum's Avatar Gallery (http://forums.xaprief.com/memberlist.php?s=&action=avatar&what=avatarset).
Contents
=========
Contained in the .zip file are an example image, and instructions.txt (this file)
- instructions.txt -> Instructions for hack installation.
- example.gif -> Shows how the hack is used on the forum.
Use
====
Tested on vBulletin 2.3.2
Files to modify:
- memberlist.php
Templates to modify:
- memberlist
Templates to add:
- memberavatarlist
- memberavatarlistbit
Estimated Install Time: 3 minutes.
Support:
==========
I am a full time university student reading computing so I'm not always available, but I will offer support as much as possible.
Contact:
=========
Email: vbhacks (at) hwulex (dot) com
Updates
========
- 1.2.1: 2-per-page and if problem fixed.
Version History
==============
- 1.1 - Designed for vB 2.2.6, works up to 2.2.9.
- 1.2 - Fixed for 2.3.2, but two errors in code.
- 1.2.1 - Fixed errors from v1.2.
NB: If you do install this hack, please click on the INSTALL button. You will receive updates in your e-mail whenever I add new features to it. Also post a reply with your comments, they are appreciated.
Hwulex
02-08-2003, 08:25 PM
Screenshot:
ULTIMATESSJ
02-08-2003, 08:57 PM
heh nice, i might install this sometime
Velocd
02-08-2003, 09:31 PM
Cool idea, it beats what vB3 is currently trying to do by showing avatars within the memberlist page, which simply makes it look too cramped and a bit tacky. This works good though ;)
* Velocd clicks install
My only suggestion is to add the "memberlist" bar on the avatars page for searching through users by the first letter in their username.
JulianD
02-08-2003, 10:06 PM
Very nice! thanks!
Hwulex
02-08-2003, 10:08 PM
Thanks for comments guys :)
Velocd: I did think about having that as well, but wasn't appropriate for the size of the forums that I run. I may add it if people would like, a good idea for larger forums I suppose :)
Nice forums there mate btw. I see you've also got my forum rules update installed too, cheers :D
WitchyT
02-09-2003, 12:43 AM
Looks great. Going to install it soon. :D
ETA: Looks perfect! *clicks install*
Dean C
02-09-2003, 10:07 AM
Wow that's very nice looking buddy :)!
Good job :D
Regards
- miSt
WitchyT
02-09-2003, 10:33 PM
I get this message when I try to click on a member's profile through the gallery.
This user has not registered and therefore does not have a profile to view.
Clicking mods profile works okay for me. Any idea what's wrong?
Hwulex
02-09-2003, 11:04 PM
Well spotted, cheers WitchyT.
After looking at my own, what seems to be happening is it doesn't have the $userid set on the end of the link. I'll take a look now why not.
Clicking anyone that has an avatar works, but those that don't, doesn't. Strange.
Hwulex
02-09-2003, 11:12 PM
Fixed :D
In the MySQL query I had; SELECT * FROM user. And because of the JOIN to the avatar table, the userid field was ambiguous.
To fix the problem, find:
$users=$DB_site->query("
SELECT *
".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM user
".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid","")."
WHERE $condition
".iif($memberAllGood, " AND usergroupid NOT IN (1,3,4) ", "")."
ORDER BY $orderby $direction
LIMIT ".($limitlower-1).",$limitupper
");
And replace it with:
$users=$DB_site->query("
SELECT user.*
".iif($avatarenabled,",avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline","")."
FROM user
".iif ($avatarenabled,"LEFT JOIN avatar ON avatar.avatarid=user.avatarid
LEFT JOIN customavatar ON customavatar.userid=user.userid","")."
WHERE $condition
".iif($memberAllGood, " AND usergroupid NOT IN (1,3,4) ", "")."
ORDER BY $orderby $direction
LIMIT ".($limitlower-1).",$limitupper
");
The instructions and zip have been updated :)
WitchyT
02-10-2003, 03:29 PM
Great. It works. Thanks! :D
jamoss
02-12-2003, 04:51 AM
Cool! Installed and working great. I changed "Member's Avatars" (improper grammar) to "Avatar Gallery" in the templates.
I also changed the php code to include only those usergroupids that represent admins and subscribed members.
Thanks!
Jennifer
monstergamer
04-05-2003, 10:31 PM
Cool hack! Installed and working great on 2.3.0
Alien
05-04-2003, 03:18 AM
Works nicely, thanks a bunch for this!
Tigga
05-04-2003, 07:07 AM
I doubt this is something I'd use, but still a nice job. :)
Alien
05-14-2003, 11:03 PM
While playing with this, this hack when put into "show only users with avatars" mode will not work if you use general/non-custom avatars on your site.
If a user has a custom one uploaded that they're using it works perfectly fine. The minute you go into your admin cp and add an avatar you want to make available to all users, and they select it, then they will never show in the "show only users with avatars" list.
There is one other hack that has this exact same problem, and that is this hack:
UserCP Stats Panel
https://vborg.vbsupport.ru/showthread.php?s=&threadid=51301
I'm going to post this to hopefully be corrected there as well.
I hope this can be fixed, I won't be able to use this if it won't work with my 100 available avatars. :(
-Jason
enny2
05-17-2003, 03:16 PM
Your wrote in instructions.txt :
Create a new replacement:
but is template not replacement !?
Alien
05-17-2003, 07:12 PM
Yes, he meant template down on the bottom where he said replacements...
gmarik
05-24-2003, 11:16 AM
Nothing works on 2.3
Can somebody fix that?
Alien
05-26-2003, 09:32 PM
Works perfectly fine on vB 2.3.0.
gmarik
05-27-2003, 05:24 AM
Alien, than I give up.
Nothing at all worked on my 2.3
Even the profile was broken... (maybe my fault than or an older version of the hack)
larryd
07-12-2003, 06:23 AM
Sweet, got it working..
You might want to change your directions to actually say add template at the bottom and not add replacement. That messed me up for a while.
Would it be possible to have it give you an option to remove the avatars from the gallery if your an admin? Like give it a yes/no toggle all set to yes for keep them but if you change it to no and submit it would set it to blank?
larryd
07-12-2003, 07:36 AM
I think I can figure most of it out if someone can just tell me what the basic command is to turn a users avatar on or off.
Hwulex
07-18-2003, 03:47 PM
05-15-03 at 01:03 AM Alien said this in Post #17 (https://vborg.vbsupport.ru/showthread.php?postid=395237#post395237)
While playing with this, this hack when put into "show only users with avatars" mode will not work if you use general/non-custom avatars on your site.
*snip*
I hope this can be fixed, I won't be able to use this if it won't work with my 100 available avatars. :(
-Jason
I will try and rectify this problem when I have some time. Cheers for letting me know.
07-12-03 at 08:23 AM larryd said this in Post #23 (https://vborg.vbsupport.ru/showthread.php?postid=417147#post417147)
Sweet, got it working..
You might want to change your directions to actually say add template at the bottom and not add replacement. That messed me up for a while.
Would it be possible to have it give you an option to remove the avatars from the gallery if your an admin? Like give it a yes/no toggle all set to yes for keep them but if you change it to no and submit it would set it to blank?
I don't understand about removing avatars as admin? Please elaborate and then I'll see what I can do. :)
I will also update the instructions to say 'template' instead of replacement, and will do some testing with 2.3.0, which so far I have had no time to do.
Alien
07-18-2003, 08:54 PM
Thanks so much, I look forward to it. :)
-Jason
Alien
08-05-2003, 11:18 PM
Any luck? I'm still interested in the fix when you're able. :D
Hwulex
08-08-2003, 03:18 PM
Not as yet sorry, I've just moved house and am starting a new job on Monday.
Sorry. :(
jdmuniverse
08-08-2003, 05:05 PM
Sweet!
Nice hack!
Thanks
Alien
08-09-2003, 05:20 PM
Okay, thanks for the update. :) I look forward to when you have the time.
Alien
08-29-2003, 03:48 AM
This appears to completely break in 2.3.2, so I guess it can still use that update whenever ya have time. ;)
MaDCaT75
08-29-2003, 08:54 AM
I'd definetly use this when I hit 100 members or so :p
Rampag33
10-25-2003, 04:08 PM
This appears to completely break in 2.3.2, so I guess it can still use that update whenever ya have time. ;)
Same here. A devide by zero error.
Hoping for an update or a fix for v232 as well.
Hwulex
10-25-2003, 05:43 PM
You'll be pleased to hear (I hope) that I am, at this very minute, working on a fix/rewrite for 2.3.2. :)
I've got rid of the /0 error, and altered the templates a little. Now I just need to get it to output some actual avatars. ;)
Hwulex
10-25-2003, 10:55 PM
I don't have a working online version to demonstrate, but from my local testing, it's all good.
So here's the new instructions file for vB 2.3.2. Enjoy.
Original post updated and hack-update sent. :)
Rampag33
10-26-2003, 03:28 AM
I get an error on this line
} #end if ($action=="avatar")
....
If I remove the line it works but only getting 2 avatars a page.
Hwulex
10-26-2003, 04:54 PM
Ah crap, sorry.
I pasted over the instructions code with my memberlist.php code which was altered slightly for testing.
Should be fixed now (files updated). :)
Rampag33
10-26-2003, 11:18 PM
Works perfectly now.
toucan42
09-13-2007, 02:55 PM
This is an old hack, but I'd love to see something like this for 3.6.8 - anyone?
cloyal
09-13-2007, 04:49 PM
ditto.
johnrizz
10-14-2007, 04:02 PM
I wonder if it a work for 3.6.8 I give it a try....
**edit**
Change my mind....
Jerlene
12-15-2007, 09:46 AM
I wonder if it a work for 3.6.8 I give it a try....
**edit**
Change my mind....
Damn. I want to know if it works for 3.6.8
Anyone know if it works with it?
dadoc
05-16-2008, 11:45 PM
Thankyou
nice addition *Installed*
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.