vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   Avatar Gallery Hack (https://vborg.vbsupport.ru/showthread.php?t=48704)

Hwulex 02-07-2003 10:00 PM

Avatar Gallery Hack
 
_/?\_/?\_/?\_/?\_/?\_/?\_

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.


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 ;)

[high]* Velocd clicks install
[/high]

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.

Quote:

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:
Code:

$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:
Code:

$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/showthrea...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 :

Quote:

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

Quote:

05-15-03 at 01:03 AM Alien said this in Post #17
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.



Quote:

07-12-03 at 08:23 AM larryd said this in Post #23
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

Quote:

Originally Posted by Alien
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.


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

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01208 seconds
  • Memory Usage 1,819KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete