Change Post background According to Group 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.
+2
Ange Tuteur
Spyro Dragon™
6 posters

    Change Post background According to Group

    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Change Post background According to Group

    Post by Spyro Dragon™ December 21st 2014, 12:27 pm

    You know how there is a way to change the background IMG of the post according to if your female or male. . . is there a way we can do this but according to group..

    Like Group FireDragon - will have a fire picture for their post background
    Group IceDragon - will have  a ice picture for their post background
     

    etc.. etc..

    possible?
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 22nd 2014, 1:16 am

    Hello @Spyro Dragon™,

    See if this tutorial is what you want : http://fmdesign.forumotion.com/t230-add-a-classname-to-group-member-posts

    Using the tutorial above. To add a background on phpbb2, you could probably do something like this :
    Display > Colors > CSS stylesheet
    Code:
    .post.groupName td { background:none }
    .post.groupName { background:url(img.gif) }

    Just replace groupName by the class you give to that group, and img.gif by the URL of your image.
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 22nd 2014, 6:27 am

    Im messing up somewhere..

    I made a group called SpyroDragon


    So here is what I put for the javascript page..

    $(function() {
      groupMod('#000001', 'SpyroDragon');
     
      function groupMod(color, classname) {$('.post:has(span[style="color:'+color+'"] strong)').addClass(classname)}
    });




    And here is what I added to the CSS..

    .post.SpyroDragon td { background:none }
    .post.SpyroDragon { background:url(https://i.servimg.com/u/f39/17/84/98/50/untitl10.png) }


    Im not sure what I did wrong, but its not working.
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 22nd 2014, 8:26 am

    i just tested what u posted on my own forum and on yours and seems to be working fine... make sure your using the correct color for the group im guessing your
    Spyro ▀█▀ Dragon

    if so your group color is
    #FF0000

    so it would be


    Code:
    $(function() {
      groupMod('#FF0000', 'SpyroDragon');
     
      function groupMod(color, classname) {$('.post:has(span[style="color:'+color+'"] strong)').addClass(classname)}
    });

    also ur missing ; in css


    Code:
    .post.SpyroDragon td { background:none; }
    .post.SpyroDragon { background:url(http://i39.servimg.com/u/f39/17/84/98/50/untitl10.png); }
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 22nd 2014, 9:38 am

    _Twisted_Mods_ wrote:i just tested what u posted on my own forum and on yours and seems to be working fine... make sure your using the correct color for the group im guessing your
    Spyro ▀█▀ Dragon

    if so your group color is
    #FF0000

    so it would be


    Code:
    $(function() {
      groupMod('#FF0000', 'SpyroDragon');
     
      function groupMod(color, classname) {$('.post:has(span[style="color:'+color+'"] strong)').addClass(classname)}
    });

    also ur missing ; in css


    Code:
    .post.SpyroDragon td { background:none; }
    .post.SpyroDragon { background:url(http://i39.servimg.com/u/f39/17/84/98/50/untitl10.png); }



    The name color change is working fine.. but I want the Post Message background to change.. I don't know what you meant by that...


    I double checked my java and rechecked my CSS.. there both in there copy n pasted.. and it still doesn't work.
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 22nd 2014, 11:04 am

    @Spyro Dragon™️, So the color of the group is #000001, correct ? Could you provide an example post on your forum from a member of this group ?

    Thanks Smile

    @_Twisted_Mods_, You can omit the semi-colon on the last declaration of a CSS ruleset; it's optional, but still good practice to include. Mr. Green
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 22nd 2014, 11:39 pm

    Do I have to color the users for it to work? it can't be a hidden group?
    and I tried using it on a test user, and it doesn't work...maybe some part is screwing with the codes considering I have a lot of things hidden?
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 23rd 2014, 12:11 am

    you have to use the group color
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 23rd 2014, 1:29 pm

    I have group color... I just have the option to color members off I need that on? cause if I need that on..that's just pure gayness...
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 23rd 2014, 3:32 pm

    yea you have to have it on ... are all your members and staff one color or did you style some with css or java? if so its each fix u can override the group color but still have it there to use with the post

    names are like so "im use ange for example"

    <a href="/u88576" title="Ange Tuteur"><span style="color:#7BB92B"><strong>Ange Tuteur</strong></span></a>

    the span is what defines the group color

    so you just need to go one step ahead to override the group color

    a[href="/u88576"] strong{color:#00ff00}
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 23rd 2014, 11:08 pm

    Please Let Ange Tuteur Respond..


    Last edited by Spyro Dragon™ on December 24th 2014, 2:33 am; edited 2 times in total
    TheShaka
    TheShaka
    Forumember


    Male Posts : 412
    Reputation : 6
    Language : polish

    In progress Re: Change Post background According to Group

    Post by TheShaka December 23rd 2014, 11:26 pm

    Spyro Dragon™ wrote:Please Let Ange Tuteur Respond..
    All you  other People trying to help  give me buncha Irrlevent and useless garbage which ticks me the hell off cause it makes people who can Acualy help take longer to respond cause they think there being helped by the idiot who posted the useless garbage in the first place!

    Dang gum never pressed my keys that hard typing a message.. frkn frustrated about this atm..

    HEHE you will get ban now for sure.
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 1:35 am

    Angie save me please...
    Seems like everything I want for my forum is impossible...
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 24th 2014, 2:25 am

    Spyro Dragon™ wrote:Please Let Ange Tuteur Respond..
    All you  other People trying to help  give me buncha Irrlevent and useless garbage which ticks me the hell off cause it makes people who can Acualy help take longer to respond cause they think there being helped by the idiot who posted the useless garbage in the first place!

    Dang gum never pressed my keys that hard typing a message.. frkn frustrated about this atm..
    This is uncalled for, you should appreciate that someone is trying to help you during their free time. I understand that it can be frustrating not getting the reply you want, but it's no reason to act the way you did. Think about it, a year ago I didn't know how to do what you're asking, if you flipped out on me like you did here, I probably wouldn't want to reply. What I'm saying is the people you disrespect, could be someone that can help you in the future. Since it's the holidays, I'll give you one more chance, but if I see something like this again, I wont hesitate to do the needful.

    I'll tell you right now that what @_Twisted_Mods_ has told you, is exactly the same as what I would have told you. For this to work, group colorization needs to be ON. The script checks the username for the color code and applies a class to the post if found. You can then style that post by that class. If you want to remove the colorization from members after the class has been applied, that can be done.

    If you don't want to do it that way, you could do it by adding a classname to a user rank, or maybe a profile field that we could check, like a list.

    TheShaka wrote:HEHE you will get ban now for sure.
    This is unnecessary, if I see you antagonizing members like this again, I wont hesitate to issue a warning to you.
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 2:32 am

    well I was going to get rid of the message a few minutes after, but the  " X " button was nowhere to be found..
    and I enabled the group color and it still isn't working for me.. you think my CSS is messing with it?

    and I think it was acualy 3-4 years ago cause this is new account, I had tlos.openu2.com since 2008...
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 24th 2014, 2:39 am

    Is this the group ?
    http://tlos.openu2.com/g14-spyrodragon

    It looks like the fire group is taking precedence over this group's color. Try removing that member from fire, or increase the group order number to one lower than fire.
    Change Post background According to Group Captu251
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 2:44 am

    So the user has to be that color?
    if thats the case I might have to say screw it because that will mess with my entire elemental ranking system... I have 110 Ranks and 11 Auto subscribe groups

    First promotion is FireDragon
    1 post
    2nd promotion is FireDragon
    10 post
    3rd  30, 40, 50 , 60 --so on so on...
    If I have to color members out of this system..that just messes the entire thing up....and it prob wont stay that long because their name will just change back to orange after they post a message.. cause thell be auto subscribed to the next group..



    SpyroDragon group is orderd ' 2 '
    FireDragon group is orderd ' 14 '



    So theres no way to do this just by members being in the group?

    again this is starting to sound like everything I want for the forum is impossible..
    I wish you mods were allowed to get teamviewer for this  stuff



    Like I was saying  in an eairler post I couldent do VIp Ranks because when theyd buy it id set them in it, and it would change them back to their old rank Right after a post.. and I can't get rid of auto subscribe because its part of the elemental ranking system I have for it..
    And I aint doing all those ranks Manual  ....


      look you have to zoom out till 30% just to see the bottom of the rank list..thats hwo many Auto ranks I got....

    Change Post background According to Group Untitl11
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 24th 2014, 3:09 am

    Unfortunately for the moment, the only identification for groups is color. You could still add backgrounds to members in the element groups, but their bg will change depending on their group. If your ranks are post based, you could do it that way by giving the rank a special class, it's how we do the staff backgrounds here. Although that is a lot of ranks lol!
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 3:10 am

    Well what I was going for  was an item for my Spyro's shop... " Post Background " where members can put a custom background in their post and I would have to  make an Idividual group for each member who bought it.....

    Guess its not possible?


    Is  there a way to do it with the usernames instead of groups.. to change the post background?

    the Spyro's Shop page is at
    Shop.SpyroDragon.com
    if you wanna add more stuff to the tips n tricks -- for shop ideas..
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 24th 2014, 3:46 am

    Sure, give this a try :
    Code:
    $(function() {
      bgName('Ange Tuteur','ange-background');
      bgName('Test Dummy','dummy-background');
      
      function bgName(name,classname) { $('.post:has(.name:contains('+name+'))').addClass(classname) }
    });

    I have some examples above already. Basically it's the same, but first you write the username, and then the special class to style their posts. Afterwards, I'd write something like this in my CSS :
    Code:
    .ange-background td { background:none }
    .ange-background { background:#85D }

    .dummy-background td { background:none }
    .dummy-background { background:red }
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 3:26 pm

    That works, but now I need to know if thers a way to keep the picture from doing this..

    Change Post background According to Group Spyro_11
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 24th 2014, 4:59 pm

    use the same code i gave you for the background for the body
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 5:17 pm

    How would I put that in..i don't want  to mess anything up....
    Right now I have... for the CSS

      .spyro-background td { background:none }
    .spyro-background { background:url(https://i.servimg.com/u/f39/16/87/57/90/ignitu12.png); }
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 24th 2014, 6:30 pm

    .spyro-background {
    background:url(https://i.servimg.com/u/f39/16/87/57/90/ignitu12.png);
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-position: left top;
    background-repeat: no-repeat;
    }
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 6:40 pm

    Did I mess up somewhere?


    .spyro-background {
    background:url(https://i.servimg.com/u/f39/16/87/57/90/lunapi11.gif);
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-position: left top;
    background-repeat: no-repeat;
    }


    Makes it look like this...
    Change Post background According to Group Cynder11

    But at least were getting somewhere now. Smile)
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 24th 2014, 7:39 pm

    did u get it fixed because it dont look like that on my screen
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 24th 2014, 8:50 pm

    still looks like that on my screen.
    mind taking a screenshot?
    Ange Tuteur
    Ange Tuteur
    Forumaster


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

    In progress Re: Change Post background According to Group

    Post by Ange Tuteur December 25th 2014, 3:47 am

    It looks to be a problem with the background-size property on IE. Try changing it to this :
    Code:
    .spyro-background {
    background:url(http://i39.servimg.com/u/f39/16/87/57/90/ignitu12.png);
    background-position: left top;
    background-repeat: no-repeat;
    }
    Spyro Dragon™
    Spyro Dragon™
    Forumember


    Male Posts : 202
    Reputation : 2
    Language : English

    In progress Re: Change Post background According to Group

    Post by Spyro Dragon™ December 25th 2014, 6:08 am

    Change Post background According to Group Cynder12
    Solved... But now I have encounterd a different problem.....

    Change Post background According to Group Cynder14

    Should I make this problem a new topic or can we solv 2 things at once?
    My friend says it looks screwd up on her side now..should I just add
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    background-position: left top;
    background-repeat: no-repeat;
    }

    to the css?



    I tired it but it just made it screwd up to me again... is there a way to fix it on all Browsers?
    _Twisted_Mods_
    _Twisted_Mods_
    Helper
    Helper


    Male Posts : 2083
    Reputation : 336
    Language : English
    Location : Ms

    In progress Re: Change Post background According to Group

    Post by _Twisted_Mods_ December 25th 2014, 8:53 am

    try one of these


    Code:
    {
      background: url(YOUR-IMAGE-URL) no-repeat center center fixed;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
      min-height: 100%;
      overflow: hidden;
    }
    or


    Code:
    {
      background: url(YOUR-IMAGE-URL) no-repeat center center fixed;
      -webkit-background-size: cover;
      -moz-background-size: cover;
      -o-background-size: cover;
      background-size: cover;
      min-height: 100%;
      overflow: auto;
    }