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.

Colors for Moderators and Administrators

View previous topic View next topic Go down

In progress color

Post by ourPSU on October 7th 2011, 3:15 am

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



is that possible, or no.

bwi

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. on October 7th 2011, 10: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:



Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU on October 7th 2011, 2:39 pm



Dont see a coding box?

I dont really get this, can you do it for me?

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. on October 7th 2011, 9:25 pm

Ad written above add it to Rank title:

Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU on October 7th 2011, 10:16 pm

Did it, still not working.

I replaced Administrator and put the code,


added the code in Javascript management:


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

Look: http://ourpsu.free-message-board.com/t1-testing-123

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. on October 7th 2011, 10: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.
Energetic

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

http://webartzforum.com

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU on October 7th 2011, 10:34 pm

Sorry, i forgot i switched...

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 on October 7th 2011, 10: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
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 on October 7th 2011, 11:17 pm

@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.

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. on October 8th 2011, 12: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://illiweb.com/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://illiweb.com/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:


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

Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

In progress Re: Colors for Moderators and Administrators

Post by ourPSU on October 8th 2011, 12: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-


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 on October 8th 2011, 1:10 am

Nevermind thanks!

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 on October 8th 2011, 2:38 am

Please 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
ForumGuru

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

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