1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Usergroup colour on topic list

Discussion in 'Styling and Customization Questions' started by sitwi, Jun 23, 2012.

  1. sitwi

    sitwi Active Member

    Hi guys,

    I know this has been asked extensively in the past, but I can't find anything recent, not any previous solution.

    I'm looking for a simple change of colour for usergroups in the topic list, i.e. the poster's name to change colour in last post, and under the topic.

    e.g. in picture attached. The usergroup CSS is styled, and appears everywhere that I'd expect, except here.

    (Better yet, change the colour across the site, but these two instances are vital to me!)

    Thanks very much for anybody's time.
     

    Attached Files:

    • vic.png
      vic.png
      File size:
      409.5 KB
      Views:
      82
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    For the thread author:

    Admin CP -> Appearance -> Templates -> thread_list_item

    Add the red code:

    Code:
    			<div class="secondRow">
    				<div class="posterDate muted">
    					<xen:username user="$thread" rich="true" title="{xen:phrase thread_starter}" />,
    					<a{xen:if {$visitor.user_id}, ' href="{xen:link threads, $thread}"'} class="faint"><xen:datetime time="$thread.post_date" title="{xen:if {$visitor.user_id}, '{xen:phrase go_to_first_message_in_thread}'}" /></a><xen:if is="{$showForumLink}">,
    					<a href="{xen:link forums, $thread.forum}" class="forumLink">{$thread.forum.title}</a></xen:if>
    
    					<xen:if is="{$showLastPageNumbers} AND {$thread.lastPageNumbers}">
    						<span class="itemPageNav">
    							<span>...</span>
    							<xen:foreach loop="$thread.lastPageNumbers" value="$pageNumber">
    								<a href="{xen:link threads, $thread, 'page={$pageNumber}'}">{$pageNumber}</a>
    							</xen:foreach>
    						</span>
    					</xen:if>
    				</div>
    
    But there is no such edit for the last poster:

    http://xenforo.com/community/thread...message-area-get-data-needed-via-addon.32763/
     
  3. sitwi

    sitwi Active Member

    That's the more important of the two sorted - thanks Jake! And thanks for all you do to provide support on this site.
     
    SchmitzIT likes this.
  4. Romchik®

    Romchik® Well-Known Member

    @Jake Bunce
    It does not work anymore. There is a solution for 1.2.1?
     
  5. Jeremy

    Jeremy XenForo Moderator Staff Member

    It should work, that code hasn't changed, can you post your code?
     
    Romchik® likes this.
  6. Romchik®

    Romchik® Well-Known Member

    Oh, I look on the main page of the forum, but this changes color on the list of threads. Sorry.
     
    Last edited: Aug 21, 2013
  7. Shelley

    Shelley Well-Known Member

    Last edited: Aug 22, 2013
    Romchik® likes this.
  8. Romchik®

    Romchik® Well-Known Member

    Thank you Shelley. Yesterday I watched this resource, but for such small things I did not want to install another plugin :)
    This plug-in would have been nice if it was not necessary to change the templates.
     
  9. Shelley

    Shelley Well-Known Member

    I use the Xenforo TM to eliminate the template edits which works very well since I want the same usergroup colours to span across all styles and it works very well. It saved me from making multiple edits across styles and well worth it I honestly think you should consider it. And I agree they are little changes but the impact they make are significant and can add to your style (visuals) which you can see at my site. Well worth considering using imo. :)
     
    Romchik® likes this.
  10. tyteen4a03

    tyteen4a03 Well-Known Member

    My Custom Markup for User addon has this template modification in place. You can extract it from my addon.
     
    Romchik® likes this.

Share This Page