URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       Create A Forum - Support Forums
  HTML https://support.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Style Support
       *****************************************************
       #Post#: 8313--------------------------------------------------
       Color username based on membergroup?
   DIR By: Nienna
       Date: February 6, 2013, 2:15 pm
       ---------------------------------------------------------
       Hi there,
       On my forum, I have (of course) several membergroups and I'd
       like to be able to distinguish them clearly. I am looking for a
       code that will change the color of the poster that appears next
       to the post, based on membergroup. For example, I am an
       Administrator, and the color of Administrators is gold on my
       forum, so I would like my name to appear in gold next to my
       posts.
       Now when searching this forum, I found this topic
  HTML http://support.createaforum.com/5/(code)-color-membergroup-posts/<br
       />on changing the background of a post, based on a membergroup.
       I
       tried tweaking it so it would not change the background, but the
       color of the username, but obviously I didn't succeed. (I
       inserted the code correctly, since it would change the
       background to gold before trying to tweak it).
       Now this is the code I tried (after I tweaked it a bit):
       --- Code ---
       
       
       <script>
       function
       xboi209_colormembergroupposts(membergroup,color){$("li.membergroup:contains('"+membergroup+"')").closest(".poster
       h4
       a").css("color",color)}xboi209_colormembergroupposts("Administrator","gold");
       </script>
       --- End Code ---
       Could anybody help me?
       #Post#: 8314--------------------------------------------------
       Re: Color username based on membergroup?
   DIR By: CreateAForum
       Date: February 6, 2013, 2:18 pm
       ---------------------------------------------------------
       Did you include the jquery call/load from the top of membergroup
       color topic?
       #Post#: 8315--------------------------------------------------
       Re: Color username based on membergroup?
   DIR By: Nienna
       Date: February 6, 2013, 2:21 pm
       ---------------------------------------------------------
       Yes I did (otherwise the code wouldn't work for the background
       of the post either) ;)
       #Post#: 8316--------------------------------------------------
       Re: Color username based on membergroup?
   DIR By: xboi209
       Date: February 6, 2013, 3:17 pm
       ---------------------------------------------------------
       --- Code ---
       <script>function
       xboi209_colormembergroupposts(a,b){$("li.membergroup:contains('"+a+"')").each(function(){$(this).closest("div.poster").children("h4").children("a").eq(1).css("color",b)})}xboi209_colormembergroupposts("Administrator","gold");</script>
       --- End Code ---
       It would have been nice if you posted in the codes support
       board.
       #Post#: 8332--------------------------------------------------
       Re: Color username based on membergroup?
   DIR By: Nienna
       Date: February 7, 2013, 4:50 am
       ---------------------------------------------------------
       Thank you very much, this did the trick!
       And sorry about posting in the wrong board, I'll keep it in mind
       for next time.
       *****************************************************
       Page 1 of 1