在线状态分不同颜色显示,演示如下: 在Extra.css最下面加入 HTML: /* online */ .UserOnline,.UserOnlineInvisible { font-weight: bold; font-size: 10px; color: @contentBackground; background: @primaryLight url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top; padding: 1px 5px; margin: -5px -5px 5px 5px; border: 1px solid @primaryLight; border-radius: 3px; border-top-right-radius: 0px; display: block; float: right; position: relative; box-shadow: 1px 1px 3px rgba(0,0,0, 0.25); margin-left: -{xen:calc '@content.padding-right + 5'}px; } .UserOffline { font-weight: bold; font-size: 10px; color: @contentBackground; background: #BBBBBB url('@imagePath/xenforo/gradients/category-23px-light.png') repeat-x top; padding: 1px 5px; margin: -5px -5px 5px 5px; border: 1px solid #BBBBBB; border-radius: 3px; border-top-right-radius: 0px; display: block; float: right; position: relative; box-shadow: 1px 1px 3px rgba(0,0,0, 0.25); margin-left: -{xen:calc '@content.padding-right + 5'}px; } .UserOnline span,.UserOnlineInvisible span { background-color: @primaryLight; border-top-right-radius: 3px; position: absolute; top: -4px; right: -1px; width: 5px; height: 4px; } .UserOffline span { background-color: #BBBBBB; border-top-right-radius: 3px; position: absolute; top: -4px; right: -1px; width: 5px; height: 4px; } 把message_user_online模板内容替换为 HTML: <span class="{$userStatus.class}"><span></span>{$userStatus.text}</span> 更多效果参考:http://xenforo.com/community/threads/show-user-is-online.8236/page-12