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.

Colors for Moderators and Administrators

4 posters

Go down

In progress color

Post by ourPSU October 7th 2011, 4:15 am

How do i have a blue box when a moderator or admin posts, and every other regular user is plain white?

Colors for Moderators and Administrators 2wekkg2

is that possible, or no.

bwi
avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by Nera. October 7th 2011, 11:26 am

This is assuming you are on Invision (selectors).

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>

Than go to AP > Modules > JS managment > Add this in it and mark all pages

Code:
$(document).ready(function() {
$('.post:has(".admin1"),.postbody:has(".admin1")').css('background-color', 'lightblue');
});

If you want to add a color to an moderator do the same thing with the rank title (but moderator's)

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"),.postbody:has(".mod2")').css('background-color', '#FF77B1');

So the script on the end looks like this

Code:
$(document).ready(function() {
$('.post:has(".admin1"),.postbody:has(".admin1")').css('background-color', 'lightblue');
$('.post:has(".mod2"),.postbody: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 then do 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.

Example:

Colors for Moderators and Administrators A2uk10
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU October 7th 2011, 3:39 pm

Colors for Moderators and Administrators Captur12

Dont see a coding box?

I dont really get this, can you do it for me?
avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by Nera. October 7th 2011, 10:25 pm

Ad written above add it to Rank title:
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU October 7th 2011, 11:16 pm

Did it, still not working.

I replaced Administrator and put the code,
Colors for Moderators and Administrators Captur13

added the code in Javascript management:
Colors for Moderators and Administrators Captur14

Code:
$(document).ready(function() {
$('.post:has(".admin1"),.postbody:has(".admin1")').css('background-color', 'lightblue');
});

Look: http://ourpsu.free-message-board.com/t1-testing-123
avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by Nera. October 7th 2011, 11:25 pm

You did not add the rank to the user. And mark all pages. + your forum is phpBB2 and your profile says Invision Hem
I'll edit the post latter and give you settings for phpBB2.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU October 7th 2011, 11:34 pm

Sorry, i forgot i switched...
avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by Diana October 7th 2011, 11:39 pm

I'm sorry for butting in but is it possible to make admin's text say cursive with those codes? (for phpbb2)
Diana
Diana
Active Poster

Female Posts : 1286
Reputation : 21
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU October 8th 2011, 12:17 am

Nera. wrote:You did not add the rank to the user. And mark all pages. + your forum is phpBB2 and your profile says Invision Hem
I'll edit the post latter and give you settings for phpBB2.

Thanks and *Later.
avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by Nera. October 8th 2011, 1:36 am

ourPSU wrote:
Nera. wrote:You did not add the rank to the user. And mark all pages. + your forum is phpBB2 and your profile says Invision Hem
I'll edit the post latter and give you settings for phpBB2.

Thanks and *Later.

PHPBB2

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>

Do the same thing for the moderator but with this

Code:
    <span class="mod2">Administrator</span>

Step 3: AP > Diplay > Templates > General > Wievtopic_body template and find this

Code:
   <tr class="post">
      <td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
         <span class="name"><a name="{postrow.displayed.U_POST_ID}"></a><strong>{postrow.displayed.POSTER_NAME}</strong></span>

            <span class="postdetails poster-profile">
            {postrow.displayed.POSTER_RANK}

            {postrow.displayed.RANK_IMAGE}{postrow.displayed.POSTER_AVATAR}


            <!-- BEGIN profile_field -->
            {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
            <!-- END profile_field -->
            {postrow.displayed.POSTER_RPG}
         </span>

         <img src="http://2img.net/i/fa/empty.gif" alt="" style="width:150px;height:1px" />
      </td>
      <td class="{postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="100%" height="28" colspan="2">
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>

Replace it with this

Code:
      <tr class="post">
<td class="post {postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="150">
         <span class="name"><a name="{postrow.displayed.U_POST_ID}"></a><strong>{postrow.displayed.POSTER_NAME}</strong></span>

            <span class="postdetails poster-profile">
            {postrow.displayed.POSTER_RANK}

            {postrow.displayed.RANK_IMAGE}{postrow.displayed.POSTER_AVATAR}


            <!-- BEGIN profile_field -->
            {postrow.displayed.profile_field.LABEL} {postrow.displayed.profile_field.CONTENT}{postrow.displayed.profile_field.SEPARATOR}
            <!-- END profile_field -->
            {postrow.displayed.POSTER_RPG}
         </span>

         <img src="http://2img.net/i/fa/empty.gif" alt="" style="width:150px;height:1px" />
      </td>
      <td class="post {postrow.displayed.ROW_CLASS}"{postrow.displayed.THANK_BGCOLOR} valign="top" width="100%" height="28" colspan="2"><span class="novo" style="display:none;">{postrow.displayed.POSTER_RANK}</span>
         <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>

Save and publish your template on the green Add

End: AP > JS managment (Mark all pages) and add this
Code:
$(document).ready(function() {
$('.post:has(".admin1")').css('background-color', 'lightblue');
$('.post:has(".mod2")').css('background-color', '#FF77B1');
});

Example:

Colors for Moderators and Administrators A4cz

There's probably an easier way but I would not know it.
Good night.
Nera.
Nera.
Energetic

Female Posts : 7078
Reputation : 2017
Language : English
Location : -

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU October 8th 2011, 1:53 am

Did everything right, double checked....

I just cant do this. Nothing is working! I wish someone could just do it for me... Eh-

avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU October 8th 2011, 2:10 am

Nevermind thanks!
avatar
ourPSU
New Member

Posts : 11
Reputation : 1
Language : English

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by Jophy October 8th 2011, 3:38 am

Colors for Moderators and Administrators WarningPlease avoid double/triple posting. Posts need to be separated by 24 hours before bumping, replying or adding more information. Please use the edit button. Wink

Locked and Garbage
Jophy
Jophy
ForumGuru

Male Posts : 17924
Reputation : 836
Language : English
Location : Somewhere

Back to top Go down

Back to top

- Similar topics

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