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.

Post background colors for groups - phpBB3

View previous topic View next topic Go down

In progress Post background colors for groups - phpBB3

Post by Poser on October 18th 2011, 12:34 am

I have seen this feature here and in the other forums.
Now I am curious on how to add this feature on my forum.
Can someone answer me? Sad


Last edited by [FTS] Jack on October 18th 2011, 1:49 am; edited 1 time in total

Poser
Helper
Helper

Male Posts : 391
Reputation : 40
Language : English and Filipino
Location : Whale Island

http://www.bowtieblogs.forumotion.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Nera. on October 18th 2011, 12:36 am

Hi,

You mean the usual post BG or for groups? Only the postprofile part (the part with your profile details) or the whole post?

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Poser on October 18th 2011, 12:46 am

The whole post.

Poser
Helper
Helper

Male Posts : 391
Reputation : 40
Language : English and Filipino
Location : Whale Island

http://www.bowtieblogs.forumotion.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Nera. on October 18th 2011, 12:50 am

Jack for groups or?

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Poser on October 18th 2011, 1:17 am

Groups. Smile
Or can it also be on selected forumers??

Poser
Helper
Helper

Male Posts : 391
Reputation : 40
Language : English and Filipino
Location : Whale Island

http://www.bowtieblogs.forumotion.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Nera. on October 18th 2011, 1:35 am

Here you go,

Step 1: Click on user on your board and you will arrive on his nick in AP. Scroll down and you will see Assign special rank. Add the rank corresponding to the user. Without it it wont work.

Step 2: AP > Users and groups > Rank administration, edit the rank of for example administrators and wrap it with a class:
Code:
    <span class="admin1">Administrator</span>

Step 3: Than go to AP > Modules > JS managment > Add this in it and mark all pages
Code:
$(document).ready(function() {
$('.post:has(".admin1")').css('background-color', 'lightblue');
});
That will add the color to administrators post.

Other groups post color: If you want to add a color to an moderator do the same thing with the rank title (but moderator's) or any other.

This would go to his rank title:
Code:
<span class="mod2">Moderator</span>

And than go to the script you pasted into JS managment and add this line in it
Code:
$('.post:has(".mod2")').css('background-color', '#FF77B1');

So the script on the end looks like this:
Code:
$(document).ready(function() {
$('.post:has(".admin1")').css('background-color', 'lightblue');
$('.post:has(".mod2")').css('background-color', '#FF77B1');
});

Admins and moderators classes must be named differently (the span classes in Rank title) if you want them to apply different color, if you want to make them apply the same color name them the same and add only 1 line in the script with your class name and color set. You can change the colors in the script, I added some light blue for admins and red for mods. You can do this for as mouch as rank titles you wont.


Example of it working on Forumotion, phpBB3: Exclamation


Very good

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Poser on October 18th 2011, 1:38 am

Ok I'll try this now.
I'll make it "solved" if it worked.
--applying...--

EDIT: it worked! :wouhou:
Thanks.
This is ready to be locked.
I'll copy your post there so that I'll always be guided.


Last edited by [FTS] Jack on October 18th 2011, 1:48 am; edited 1 time in total

Poser
Helper
Helper

Male Posts : 391
Reputation : 40
Language : English and Filipino
Location : Whale Island

http://www.bowtieblogs.forumotion.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Nera. on October 18th 2011, 1:41 am

It will work if you follow the instructions correctly http://movingagain.forumcroatian.com/t20-111111111111111111111111111111 Very good


Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Poser on October 18th 2011, 1:58 am

last question:

About the mod2 and admin1 in the css code, can I change it when I add background colors on the other members?

Poser
Helper
Helper

Male Posts : 391
Reputation : 40
Language : English and Filipino
Location : Whale Island

http://www.bowtieblogs.forumotion.com

Back to top Go down

In progress Re: Post background colors for groups - phpBB3

Post by Nera. on October 18th 2011, 3:32 am

You can, but they need to have a rank. You don't have to add the rank name in it if you don't want it to display under user. You can add only this to rank title and be carefull with assigning it to the member since you wont see the title than.

Code:
<span class="rank"></span>
You can assign it to work based on number of posts and it will affect all members that fit in the rank you created based on posts, or you can set it as special rank to set it for only one member, as mentioned, nothing has to be written in it so it wont be visable that the user has a rank assigned.

+ ofcourse add a new JS line with the name of your new members rank title class.

Example: http://movingagain.forumcroatian.com/t20-111111111111111111111111111111

Nera.
Energetic

Female Posts : 7077
Reputation : 2013
Language : English
Location : -

http://webartzforum.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