![]() |
I'm trying to create a hack which displays member's avatars in memberlist.php. So, in memberlist.php, where it says this...
PHP Code:
PHP Code:
|
hmm im not sure why but maybe try to use a variable w/o array
ie $avatar and are u sure $userinfo[avatar] is actually the avatar? try this: PHP Code:
|
Code:
$[high]avatarurl[/high]=getavatarurl($[high]userinfo[/high][userid]); And [high]avatarurl[/high] because that's what postbit_avatar uses. |
Also using getavatarurl() adds an extra query whenever its run, so in a list with lots of members the page will really slow down.
Anyway, here's how you do it. In memberlist.php, add this: Code:
if ($userinfo[avatarid]!=0) { Code:
if ($userinfo[homepage]!="" and $userinfo[homepage]!="http://") { Code:
$users=$DB_site->query("SELECT * Code:
$users=$DB_site->query("SELECT *,avatar.avatarpath,NOT ISNULL(customavatar.avatardata) AS hascustomavatar,customavatar.dateline AS avatardateline |
Oh, that's perfect, FireFly! Thanks for helping out a PHP-newbie! :)
|
This doesn't seem to display custom avatars tho... can anyone post a mod that will allow this to show them?
|
[QUOTE]Originally posted by HellRazor
This doesn't seem to display custom avatars tho... can anyone post a mod that will allow this to show them? |
OK, i'm probably going to get smacked down for asking a stupid question, but where do you put $userinfo[avatar] in the template???
Thanks :cheeky: h Eric C |
[QUOTE]Originally posted by svoec
OK, i'm probably going to get smacked down for asking a stupid question, but where do you put $userinfo[avatar] in the template??? Thanks :cheeky: h Eric C |
that worked great, I was trying to edit the wrong template.
only problem is, it throws the columns off one row. Did I miss something?? or do I need to change another template?? Thanks again! Eric C |
I tinkered a bit and found where you change the rows (memberlist template)
Sorry for being such a newbie, I have been running VB for a total of 4 days now!! :) Thanks LanciaStratos !! Eric |
[QUOTE]Originally posted by svoec
I tinkered a bit and found where you change the rows (memberlist template) Sorry for being such a newbie, I have been running VB for a total of 4 days now!! :) Thanks LanciaStratos !! Eric |
it looks as if it's only showing up for people with website URLs in their profiles :-/
|
[QUOTE]Originally posted by geniuscrew
it looks as if it's only showing up for people with website URLs in their profiles :-/ |
I am having a problem with all of the avatars showing up in the listing. I have a few of them showing up but there are more that don't show up. Can anyone please tell me why some will show up and some will not? I followed Chen's code just like he wrote it.
|
[QUOTE]Originally posted by Boofo
I am having a problem with all of the avatars showing up in the listing. I have a few of them showing up but there are more that don't show up. Can anyone please tell me why some will show up and some will not? I followed Chen's code just like he wrote it. |
Not all of the users in the list have avatars. But the listing only showed about half of the avatars that I know for a fact are there. I have them listed in the profiles and they all show up there (if the users have them) fine. :)
[QUOTE]Originally posted by LanciaStratos Are you sure that all of the users in the list have actually set avatars? |
Hey when I added that code
to add the avatar to teh memberlist it made it where $userinfo[userid] would not work on memberlist meaning the name in memberlist link to profile would not select userid it would just be = instead of =userid (=34) at the end of teh url to profile. Also it would not let select a userid for search post eithier |
[QUOTE]Originally posted by Boofo
Not all of the users in the list have avatars. But the listing only showed about half of the avatars that I know for a fact are there. I have them listed in the profiles and they all show up there (if the users have them) fine. :) |
just added this, but for some reason it only shows half the av's 0_o
|
All times are GMT. The time now is 08:36 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|