Choose from our various pricing plans. There is a package for everyone!


How to change the background color of a specific user

View previous topic View next topic Go down

Tutorial How to change the background color of a specific user

Post by Mati™ on Sat Apr 27, 2013 1:28 pm

This tutorial will show you how to change the post background color of a specific user we will be using CSS and JS.

First we will wrap the rank with the SPAN tag for the special user.

Rank Wraped:
Code:
<span class="staff">Administrator</span>

The CSS:

Add the CSS in your forum.

Code:
.post.staff-post {
background: url("GRADIENT BG IMAGE LINK GOES HERE") repeat-y scroll left top #cccccc;
}

The JS

Go to Javascript codes management create a new javascript name it whatever you want... set placement In the topics and submit.

Code:
$(function() {
$('.staff').closest('.post').addClass('staff-post');
});

Hope you like it... if you need any help please post below.  Smile


Last edited by Mati™ on Sat Nov 15, 2014 2:04 am; edited 2 times in total
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by ChauSy on Sat Jul 06, 2013 5:01 pm

This is only for groups? How about if i want to change the background of only one user?
avatar
ChauSy
Member
Member

Age : 18
Posts : 20
Join date : 2013-06-17
Forum Version : PhpBB3
Reputation : 0

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by mangaka on Tue Jul 30, 2013 11:57 pm

@ChauSy wrote: This is only for groups? How about if i want to change the background of only one user?

No it's not for groups,it means the user using that rank will modified.
avatar
mangaka
Member
Member

Age : 23
Posts : 18
Join date : 2013-07-30
Forum Version : PunBB
Reputation : 0

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by noway on Sat Jan 04, 2014 9:02 am

i dont understand what i am using for a group is

a[href="/g6-vip-members"] {
background: url("http://i.imgur.com/JokYMRN.gif");
}


and whenever i update the user rank i need to change backround for specific user everytime like

a[href="/u14"] span strong {
background: url("http://i.imgur.com/JokYMRN.gif");
}

Any idea to set this backround for a group? sothat when i update the user rank the backround set automaticaly please help me

this is the my backround
avatar
noway
Member
Member

Age : 37
Posts : 19
Join date : 2014-01-04
Forum Version : PunBB
Reputation : 5

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by noway on Mon Jan 06, 2014 4:38 pm

Awaiting for the reply.....
avatar
noway
Member
Member

Age : 37
Posts : 19
Join date : 2014-01-04
Forum Version : PunBB
Reputation : 5

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Mati™ on Mon Jan 06, 2014 7:27 pm

Please open a topic in the CSS Forum or HTML Forum about your problem.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Guest on Mon Jan 13, 2014 9:23 pm

How do I make it so it don't repeat image? Nvm I found a image that works well image size 600x800 works perfect Smile

Guest
Guest


Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Th1nK on Tue Jan 14, 2014 12:38 pm

RDM-FlashBack wrote:How do I make it so it don't repeat image? Nvm I found a image that works well image size 600x800 works perfect Smile

Code:

        .post.staff-post {
        background: url("GRADIENT BG IMAGE LINK GOES HERE") repeat:no-repeat; scroll left top #cccccc;
        }
avatar
Th1nK
Administrator
Administrator

Posts : 468
Join date : 2012-04-06
Reputation : 43

View user profile http://www.csshelp.net

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Nubss on Tue Feb 25, 2014 12:01 am

I'm new to this, can you please explain what "wrap the rank" is? Thanks Very Happy
avatar
Nubss
Member
Member

Age : 21
Posts : 18
Join date : 2014-02-24
Forum Version : PunBB
Reputation : 1

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Mati™ on Tue Feb 25, 2014 8:36 am

@Nubss wrote:I'm new to this, can you please explain what "wrap the rank" is? Thanks Very Happy

Wrap the rank tittle for special members so you can give a class just like below  

Code:
<span class="staff">Administrator</span>
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Nubss on Tue Feb 25, 2014 5:33 pm

so do i just ram that into the CSS like this?:


  1. Administrator

  2. .post.staff-post {

  3. background: url("GRADIENT BG IMAGE LINK GOES HERE") repeat-y scroll left top #cccccc;

  4. }




and then add the following to java management?:

  1. $(function() {

  2. $('.staff').closest('.post').addClass('staff-post');

  3. });




and would "staff" need changing to what my forum rank is named or anything i should be aware of? Smile doesn't seem to do anything when i try import this - if it does what i assume it does. thanks for help Smile
avatar
Nubss
Member
Member

Age : 21
Posts : 18
Join date : 2014-02-24
Forum Version : PunBB
Reputation : 1

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Mati™ on Tue Feb 25, 2014 5:50 pm

Can you PM me details of a test account which has admin access? I would like to check.
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Nubss on Wed Feb 26, 2014 2:01 pm

I have PMed you it, Thanks Very Happy
avatar
Nubss
Member
Member

Age : 21
Posts : 18
Join date : 2014-02-24
Forum Version : PunBB
Reputation : 1

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Mati™ on Wed Feb 26, 2014 4:21 pm

@Nubss wrote:I have PMed you it, Thanks Very Happy

Done!
avatar
Mati™
Administrator
Administrator

Age : 31
Posts : 2112
Join date : 2011-10-20
Forum Version : PhpBB3
Reputation : 147

View user profile http://fmfocus.forumotion.net/forum

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Nubss on Wed Feb 26, 2014 4:51 pm

Thanks a bunch! Smile
avatar
Nubss
Member
Member

Age : 21
Posts : 18
Join date : 2014-02-24
Forum Version : PunBB
Reputation : 1

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Nubss on Thu Feb 27, 2014 8:27 pm

All of this works for me except for the CSS code for changing the colour, I inserted a link to a background and it's still white :/ Can someone help please?
avatar
Nubss
Member
Member

Age : 21
Posts : 18
Join date : 2014-02-24
Forum Version : PunBB
Reputation : 1

View user profile

Back to top Go down

Tutorial Re: How to change the background color of a specific user

Post by Sponsored content


Sponsored content


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