Previous Thread
Next Thread
Print Thread
Hop To
#252063 01/14/2013 2:42 AM
Joined: Feb 2004
Posts: 20
Likes: 1
N
Stranger
Stranger
N Offline
Joined: Feb 2004
Posts: 20
Likes: 1
How do I show the logged in user's avatar within a custom island?

I've asked for this one awhile back at UBBDev.com, but thought I'd see if anyone here as any ideas.

Ideally, I'd like it to be similar to the way moods are displayed and even allow for the option to change the avatar in the island display and maybe show a generic avatar for visitors or those without an avatar, but I'd settle for a basic display.

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Pooh-Bah
D Offline
Joined: Jan 2004
Posts: 2,474
Likes: 3
You may be able to adapt the featured member island.
(cache_builders/featured_member.php)

This is the query used...

SQL Query
$query = "
	SELECT t1.USER_DISPLAY_NAME,t1.USER_ID,t2.USER_NAME_COLOR,t1.USER_MEMBERSHIP_LEVEL,t2.USER_AVATAR,t1.USER_REGISTERED_ON,t2.USER_TOTAL_POSTS,t2.USER_AVATAR_WIDTH,t2.USER_AVATAR_HEIGHT
	FROM   {$config['TABLE_PREFIX']}USERS as t1,
		   {$config['TABLE_PREFIX']}USER_PROFILE as t2,
		   {$config['TABLE_PREFIX']}USER_DATA as t3
	WHERE  t1.USER_ID = t2.USER_ID
	AND	   t1.USER_ID = t3.USER_ID
	AND    t1.USER_IS_BANNED != '1'
	AND	   t1.USER_ID > 1
	$thisclause
	ORDER BY rand() limit 1 
";


Of course you'd need to remove ORDER By rand() and set your own clause for $thisclause

...but I think if I needed to do this - it's probably where I'd start.

Just a thought smile

Last edited by driv; 01/14/2013 6:39 AM. Reason: ooops - sorry just realised this doesn't cover the 'logged in' aspect - but leaving the post in case it helps somehow.
Joined: Feb 2004
Posts: 20
Likes: 1
N
Stranger
Stranger
N Offline
Joined: Feb 2004
Posts: 20
Likes: 1
Thanks for replying driv! I did look through areas that displayed avatars to try and figure it out, but couldn't get anything to work.


Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Version 7.7.5 Images suddenly not displaying
by Stovebolt - 05/04/2024 11:19 AM
Bots
by Outdoorking - 04/13/2024 5:08 PM
Can you add html to language files?
by Baldeagle - 04/07/2024 2:41 PM
Do I need to rebuild my database?
by Baldeagle - 04/07/2024 2:58 AM
This is not a bug, but a suggestion
by Baldeagle - 04/05/2024 11:25 PM
Who's Online Now
0 members (), 795 guests, and 149 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Stones
Stones
by isaac, August 19
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240505)