How to change Post Text Background Color Change?

Go down

Solved How to change Post Text Background Color Change?

Post by Fate003142 on October 13th 2013, 2:57 am

I know this was already a topic made before but I just don't understand how to do it




Last edited by Fate003142 on October 13th 2013, 4:53 am; edited 1 time in total (Reason for editing : Solved)
avatar
Fate003142
New Member

Posts : 16
Reputation : 1
Language : English

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Ange Tuteur on October 13th 2013, 3:04 am

Hello Fate003142,

You should be able to change those background colors by navigating to..
Administration Panel > Display > Pictures and colors > Colors

Find background color 1-3 and change the colors to what you wish.

You can also use this in your CSS stylesheet to change the color of just the post rows.
Code:
.post.row1, .post.row2{
background-color:#ddd;
}
avatar
Ange Tuteur
Forumaster

Male Posts : 13201
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Fate003142 on October 13th 2013, 3:15 am

Is this for everyone? or just a certain rank?
avatar
Fate003142
New Member

Posts : 16
Reputation : 1
Language : English

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Ange Tuteur on October 13th 2013, 3:17 am

It should affect the entire forum.
avatar
Ange Tuteur
Forumaster

Male Posts : 13201
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Fate003142 on October 13th 2013, 3:19 am

Oh..sorry if I sound rude..But I would like to get it for certain ranks only. For example Admin would have a yellow, Mod would have green.
avatar
Fate003142
New Member

Posts : 16
Reputation : 1
Language : English

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Ange Tuteur on October 13th 2013, 3:34 am

May I ask for the version of your forum you'll be applying this to please?
avatar
Ange Tuteur
Forumaster

Male Posts : 13201
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Fate003142 on October 13th 2013, 3:48 am

I think it is phpBB3 not sure how to check
avatar
Fate003142
New Member

Posts : 16
Reputation : 1
Language : English

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Ange Tuteur on October 13th 2013, 3:58 am

You can check your version in
Administration Panel > Display > Skins > Choose a theme > Versions tab

It will display the current forum version you're using.


I just want to make sure so I can give you the correct code. Wink
avatar
Ange Tuteur
Forumaster

Male Posts : 13201
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Fate003142 on October 13th 2013, 4:06 am

I have it checked on phpBB2
avatar
Fate003142
New Member

Posts : 16
Reputation : 1
Language : English

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Ange Tuteur on October 13th 2013, 4:21 am

Okay I've set this up for you going by your last post.

First add this to your CSS stylesheet
Administration Panel > Display > Pictures and colors > Colors > CSS stylesheet

Paste the code below into the sheet and submit.
Code:
td.row1.jaune-post:nth-child(2),td.row2.jaune-post:nth-child(2){
background:#f0f0f0 url('http://i56.servimg.com/u/f56/18/21/60/73/jaune10.png') repeat-y
}
td.row1.vert-post:nth-child(2),td.row2.vert-post:nth-child(2){
background:#f0f0f0 url('http://i56.servimg.com/u/f56/18/21/60/73/vert10.png') repeat-y
}
Now that we have the CSS we should add this to your javascript management
Administration Panel > Modules > HTML & JAVASCRIPT > Javascript codes management

Make sure javascript is enabled:


Then create a new javascript, tick 'in the topics' and paste the code below into the textarea.
Code:
var escapeRegExp;(function(){var a=RegExp("[-\\[\\]\\/\\{\\}\\(\\)\\*\\+\\?\\.\\\\\\^\\$\\|]","g");escapeRegExp=function(b){return b.replace(a,"\\£panda_string_1378605814882_2_panda£amp;")}})();var postbg={add:function(a,c){a=escapeRegExp(a);a=a.replace(/\s?,\s?/g,"|");$(function(){var b=$(".post").get();for(i=0;i<b.length;i++)RegExp("^"+a+"$","g").test($(b[i].getElementsByTagName("a")[1]).text())&&$(b[i]).find("td").addClass(c)})}};
postbg.add('USERNAME HERE','jaune-post');
postbg.add('USERNAME HERE','vert-post');
To start you off I've added a yellow and green post background gradient. To give this to users you will have to modify this part of the script:
Code:
postbg.add('USERNAME HERE','jaune-post');
postbg.add('USERNAME HERE','vert-post');
You have to add the users username where 'USERNAME HERE' is, it will look like this:
Code:
postbg.add('SethC1995','jaune-post');
postbg.add('Ange','vert-post');
and for multiple users we'll separate them by commas like this:
Code:
postbg.add('SethC1995, Scorpio','jaune-post');
postbg.add('Ange, Guardian','vert-post');
To modify the colors you'll have to edit the hex colors(#f0f0f0) and these image gradients which are used in the CSS 'background': Yellow | Green

If you have anymore questions let us know.
avatar
Ange Tuteur
Forumaster

Male Posts : 13201
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Fate003142 on October 13th 2013, 4:52 am

Thanks so MUCH!
avatar
Fate003142
New Member

Posts : 16
Reputation : 1
Language : English

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by Ange Tuteur on October 13th 2013, 4:57 am

You're welcome! ^^
avatar
Ange Tuteur
Forumaster

Male Posts : 13201
Reputation : 2917
Language : EN10, FR5, JA5
Location : Macungie, PA

https://github.com/SethClydesdale

Back to top Go down

Solved Re: How to change Post Text Background Color Change?

Post by SLGray on October 13th 2013, 4:37 pm

Topic Solved & Locked


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

avatar
SLGray
Administrator
Administrator

Male Posts : 43465
Reputation : 3084
Language : English
Location : United States

http://fmthemesdesignteam.forumotion.com/

Back to top Go down

Back to top


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