Avatars
3 posters
Page 1 of 1
Avatars
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.
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.
Re: Avatars
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 )
Then to add unique classes based on post count, we could run a javascript for loop over the profiles.
Then we can add additional rules for the other two classes.
These rules should come after your default dimensions.
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.
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum