Avatar on index
Posted: 27 Jul 2011, 08:40
Avatar on index
Written by Stoker
A little guide that will show you how to get the users avatar shown on forum index.
I have chosen to place it in the Who is online area, but you can place it anywhere you like. Open index.php
Find:
Add after, on a new line:
Prosilver
Open styles/prosilver/template/index_body.html
Find:
Replace with:
Subsilver2
Open styles/subsilver2/template/index_body.html
find:
Replace with:
Credits to vectra-mods for the subsilver2 instructions.
Upload changed files and refresh the template(s)
Written by Stoker
A little guide that will show you how to get the users avatar shown on forum index.
I have chosen to place it in the Who is online area, but you can place it anywhere you like. Open index.php
Find:
Code: Select all
'NEWEST_USER' => sprintf($user->lang['NEWEST_USER'], get_username_string('full', $config['newest_user_id'], $config['newest_username'], $config['newest_user_colour'])),
Code: Select all
'USER_AVATAR' => get_user_avatar($user->data['user_avatar'], $user->data['user_avatar_type'], $user->data['user_avatar_width'], $user->data['user_avatar_height']),
Prosilver
Open styles/prosilver/template/index_body.html
Find:
Code: Select all
<!-- IF S_DISPLAY_ONLINE_LIST -->
<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
<!-- ENDIF -->
Code: Select all
<!-- IF S_DISPLAY_ONLINE_LIST -->
<!-- IF U_VIEWONLINE --><h3><a href="{U_VIEWONLINE}">{L_WHO_IS_ONLINE}</a></h3><!-- ELSE --><h3>{L_WHO_IS_ONLINE}</h3><!-- ENDIF -->
<table><tr><!-- IF S_USER_LOGGED_IN and USER_AVATAR --><td valign="top" style="padding-right:6px;">{USER_AVATAR}</td><!-- ENDIF --><td>
<p>{TOTAL_USERS_ONLINE} ({L_ONLINE_EXPLAIN})<br />{RECORD_USERS}<br /> <br />{LOGGED_IN_USER_LIST}
<!-- IF LEGEND --><br /><em>{L_LEGEND}: {LEGEND}</em><!-- ENDIF --></p>
</td></tr></table>
<!-- ENDIF -->
Subsilver2
Open styles/subsilver2/template/index_body.html
find:
Code: Select all
<!-- IF LEGEND -->
<td class="row1" rowspan="2" align="center" valign="middle"><img src="{T_THEME_PATH}/images/whosonline.gif" alt="{L_WHO_IS_ONLINE}" /></td>
<!-- ELSE -->
Code: Select all
<!-- IF LEGEND -->
<td class="row1" rowspan="2" align="center" valign="middle"><!-- IF S_USER_LOGGED_IN and USER_AVATAR --><br /><br />{USER_AVATAR}</td><!-- ENDIF --></span></td>
<!-- ELSE -->
Upload changed files and refresh the template(s)