Jump to content
WebFlake

Change Avatar Style Works in 4.1 & 4.2


Comendator

Recommended Posts

 

Change Avatar Style

Preview

ZS1QXst.png

 
 
Modifie in  CSS:

  • Select the skin you want to modify, then go to Core >> front >> custom> custom.css and add this code:
.cAuthorPane_photo img{
  max-width: 170px;
}

Modifie in Template

  • Go to Forums >> front >> topic >> postconainer and search for:
<li class='cAuthorPane_photo'>
{template="userPhoto" app="core" group="global" params="$comment->author(), 'large', $comment->warningRef()"}
</li>

Change:

<li class='cAuthorPane_photo'>
         {{if $comment->author()->pp_main_photo}}
                          <span class='ipsUserPhoto ipsUserPhoto_variable'>
                                  <img src="{setting="base_url"}uploads/{$comment->author()->pp_main_photo}" />
                          </span>
  
         {{else}}
                          <span class='ipsUserPhoto ipsUserPhoto_variable'>
                                  <img src="<Path_to>/default_photo.png" />
                          </span>

         {{endif}}
</li>

Once done, save everything, and now go to the Groups. Click edit and go to the Social tab, search for:

Maximum profile photo width/height

Place 300 and go, save it and you're done. New size of the Avatars of your Forum will be 170x300, to change:

Here changes the Length

Maximum profile photo width/height

And here the Width

.cAuthorPane_photo img{
  max-width: 170px;
}

 

Edited by Comendator
  • Like 2
  • Thanks 2
  • Upvote 1
Link to comment
Share on other sites

  • 2 weeks later...
  • 1 month later...
  • 1 month later...
On 14/07/2017 at 11:51 AM, Isabel said:

@Comendator

Thank you so much for sharing this turorial.
I have a question (my code knowledge is equal to zero): after performing this procedure, is it mandatory to use a rectangular avatar or who can still insert, for example, a square avatar?

You can use any avatar, however as you specified a size in the code, it is advisable to use avatars with the maximum measures imposed by you.

  • Upvote 1
Link to comment
Share on other sites

  • 5 months later...

doenst worked for me never changed .

On 1.5.2017 at 11:12 PM, Comendator said:

 

Change Avatar Style

Preview

ZS1QXst.png

 
 
Modifie in  CSS:

  • Select the skin you want to modify, then go to Core >> front >> custom> custom.css and add this code:

.cAuthorPane_photo img{
  max-width: 170px;
}

Modifie in Template

  • Go to Forums >> front >> topic >> postconainer and search for:

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

Change:


<li class='cAuthorPane_photo'>
         {{if $comment->author()->pp_main_photo}}
                          <span class='ipsUserPhoto ipsUserPhoto_variable'>
                                  <img src="{setting="base_url"}uploads/{$comment->author()->pp_main_photo}" />
                          </span>
  
         {{else}}
                          <span class='ipsUserPhoto ipsUserPhoto_variable'>
                                  <img src="<Path_to>/default_photo.png" />
                          </span>

         {{endif}}
</li>

Once done, save everything, and now go to the Groups. Click edit and go to the Social tab, search for:


Maximum profile photo width/height

Place 300 and go, save it and you're done. New size of the Avatars of your Forum will be 170x300, to change:

Here changes the Length


Maximum profile photo width/height

And here the Width


.cAuthorPane_photo img{
  max-width: 170px;
}

 

hey dude i do that, but it only show it me if iam in designer mode but not if i leave the mod ?

Can you say something? 4.2.8 iam using.

 

And its not like the preview screenshot .

 

Link to comment
Share on other sites

22 hours ago, xodiak said:

doenst worked for me never changed .

hey dude i do that, but it only show it me if iam in designer mode but not if i leave the mod ?

Can you say something? 4.2.8 iam using.

 

And its not like the preview screenshot .

 

okey now its just the problem that the changes dont come without designer mode

 

if i disable designer mode it comes the old avatar size

 

somebody can help me?

 

edit : problem solved

Edited by xodiak
edit : problem solved
Link to comment
Share on other sites

  • 4 weeks later...
Guest lol12345

Thank you, but when someone is hovering above someone's profile photo it should open up a panel with a preview of that person's profile. It does not.

Link to comment
Share on other sites

7 hours ago, lol12345 said:

Thank you, but when someone is hovering above someone's profile photo it should open up a panel with a preview of that person's profile. It does not.

Check the console (f12 in chrome) for errors i would guess your having a javascript error

VAEfvMI.png

Liked what i posted remember to feed me a cookie ->
Or you can add a cookie to myCookieJar

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...