IP.Board Tutorials

Larger Avatars for Posts Compatible with 4.1 & 4.2

Submitted by tormentor, , Thread ID: 94941

Thread Closed
tormentor
Newbie
Level:
0
Reputation:
0
Posts:
17
Likes:
5
Credits:
2
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

Deadwood
Lurker
Level:
0
Reputation:
0
Posts:
2
Likes:
0
Credits:
2
30-09-2018, 12:14 AM
#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

Erronblack
Newbie
Level:
0
Reputation:
0
Posts:
14
Likes:
1
Credits:
16
09-11-2018, 11:36 PM
#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

Trick3g
Novice
Level:
0
Reputation:
0
Posts:
21
Likes:
0
Credits:
9
16-11-2018, 02:13 AM
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)