1
Dan86
Access Avatar Database
  • 2006/11/8 22:22

  • Dan86

  • Just popping in

  • Posts: 15

  • Since: 2006/5/23


Hi, I am using MyReviews and I would like to know how to access avatars in php because I want to put a user's avatar next to each review they make.

I tried _US_AVATAR among many others. How do I call on a users avatar in php?

.. using XOOPS 2.

please help! :)

2
OldFriend
Re: Access Avatar Database
  • 2006/11/11 9:42

  • OldFriend

  • Just popping in

  • Posts: 99

  • Since: 2005/10/28


This is untested but I think will do what you want.

$member_handler =& xoops_gethandler('member');
$thisUser =& $member_handler->getUser($uid);
$avImg "<img src='".XOOPS_UPLOAD_URL."/".$thisUser->getVar('user_avatar')."' alt='".$thisUser->getVar('uname')."' />");

3
Dan86
Re: Access Avatar Database
  • 2006/11/11 19:25

  • Dan86

  • Just popping in

  • Posts: 15

  • Since: 2006/5/23


Thank you so so much. You made a small error with the ) at the end of $avImg, but I fixed it and I'm really extreemely greatful.

Thank you again.

~Dan

4
LiliVG
Re: Access Avatar Database
  • 2006/11/13 4:38

  • LiliVG

  • Just popping in

  • Posts: 65

  • Since: 2005/12/25


Would this work for blocks on the front page, like CBB last poster in recent topics, etc.?

Login

Username:
Password:

Lost Password? Register now!

Who's Online

70 user(s) are online (48 user(s) are browsing Support Forums)


Members: 1


Guests: 69


heyula,

more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits