Default Avatar
Re: Default Avatar
no problem
Re: Default Avatar
Hey
first of all very nice Snippet,,
i want to ask to Stoker which modification you have used for Avatar of poster on Index and Viewforum ( by Lefty47 mod) , i mean which users dont have Avatar here showing for him no avatar image on index & viewforum ,, how you have done this ?
THanks in advance
first of all very nice Snippet,,
i want to ask to Stoker which modification you have used for Avatar of poster on Index and Viewforum ( by Lefty47 mod) , i mean which users dont have Avatar here showing for him no avatar image on index & viewforum ,, how you have done this ?
THanks in advance
- Stoker
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 23:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
- Contact:
Re: Default Avatar
I use the first one. Also read comments here: modsdb.php?mode=moddetail&m=58
Board rules! No PM support
Re: Default Avatar
sorry stoker in viewforum its showing me big avatar like profile ,,
which modification i have to do for viewforum ?
thanks
which modification i have to do for viewforum ?
thanks
- Stoker
- Site Admin
- Posts: 3536
- Joined: 12 May 2008, 23:26
- BBCodes: 239
- Favourite BBCode: Anipro
- Favourite MOD: PrettyPhoto
- Location: Denmark
- Contact:
Re: Default Avatar
As I wrote here: Re: Default Avatar (Post by apnaitaly #6141)
Board rules! No PM support
Re: Default Avatar
i just sets the Default Avatar for register user
Re: Default Avatar
Stoker » 10 Aug 2010, 22:55 wrote:As I wrote here: Re: Default Avatar (Post by apnaitaly #6141)
Thanks Stokerr for Reply ,, but i cant understand 2nd comments,, how i can arjust the modification ? i mean where i have to edit or replace ? sorry but i have tried a lot but i cant understand
pse use the following code in viewforum.php instead
Code: Select all
$avatar_img = '';
$avatar_max_dimensions = $topic_last_poster_avatar_height = $topic_last_poster_avatar_width = $topic_first_poster_avatar_width = $topic_first_poster_avatar_height = 40;
if ( !empty($row['topic_first_poster_avatar']) || !empty($row['topic_last_poster_avatar']))
{
$avatar_max_dimensions = 40; // here you can change the max-width you would like to have the avatars displayed
if ( !empty($row['topic_first_poster_avatar']))
{
if ( $row['topic_first_poster_avatar_width'] >= $row['topic_first_poster_avatar_height'] )
{
$topic_first_poster_avatar_width = ( $row['topic_first_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_width'] ;
$topic_first_poster_avatar_height = ( $topic_first_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_width'] * $row['topic_first_poster_avatar_height']) : $row['topic_first_poster_avatar_height'] ;
}
else
{
$topic_first_poster_avatar_height = ( $row['topic_first_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_first_poster_avatar_height'] ;
$topic_first_poster_avatar_width = ( $topic_first_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_first_poster_avatar_height'] * $row['topic_first_poster_avatar_width']) : $row['topic_first_poster_avatar_width'] ;
}
}
if ( !empty($row['topic_last_poster_avatar']))
{
if ( $row['topic_last_poster_avatar_width'] >= $row['topic_last_poster_avatar_height'] )
{
$topic_last_poster_avatar_width = ( $row['topic_last_poster_avatar_width'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_width'] ;
$topic_last_poster_avatar_height = ( $topic_last_poster_avatar_width == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_width'] * $row['topic_last_poster_avatar_height']) : $row['topic_last_poster_avatar_height'] ;
}
else
{
$topic_last_poster_avatar_height = ( $row['topic_last_poster_avatar_height'] > $avatar_max_dimensions ) ? $avatar_max_dimensions : $row['topic_last_poster_avatar_height'] ;
$topic_last_poster_avatar_width = ( $topic_last_poster_avatar_height == $avatar_max_dimensions ) ? round($avatar_max_dimensions / $row['topic_last_poster_avatar_height'] * $row['topic_last_poster_avatar_width']) : $row['topic_last_poster_avatar_width'] ;
}
}
}