Default Avatar
Posted: 27 Jul 2011, 08:40
Default Avatar
Written by blkjack-21 and Stoker
This snippet will give users a default avatar. Off course only if they haven't chosen one in UCP
First version by blkjack-21 will display the default avatar everywhere on the board, the second version by Stoker will only display default avatar on viewtopic.
Version 1 by blkjack-21
Open: includes/functions_display.php
Find:
In line find:
Replace with:
Version 2 by Stoker
Open prosilver/template/viewtopic_body.html
Find:
In line add after:
Open subsilver2/template/viewtopic_body.html
Find:
Add after:
Save, upload changed files and refresh the templates
Written by blkjack-21 and Stoker
This snippet will give users a default avatar. Off course only if they haven't chosen one in UCP
First version by blkjack-21 will display the default avatar everywhere on the board, the second version by Stoker will only display default avatar on viewtopic.
Version 1 by blkjack-21
Open: includes/functions_display.php
Find:
Code: Select all
if (empty($avatar) || !$avatar_type || (!$config['allow_avatar'] && !$ignore_config))
{
return '';
Code: Select all
return '';
Code: Select all
return '<img src="images/avatars/gallery/no_avatar.gif" alt="' . ((!empty($user->lang[$alt])) ? $user->lang[$alt] : $alt) . '" />';
Version 2 by Stoker
Open prosilver/template/viewtopic_body.html
Find:
Code: Select all
<!-- IF postrow.U_POST_AUTHOR --><a href="{postrow.U_POST_AUTHOR}">{postrow.POSTER_AVATAR}</a><!-- ELSE -->{postrow.POSTER_AVATAR}<!-- ENDIF -->
Code: Select all
<!-- ELSE --><img src="{ROOT_PATH}images/gallery/no_avatar.gif" width="125" height="125" alt="" />
Open subsilver2/template/viewtopic_body.html
Find:
Code: Select all
<!-- IF postrow.POSTER_AVATAR -->
<tr>
<td>{postrow.POSTER_AVATAR}</td>
</tr>
Code: Select all
<!-- ELSE -->
<tr>
<td><img src="{ROOT_PATH}images/gallery/no_avatar.gif" width="125" height="125" alt="" /></td>
</tr>