IP.Board Tutorials

Larger Avatars for Posts Compatible with 4.1 & 4.2

Submitted by tormentor, , Thread ID: 94941

Thread Closed
09-07-2018, 03:23 AM
This post was last modified: 09-07-2018, 03:25 AM by tormentor
#1
Step:1
Go to ACP > Customization > Themes and Select the skin you wish to edit
Step: 2
FindpostContainer in the templates
Step: 3
Look for
<li class='cAuthorPane_photo'>

{template="userPhoto" app="core" group="global" params="$comment->author(), 'large', $comment->warningRef()"}

</li>

Step: 4
Replace it with
<li class='cAuthorPane_photo'>

{template="userPhoto2" app="core" group="global" params="$comment->author(), 'variable', $comment->warningRef()"}

</li>


Step: 5
Create New HTML Template
Name:UserPhoto2
Variables:
$member, $size='small', $warningRef=NULL, $classes='', $hovercard=TRUE
Location:Add To an existing location
Existing Location:front
Group:Add to an existing group
Existing Group:global
Application:System
Step 6:

Find HTML template "UserPhoto2" and paste the following code into it

Quote:{{if $member->member_id and \IPS\Member::loggedIn()->canAccessModule( \IPS\Application\Module::get( 'core', 'members' ) )}}

{{$memberURL = ( $warningRef ) ? $member->url()->setQueryString( 'wr', $warningRef ) : $member->url();}}

<a href="{$memberURL}" {{if $hovercard}}data-ipsHover data-ipsHover-target="{$memberURL->setQueryString( 'do', 'hovercard' )}"{{endif}} class="ipsUserPhoto ipsUserPhoto_{$size}{{if $classes}} {$classes}{{endif}}" title="{lang="view_user_profile" sprintf="$member->name"}">

<img src='{{if $member->pp_main_photo}}{file="$member->pp_main_photo"}{{else}}{file="$member->photo"}{{endif}}' alt='{$member->name}'>

</a>

{{else}}

<span class='ipsUserPhoto ipsUserPhoto_{$size} {{if $classes}}{$classes}{{endif}}'>

<img src='{file="$member->photo"}' alt='{$member->name}'>

</span>

{{endif}}



Step: 7

Find custom.css and Add this line of code below



Quote:.ipsUserPhoto_variable img, img.ipsUserPhoto_variable, .ipsUserPhoto_variable:after {

width: 170px;

{{if theme.rounded_photos}}

border-radius: 0px;

{{endif}}

}

after you have completed all the steps above the results should be like this below


[Image: nQSpQB1.png][Image: wo6fLWJ.png]

RE: Larger Avatars for Posts Compatible with 4.1 & 4.2

#2
Great!! Thanks! :peace:
But how to make sizes for different user groups? Admin, members, etc.
Example.
Group A: 160 * 200
Group B: 200 * 200.

Sorry my bad english.

RE: Larger Avatars for Posts Compatible with 4.1 & 4.2

#3
I want to try this tutorial, i love it... Thanks for sharing Smile

RE: Larger Avatars for Posts Compatible with 4.1 & 4.2

This post was last modified: 16-11-2018, 02:14 AM by Trick3g
#4
I was looking for this for so long time, but i have found out on other places that doing this may cause some other problems. You know something about that?
This makes possible to configure avatar sizes like in ipb 3?

Users browsing this thread: 1 Guest(s)