The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Avatars

View previous topic View next topic Go down

In progress Avatars

Post by Kamui on May 16th 2015, 1:39 am

Hey,

I'm wondering if there's a way where I can control how avatar displays work. I want newer members to have a small Avatar DP and my other members to have the option of choosing a larger dimensions. Hope that make sense.

Kamui
Forumember

Male Posts : 280
Reputation : 3
Language : English
Location : Greed Island

http://narutogaiden.forumotion.com/

Back to top Go down

In progress Re: Avatars

Post by Sir. Mayo on May 16th 2015, 2:57 am

I'm Sorry but i do not think you can do this.

Sir. Mayo
Forumember

Male Posts : 963
Reputation : 85
Language : English, Some french.
Location : Working 11Pm-7Am EST I will try to respond ASAP

http://sir-mayo.forumotion.com/

Back to top Go down

In progress Re: Avatars

Post by Ange Tuteur on May 16th 2015, 3:26 am

Hi @Kamui,

Will this be determined by rank or post count ? I was thinking of setting a default size for avatars via post count.
( examples for phpbb3 )

Code:
/* default */
.postprofile dt img {
  max-height:100px;
  max-width:100px;
}

Then to add unique classes based on post count, we could run a javascript for loop over the profiles.
Code:
$(function() {
  for (var a, b = $('.postprofile'), i = 0, posts; a = b[i]; i++) {
    posts = $(a).text().replace(/\s/g, '').replace(/.*?posts:(\d+).*/i, '$1');
   
    if (posts < 25) a.className += ' newMemb';
    else if (posts > 25) a.className += ' memb';
  }
});

Then we can add additional rules for the other two classes.
Code:
/* new member */
.postprofile.newMemb dt img {
  max-height:25px;
  max-width:25px;
}

/* member */
.postprofile.memb dt img {
  max-height:250px;
  max-width:250px;
}

These rules should come after your default dimensions.

Ange Tuteur
Forumaster

Male Posts : 13021
Reputation : 2684
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum