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.

Need help with post BG color

View previous topic View next topic Go down

Solved Need help with post BG color

Post by jonnyuk100 on December 22nd 2011, 10:48 am



Last edited by jonnyuk100 on December 22nd 2011, 2:23 pm; edited 2 times in total

jonnyuk100
New Member

Posts : 7
Reputation : 1
Language : english

Back to top Go down

Solved Re: Need help with post BG color

Post by Guest on December 22nd 2011, 11:35 am

Please change your topic title to someghing more descriptive. Sad

The only difference is between first code, and also fourth:
First:
Code:
{postrow.displayed.POST_DATE}
Fourth:
Code:
$(document).ready(function() {
$('.post:has(".admin1"),.post td.row1:has(".admin1"),.postbody:has(".admin1"),.post td.row1 table tbody tr:has(".admin1")').css('background-color', 'purple');
});

Guest
Guest


Back to top Go down

Solved Re: Need help with post BG color

Post by jonnyuk100 on December 22nd 2011, 11:43 am

thank you for your help but..

It doesnt work Sad


Last edited by jonnyuk100 on December 22nd 2011, 12:07 pm; edited 1 time in total

jonnyuk100
New Member

Posts : 7
Reputation : 1
Language : english

Back to top Go down

Solved Re: Need help with post BG color

Post by Nera. on December 22nd 2011, 11:56 am

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.

Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

Solved Re: Need help with post BG color

Post by FL.ux on December 22nd 2011, 12:00 pm

if i want to change the BG color should i edit in the JS?

FL.ux
Forumember

Male Posts : 842
Reputation : 18
Language : I hope I could be a FM staff :'(
Location : I shall fly to the subterranean sky.

Back to top Go down

Solved Re: Need help with post BG color

Post by Nera. on December 22nd 2011, 12:02 pm

Yes, the color of the BG is set in the JS file.

Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

Solved Re: Need help with post BG color

Post by jonnyuk100 on December 22nd 2011, 12:07 pm


It messed up the posts !

Help please Sad

Edit:

Nvm i fixed it now..

Thanks !!


Last edited by jonnyuk100 on December 22nd 2011, 12:13 pm; edited 2 times in total

jonnyuk100
New Member

Posts : 7
Reputation : 1
Language : english

Back to top Go down

Solved Re: Need help with post BG color

Post by Nera. on December 22nd 2011, 12:09 pm

Press the red cross next to the template and undo the changes. That will reset your template and delete the changes. The image I showed you is taken when I did it on phpBB2 and it works.

Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

Solved Re: Need help with post BG color

Post by jonnyuk100 on December 22nd 2011, 12:14 pm

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

If i change the above to

<span class="mod2">Moderator</span>

Will it still work?

jonnyuk100
New Member

Posts : 7
Reputation : 1
Language : english

Back to top Go down

Solved Re: Need help with post BG color

Post by Nera. on December 22nd 2011, 12:24 pm

Yes.

Edit: Here, I did it all over again to show you that it works on phpBB2. All you need to do is follow the instructions correctly
http://tiki.makingforum.com/t8-test-test-test

I see you have fixed it, solved than?

Nera.
Energetic

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

http://webartzforum.com

Back to top Go down

Solved Re: Need help with post BG color

Post by jonnyuk100 on December 22nd 2011, 2:22 pm

Yes Solved Smile

jonnyuk100
New Member

Posts : 7
Reputation : 1
Language : english

Back to top Go down

Solved Re: Need help with post BG color

Post by Nera. on December 22nd 2011, 2:25 pm

Topic Solved & Locked

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