Jelmertjee
03-10-2007, 11:50 AM
I'm trying to add the $userinfo avatar to a page of the 'custom user page (https://vborg.vbsupport.ru/showthread.php?t=91903)' mod i'm using. I'm sure i need to make some adjustments to the userpage.php file but i'm not very experienced with PHP.
What i think i need to do:
Adjust the query to not only fetch the userid and username but also the avatarpath/url
Define a variable which i can use in my template like this: $userinfo[avatarurl]
Make sure the display is also correct if users do not have an avatar.
Any help with this would be greatly appreciated, here are some snippets of code that i think are useful, again, i'm not sure because i have very little experience with php
part of query from showthread.php:
" . iif($vbulletin->options['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,') . "
What i think i need to do:
Adjust the query to not only fetch the userid and username but also the avatarpath/url
Define a variable which i can use in my template like this: $userinfo[avatarurl]
Make sure the display is also correct if users do not have an avatar.
Any help with this would be greatly appreciated, here are some snippets of code that i think are useful, again, i'm not sure because i have very little experience with php
part of query from showthread.php:
" . iif($vbulletin->options['avatarenabled'], 'avatar.avatarpath, NOT ISNULL(customavatar.userid) AS hascustomavatar, customavatar.dateline AS avatardateline,customavatar.width AS avwidth,customavatar.height AS avheight,') . "