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

XF 1.2 How to move the online users in the bottom?

Discussion in 'Styling and Customization Questions' started by Bartholomeus, Apr 19, 2014.

  1. Bartholomeus

    Bartholomeus New Member

    I want to move the "Staff Online Now", "Members Online Now" and "Forum Statistics" in the bottom, like these forums...how i can do this?
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    I did that on my forum (basically copying the layout of my old vB3 forum):

    http://www.mscclan.com/

    Screen shot 2014-04-20 at 1.10.49 PM.png

    I just added it directly to the forum_list template:

    Admin CP -> Appearance -> Templates -> forum_list

    Add this to the bottom of the template:

    Code:
    <!-- block: sidebar_online_users -->
    <div class="nodeList sectionMain">
    	<div class="nodeInfo categoryNodeInfo categoryStrip">
    		<a href="{xen:link online, '', 'type=registered'}" title="{xen:phrase see_all_online_users}">Currently Active Users</a>: {xen:number $onlineUsers.total} ({xen:number $onlineUsers.members} members and {xen:number {xen:calc '{$onlineUsers.guests} + {$onlineUsers.robots}'}} guests)
    	</div>
    	
    	<img src="images/misc/whos_online.gif" style="float: left; margin: 5px;" />
    	
    	<xen:if is="{$onlineUsers.records}">
    	
    		<ol class="listInline" style="font-size: 11px; margin-top: 5px;">
    		
    			Most users ever online was 563, Jun 27, 2007 at 05:31 AM.<br />
    		
    			<xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
    				<xen:if is="{$i} <= {$onlineUsers.limit}">
    					<li>
    					<xen:if is="{$user.user_id}">
    						<a href="{xen:link members, $user}"
    							class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{xen:helper username, $user, '', 1}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
    					<xen:else />
    						{xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
    					</xen:if>
    					</li>
    				</xen:if>
    			</xen:foreach>
    			<xen:if is="{$onlineUsers.recordsUnseen}">
    				<li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
    			</xen:if>
    		</ol>
    	</xen:if>
    	
    	<div style="clear: both;"></div>
    	
    	<div class="nodeInfo categoryNodeInfo categoryStrip">
    		MSC Forum Statistics
    	</div>
    	
    		<img src="images/misc/stats.gif" style="float: left; margin: 5px;" />
    		
    		<div style="font-size: 11px; margin-top: 5px;">
    			Threads: {xen:number $boardTotals.discussions}, Posts: {xen:number $boardTotals.messages}, Members: {xen:number $boardTotals.users}<br />
    			Welcome to our newest member, <xen:username user="$boardTotals.latestUser" />
    		</div>
    </div>
    <!-- end block: sidebar_online_users -->
    
    There is some inline styling and hard-coded stuff in there that needs to be changed for your purposes.
     
  3. Bartholomeus

    Bartholomeus New Member

    Thank you Jake!
     
  4. Markos

    Markos Well-Known Member

    @Jake Bunce there are a way to color usegroup in this list?
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

  6. bcercan

    bcercan Active Member

    how can I make this as 2 columns instead of one under 2 bars for statistics and online users?

    PS: I made it like this if anyone interested:

    EXTRA.css

    Code:
    .footerLeft22{
        float: left;
        width: 80%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    .footerRight22{
        float: right;
        width: 10%;
        padding: 0 10px;
        box-sizing: border-box;
    }
    
    And edited version of your codes:

    Code:
    <!-- block: sidebar_online_users -->
    
    <div class="nodeList sectionMain">
        <div class="nodeInfo categoryNodeInfo categoryStrip">
      
            <div class="categoryText"> <h3 class="nodeTitle">Forum Statistics</h3> </div>
        </div>
    
    
        <div class='footerLeft22'>
    
        <xen:if is="{$onlineUsers.records}">
    
            <ol class="listInline" style="font-size: 11px; margin-top: 5px; margin-left: 15px;">
      
            Last member: <xen:username user="$boardTotals.latestUser" /><br>
      
            <a href="{xen:link online, '', 'type=registered'}" title="{xen:phrase see_all_online_users}">Online Members</a>: {xen:number $onlineUsers.total} ({xen:number $onlineUsers.members} registered and {xen:number {xen:calc '{$onlineUsers.guests} + {$onlineUsers.robots}'}} guests) <br>
      
      
                <xen:foreach loop="$onlineUsers.records" value="$user" i="$i">
                    <xen:if is="{$i} <= {$onlineUsers.limit}">
                        <li>
                        <xen:if is="{$user.user_id}">
                            <a href="{xen:link members, $user}"
                                class="username{xen:if '!{$user.visible}', ' invisible'}{xen:if {$user.followed}, ' followed'}">{xen:helper username, $user, '', 1}</a><xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                        <xen:else />
                            {xen:phrase guest}<xen:if is="{$i} < {$onlineUsers.limit}">,</xen:if>
                        </xen:if>
                        </li>
                    </xen:if>
                </xen:foreach>
                <xen:if is="{$onlineUsers.recordsUnseen}">
                    <li class="moreLink">... <a href="{xen:link online}" title="{xen:phrase see_all_visitors}">{xen:phrase and_x_more, 'count={xen:number $onlineUsers.recordsUnseen}'}</a></li>
                </xen:if>
            </ol>
        </xen:if>
    
        </div>
    
        <div class='foterRight22'>
    
        <div style="font-size: 11px; margin-top: 5px;">
                Threads: {xen:number $boardTotals.discussions} <br> Posts: {xen:number $boardTotals.messages} <br> Members: {xen:number $boardTotals.users}<br />
            </div>
    
        </div>
    
        <div style="clear: both;"></div>
    
    </div>
    And this is the result:

    [​IMG]

    Note: I'm not using Responsive feature.
     
    Last edited: Dec 21, 2014
  7. Brad P

    Brad P Active Member

    how would you move just the "staff online now" around up or down ?
     
  8. buidoi.net

    buidoi.net Member

    Hello,
    excuse me for disturbing you!
    how done you like to have the image?
    template modification or other?
    thank you in advance


    [​IMG]
     
    Phil likes this.
  9. Robert9

    Robert9 Active Member

    May someone knows how to bring the "Most seen" back, please?

    Most users ever online was 563, Jun 27, 2007 at 05:31 AM.<br />
     
  10. Brogan

    Brogan XenForo Moderator Staff Member

    That would require an add-on.
     
  11. Robert9

    Robert9 Active Member

    You may know where the information about it is saved?
     
  12. Doom PhD

    Doom PhD New Member

    Is there a way to change the color of the "Currently Active Users" text?
     

Share This Page