Add users avatar on the created by column
Aug 18, 2013 8:00:29 GMT -8
aRMY83, CåñåÐå™, and 2 more like this
Post by Former Member on Aug 18, 2013 8:00:29 GMT -8
This will add users avatar (small)
Above each of their usernames on the created by column
Tested Using Latest Versions:
IE 11 - Chrome - Firefox
And Win 10 New Browser Microsoft Edge
Go admin > Board > Thread List
Look for the line
<td class="created-by clickable">$[thread.created_by]</td>
And replace that with the line below
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_quote]$[thread.created_by]</center></td>
NOW GO TO
Admin > THEMES > ADVANCED STYLES & CSS > STYLE SHEET
AND AT THE VERY BOTTOM OF THE STYLE SHEET PAGE
ADD THE LINE OF CODE BELOW
.created-by .avatar-wrapper {display: block;}
Note: You may have to manually update your other themes for the avatar to display on those themes also
Screen shot shows users avatars above each username
OR
If you don't want the little profile icon to show on the created by column
Go admin > Board > Thread List
Change $[thread.icon] at the top of the template
To
$[thread.created_by_user.avatar_quote]
Screenshot
If you want the avatar to show a little larger
Then use
<td class="created-by clickable"><center>$[thread.created_by.avatar_small]$[thread.created_by]</center></td>
If you wish to show what board the thread was posted in
When Viewing The Recent Threads Page
Go - Admin - Board - Thread List
And Replace this line
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_quote]$[thread.created_by]</center></td>
With This Line
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_quote]$[thread.created_by]{if $[route.name] == "recent_threads"}<br><i>In the board</i><br>$[thread.board]{/if}</center></td>
Then At the very bottom of the Thread List Page template
Add the code below
{if $[page] != 1 && ($[route.name] == "list_threads")}
<script>
if(document.URL.indexOf("recent") >= 0){
window.history.go(0)}
</script>
{/if}
See Screen-shot Below
Tested
Firefox - Chrome - Internet Explorer - Opera
When viewing other page numbers page 2 page 3 and so on
it will refresh the page to show what board the thread was posted on
Steve
A big thank you to Stinky for the help with user avatar
And a BIG THANK YOU to " Eton Bones" for internet explorer the fix
Reminder you can always view how it will look by clicking on the preview button
Before you click to save any changes to your template
Updated Screenshots
____________________________________________________
Tested using windows 10
Chrome - Firefox - Microsoft browser edge - IE 11
If you wish to circle the avatars
Note this is for small Avatars not the little quote avatars
Screenshot
Go admin > Board > Thread List
Look for the line
<td class="created-by clickable">$[thread.created_by]</td>
And replace that with the line below
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_small]$[thread.created_by]</center></td>
Then go to STYLE SHEET
And add this to very bottom of the style sheet
.created-by .avatar-wrapper {display: block;}
.threads .avatar_size_small { .rounded-corners(50%, 50%, 50%, 50%); }
.threads .avatar_size_small > img { .rounded-corners(50%, 50%, 50%, 50%); }
.threads .avatar_size_small img {
border-radius: 100px;
height: 100%; width: 100px;
;border:1px solid #cccccc;
}
Note: it's set at 100px - setting it at 100% will oval the avatars
On pages 1,2,3 ect
Above each of their usernames on the created by column
Tested Using Latest Versions:
IE 11 - Chrome - Firefox
And Win 10 New Browser Microsoft Edge
Go admin > Board > Thread List
Look for the line
<td class="created-by clickable">$[thread.created_by]</td>
And replace that with the line below
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_quote]$[thread.created_by]</center></td>
NOW GO TO
Admin > THEMES > ADVANCED STYLES & CSS > STYLE SHEET
AND AT THE VERY BOTTOM OF THE STYLE SHEET PAGE
ADD THE LINE OF CODE BELOW
.created-by .avatar-wrapper {display: block;}
Note: You may have to manually update your other themes for the avatar to display on those themes also
Screen shot shows users avatars above each username
OR
If you don't want the little profile icon to show on the created by column
Go admin > Board > Thread List
Change $[thread.icon] at the top of the template
To
$[thread.created_by_user.avatar_quote]
Screenshot
If you want the avatar to show a little larger
Then use
<td class="created-by clickable"><center>$[thread.created_by.avatar_small]$[thread.created_by]</center></td>
If you wish to show what board the thread was posted in
When Viewing The Recent Threads Page
Go - Admin - Board - Thread List
And Replace this line
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_quote]$[thread.created_by]</center></td>
With This Line
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_quote]$[thread.created_by]{if $[route.name] == "recent_threads"}<br><i>In the board</i><br>$[thread.board]{/if}</center></td>
Then At the very bottom of the Thread List Page template
Add the code below
{if $[page] != 1 && ($[route.name] == "list_threads")}
<script>
if(document.URL.indexOf("recent") >= 0){
window.history.go(0)}
</script>
{/if}
See Screen-shot Below
Tested
Firefox - Chrome - Internet Explorer - Opera
When viewing other page numbers page 2 page 3 and so on
it will refresh the page to show what board the thread was posted on
Steve
A big thank you to Stinky for the help with user avatar
And a BIG THANK YOU to " Eton Bones" for internet explorer the fix
Reminder you can always view how it will look by clicking on the preview button
Before you click to save any changes to your template
Updated Screenshots
____________________________________________________
Tested using windows 10
Chrome - Firefox - Microsoft browser edge - IE 11
If you wish to circle the avatars
Note this is for small Avatars not the little quote avatars
Screenshot
Go admin > Board > Thread List
Look for the line
<td class="created-by clickable">$[thread.created_by]</td>
And replace that with the line below
<td class="created-by clickable"><center>$[thread.created_by_user.avatar_small]$[thread.created_by]</center></td>
Then go to STYLE SHEET
And add this to very bottom of the style sheet
.created-by .avatar-wrapper {display: block;}
.threads .avatar_size_small { .rounded-corners(50%, 50%, 50%, 50%); }
.threads .avatar_size_small > img { .rounded-corners(50%, 50%, 50%, 50%); }
.threads .avatar_size_small img {
border-radius: 100px;
height: 100%; width: 100px;
;border:1px solid #cccccc;
}
Note: it's set at 100px - setting it at 100% will oval the avatars
On pages 1,2,3 ect