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.

Background color and text color by rank

View previous topic View next topic Go down

Solved Background color and text color by rank

Post by Ikerepc on August 23rd 2013, 5:54 pm

Hi all

Can I have background color (image) and text in different color than other users?

I think automatic text color, but different than other users automatic (I think normall) color.

Thanks in advice


Last edited by Zyon on August 24th 2013, 3:32 pm; edited 1 time in total

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Background color and text color by rank

Post by SLGray on August 23rd 2013, 7:22 pm

Let's make sure we are on the same page. You want it where your text is automatically a different color then other users. Also you want a different color background for messages.


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35667
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

Solved Re: Background color and text color by rank

Post by Ikerepc on August 23rd 2013, 8:30 pm

Yes.

On this forum staff have some background image. I want color, but on post too, not only on profile details in post. And different automatic color, like you say.

So it is posible, and can you help me?

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Background color and text color by rank

Post by Cassius Dio on August 24th 2013, 9:01 am

Hi, bye

First step:
Go to "Administration Panel ~> Users & Groups ~> Ranks ~> Rank Administration" select the rank you want to have different background and text color, complete the field "Rank Title" with this code:
Code:
<span class="admin">Administrator</span>
Step two:
Go to "Administration Panel ~> Module ~> HTML & JAVASCRIPT ~> JavaScript codes management", create a new code and add:
Code:
$(document).ready(function(){
$('.post:has(".admin") .postbody').css('color','#008DFF');
$('.post:has(".admin") .row1, .post:has(".admin") .row2').css('background-color','#333333');
});
Just change #008DFF with the text color and #333333 with the background color. thumleft

Have a nice day!

Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

Solved Re: Background color and text color by rank

Post by Ikerepc on August 24th 2013, 10:45 am

Hey,

Font color work grate, but background not. Can you fix that?

Just to say if it can help, my forum version is punBB

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Background color and text color by rank

Post by Cassius Dio on August 24th 2013, 11:30 am

Sorry. I thought it's phpBB2. Replace the JavaScript code by:
Code:
$(document).ready(function(){
$('.post:has(".admin") .postbody').css('color','#008DFF');
$('.post:has(".admin") .postmain').css('background-color','#333333');
});

Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

Solved Re: Background color and text color by rank

Post by Ikerepc on August 24th 2013, 11:48 am

It's work.

Just one more, now just message body have that color. Can you help me that profile in post and message title have that background color too? But if can little lighter. I want to say, I want have different color of profile in post and background of message in post...

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Background color and text color by rank

Post by Cassius Dio on August 24th 2013, 1:44 pm

Sorry, for profile on PunBB this would not be possible. But for post header, replace the code by:
Code:
$(document).ready(function(){
$('.post:has(".admin") .postbody').css('color','#008DFF');
$('.post:has(".admin") .postmain').css('background-color','#333333');
$('.post:has(".admin") .posthead').css('color','#f4f4f4');
});

Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

Solved Re: Background color and text color by rank

Post by Ikerepc on August 24th 2013, 1:55 pm

Ok, but post header still not working...

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Background color and text color by rank

Post by Cassius Dio on August 24th 2013, 2:15 pm

Have you changed the colour "#f4f4f4" to another one?

Cassius Dio
Forumember

Male Posts : 581
Reputation : 79
Language : Romanian &English
Location : Yellow Submarine

http://beatles.forummo.com/

Back to top Go down

Solved Re: Background color and text color by rank

Post by Ikerepc on August 24th 2013, 2:51 pm

yes, and nothing

Edit:

I'm need just
Code:
$('.post:has(".admin") .posthead').css('color','#f4f4f4');
in place of 'color' writte 'background-color' lol

Solved

Ikerepc
Active Poster

Male Posts : 1114
Reputation : 152
Language : Croatian, HTML, CSS, jQuery, JavaScript, PHP, SQL, Bascom, Python, C, FBD & LAD for PLC and more... Little English :D
Location : Around electronics and progmamming ;)

http://help.forumotion.com

Back to top Go down

Solved Re: Background color and text color by rank

Post by SLGray on August 24th 2013, 5:48 pm

Topic Solved & Locked


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 35667
Reputation : 2375
Language : English
Location : United States

http://fmthemes.forumotion.com/

Back to top Go down

View previous topic View next topic Back to top


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