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.

Change Post background According to Group

Page 3 of 3 Previous  1, 2, 3

View previous topic View next topic Go down

In progress Change Post background According to Group

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

First topic message reminder :

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?

Spyro Dragon™
Forumember

Male Posts : 202
Reputation : 2
Language : English

http://SpyroDragon.com

Back to top Go down


In progress Re: Change Post background According to Group

Post by SpyroDragon on January 4th 2015, 6:28 am

Ok That fixes it on IE, but on Chrome it makes the whole thing Black..

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by Ange Tuteur on January 4th 2015, 6:56 am

That was my intention. On Chrome, the background tiling was even worse than IE. On IE the background was lined up in the correct spot, but on Chrome it was more of a mess. If we weren't dealing with tables, it'd be easier. grrr!!!!!

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 4th 2015, 7:11 am

is there a way to make it transparent at least, and not Black

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by Ange Tuteur on January 4th 2015, 8:20 am

As far as I know, not really. Seeing as the image is set on the row, making the cell transparent will show the row's bg image. This is the result on Chrome :

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 4th 2015, 8:23 am

well I guess ill just deal with the line then on IE ..

Wiat even without the new code u gave me for the line..it still has it black on chrome..i don't want any black please get rid of the black ..I hate black


My Favorite Color is Transparency!

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by Ange Tuteur on January 4th 2015, 8:59 am

Okay, change the script to this :
Code:
$(function() {
  customBg('Spyro ▀█▀ Dragon', 'spyro-background', 'http://i39.servimg.com/u/f39/16/87/57/90/lunapi11.gif');
  customBg('ᴛᴡɪʟɪ ▀█▀ ᴅʀᴀɢᴏɴ', 'twili-background', 'image_here');
 
 
  function customBg(name, classname, image) {
    var ua = window.navigator.userAgent, td = 'td', gc = '';
    $('.post:has(.name:contains('+name+'))').addClass(classname);
    if (ua.match(/Chrome/)) td = 'td:last-child', gc = '.post.'+classname+' > td:first-child{background:none}';
    if (ua.indexOf('MSIE ') > 0 || ua.match(/Trident/) || ua.match(/Chrome/)) $('head').append('<style type="text/css">.post.'+classname+' > '+td+' { background:none }'+gc+'.post.'+classname+' {background: url('+image+') no-repeat transparent }</style>');
    else $('head').append('<style type="text/css">.post.'+classname+' td { background:none }.post.'+classname+' {background: url('+image+') no-repeat center center / 100% 100% transparent }</style>');
  }
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 4th 2015, 9:08 am

so there is no way to fix it on both browsers?

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by Ange Tuteur on January 4th 2015, 9:41 pm

Hmm .. might be able to move the background around so it's hidden on the profile cell for Chrome. Try this :
Code:
$(function() {
  customBg('Spyro ▀█▀ Dragon', 'spyro-background', 'http://i39.servimg.com/u/f39/16/87/57/90/lunapi11.gif');
  customBg('ᴛᴡɪʟɪ ▀█▀ ᴅʀᴀɢᴏɴ', 'twili-background', 'image_here');
 
 
  function customBg(name, classname, image) {
    var ua = window.navigator.userAgent, td = 'td', pos = '';
    $('.post:has(.name:contains('+name+'))').addClass(classname);
    if (ua.match(/Chrome/)) td = 'td:last-child', pos = '140% 0';
    if (ua.indexOf('MSIE ') > 0 || ua.match(/Trident/) || ua.match(/Chrome/)) $('head').append('<style type="text/css">.post.'+classname+' > '+td+' { background:none }.post.'+classname+' {background: url('+image+') no-repeat '+pos+' transparent }</style>');
    else $('head').append('<style type="text/css">.post.'+classname+' td { background:none }.post.'+classname+' {background: url('+image+') no-repeat center center / 100% 100% transparent }</style>');
  }
});

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 4th 2015, 10:37 pm

If there is no way of streaching the picture like on IE, then that's fine.. at least its not black.. I can deal with it like that, I like them both..but the only downfall is that they are different... IE is streached out and chrome -- look for urself and ull kno..but if theres no way of streaching it..Then its fine just like that
So if theres no way to streach it

[Solved]

if theres a way, let me try those codes Very Happy

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 8th 2015, 6:51 am

Bump

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 9th 2015, 6:02 am

Bump

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon on January 11th 2015, 9:50 pm

Bump

SpyroDragon
Forumember

Posts : 319
Reputation : 2
Language : English

http://SpyroDragon.com/

Back to top Go down

Page 3 of 3 Previous  1, 2, 3

View previous topic View next topic Back to top


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