Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [SandraR] Adding an Avatar

Quote Reply
Re: [SandraR] Adding an Avatar In reply to
You will need a global to set this up - at the moment you are only looking up the avatar of the logged in user.

Assuming your avatars are stored in /images/avatars/, and you store the filename in a column called 'Avatar', you will need a tag in your template similar to this:

Code:
<img src="/images/avatars/<%avatar($LinkOwner)%>"/>
The you need a global called 'avatar' like so:
Code:
sub {
my $in = $_[0];
my $user = $DB->table('Users')->select( ['Avatar'], {Username => $in } )->fetchrow;
}
I adapted this from another global on one of my sites so hopefully it works for you Wink.
Subject Author Views Date
Thread Adding an Avatar SandraR 1903 Oct 18, 2006, 3:33 PM
Post Re: [SandraR] Adding an Avatar
aus_dave 1861 Oct 18, 2006, 4:19 PM
Post Re: [SandraR] Adding an Avatar
fuzzy logic 1866 Oct 18, 2006, 4:25 PM