Announcement

Collapse
No announcement yet.

Different background color for different usergroup

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Different background color for different usergroup

    I'm trying to figure out how to give a special background color for a specific usergroup.

    I mean, when a forum leader (e.g. a moderator) starts a new thread, I'd like that thread somehow highligted in the threadlist.

    Is it possible?

    TIA

  • #2
    That's a great idea!!

    Sadly, the usergroupid isn't available in the threadbit template (as far as I'm aware), but the username is. I added the blue bits to threadbit...
    Code:
    <tr>
     <td class="alt1" id="td_threadstatusicon_$thread[realthreadid]">
      $thread[openclose_editable]
      <img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
     </td>
     <if condition="$show['threadicons']">
      <td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
     </if>
    <!-- Lats -->
    <if condition="in_array($thread[postusername],array('betty_jo','bobbie-jo','billie_jo'))"><td style="background:#faf8cc;"
    <else />
     <td class="alt1" </if>
    Change/add names to suit.
    Lats...

    Comment


    • #3
      Wow, it worked at once!

      Thank you so much Lats!


      BTW, do you think this effect could be restricted to specific fora?

      Comment


      • #4
        Yes, added the red bits...
        Code:
        <tr>
         <td class="alt1" id="td_threadstatusicon_$thread[realthreadid]">
          $thread[openclose_editable]
          <img src="$stylevar[imgdir_statusicon]/thread$thread[statusicon].gif" id="thread_statusicon_$thread[realthreadid]" alt="<if condition="$show['threadcount']"><phrase 1="$thread[dot_count]" 2="$thread[dot_lastpost]">$vbphrase[have_x_posts_in_thread_last_y]</phrase></if>" border="" />
         </td>
         <if condition="$show['threadicons']">
          <td class="alt2"><if condition="$show['threadicon']"><img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" /><else />&nbsp;</if></td>
         </if>
        <!-- Lats -->
        <if condition="in_array($thread[postusername],array('betty_jo','bobbie-jo','billie_jo')) AND in_array($GLOBALS[forumid],array(2,8,14))"><td style="background:#faf8cc;"
        <else />
         <td class="alt1" </if>
        Lats...

        Comment


        • #5
          Originally posted by Lats View Post
          Yes, added the red bits...
          Per-fect!!

          Really appreciate your help
          Thanks again

          Comment


          • #6
            Originally posted by Lats View Post
            Sadly, the usergroupid isn't available in the threadbit template (as far as I'm aware)
            is_member_of($post, X) where X is the groupID is the template command. Hopefully it's available in that template.

            Comment


            • #7
              No, it isn't
              Lats...

              Comment

              widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
              Working...
              X