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-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?


All times are GMT. The time now is 01:50 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
  • Page Generation 0.01545 seconds
  • Memory Usage 1,738KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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