Avatars Hitskin_logo Hitskin.com

This is a Hitskin.com skin preview
Install the skinReturn to the skin page

The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.
3 posters

    Avatars

    Kamui
    Kamui
    Forumember


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

    In progress Avatars

    Post by Kamui 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.
    Sir. Mayo
    Sir. Mayo
    Forumember


    Male Posts : 978
    Reputation : 90
    Language : English, Some french.
    Location : you can also reach me on snoonet's irc server. I idle in #Techsupport Username is Vault108

    In progress Re: Avatars

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

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


    Male Posts : 13207
    Reputation : 3000
    Language : English & 日本語
    Location : Pennsylvania

    In progress Re: Avatars

    Post by Ange Tuteur 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.