Jump to content
WebFlake
  • 0

Default Avatar


Xw3R

Question

Hello,

So, in Romania we use avatars with the resolution of 150x250 or 150x300 (sounds weird but yeah) and i tried to make my forum accept these resolutions to show on the topic page by replacing this line in the postContainer template of the theme

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

with this one 

<li class='cAuthorPane_photo'> {{if $comment->author()->pp_main_photo}}<a href='{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}-{$comment->author()->name}" seoTemplate="profile" seoTitle="$seoName"}' data-ipsHover data-ipsHover-target='{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}-{$comment->author()->name}&do=hovercard" seoTemplate="profile" seoTitle="$seoName"}' title="{lang="view_user_profile" sprintf="$name"}"><span class='ipsUserPhoto ipsUserPhoto_variable'><img src="{setting="base_url"}uploads/{$comment->author()->pp_main_photo}" /></span></a>{{else}}<a href='{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}-{$comment->author()->name}" seoTemplate="profile" seoTitle="$seoName"}' data-ipsHover data-ipsHover-target='{url="app=core&module=members&controller=profile&id={$comment->author()->member_id}-{$comment->author()->name}&do=hovercard" seoTemplate="profile" seoTitle="$seoName"}' title="{lang="view_user_profile" sprintf="$name"}"><img src="Default Image Url" /></a>{{endif}} </li>

and now it shows something like this if the user does not have a profile picture Capture.thumb.PNG.8348a78a3fbbde379378c8265a8ba2fe.PNG

How can I make an avatar be the default one so it would not show up like this or make the image with the first letter of the name gp back to its original size without affecting the 150x250 or 150x300 avatars. In the new code i put there is a field with 'Default Image URL' but it does not seem to work on IPS 4.2, on ips 4.1 it used to work.

What can I do?

 

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

@Xw3R

You could have just change the width and height of all avatars using css.

.ipsUserPhoto_large img, img.ipsUserPhoto_large, .ipsUserPhoto_large:after {
 width: 90px; /* change width to your liking */
 height: 90px; /* change height to your liking */
}

Personally, I don't see why you'd like to change the avatars to something like 150x250 or 150x300. If your avatars are this big, you will later have to change the size of the author info pane. This just looks silly and distorts your avatars:

6e1bb098af4a9618dc7f2b10d2d405ad.png

Edited by Setup
  • Support Team - September 9th, 2017 - June 8, 2018
  • Junior Moderator - December 14th 2018 - November 16th, 2019
  • Designer - November 16th, 2019 - June 5th, 2020
  • Moderator - June 5th, 2020 - August 28th, 2020
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...