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.

Change Post background According to Group

+2
Ange Tuteur
Spyro Dragon™
6 posters

Page 3 of 3 Previous  1, 2, 3

Go down

In progress Change Post background According to Group

Post by Spyro Dragon™ 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™
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 January 4th 2015, 6:28 am

Change Post background According to Group - Page 3 Haha10Ok That fixes it on IE, but on Chrome it makes the whole thing Black..
SpyroDragon
SpyroDragon
Forumember

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

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

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

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

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

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

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

Post by Ange Tuteur 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 :
Change Post background According to Group - Page 3 Captur10
Ange Tuteur
Ange Tuteur
Forumaster

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

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon 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
SpyroDragon
Forumember

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

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

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

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

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

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

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

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

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

https://fmdesign.forumotion.com

Back to top Go down

In progress Re: Change Post background According to Group

Post by SpyroDragon 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
SpyroDragon
Forumember

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

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

Bump
SpyroDragon
SpyroDragon
Forumember

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

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

Bump
SpyroDragon
SpyroDragon
Forumember

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

In progress Re: Change Post background According to Group

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

Bump
SpyroDragon
SpyroDragon
Forumember

Posts : 462
Reputation : 2
Language : English

http://tlos.forumotion.net/

Back to top Go down

Page 3 of 3 Previous  1, 2, 3

Back to top

- Similar topics

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