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

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.webp

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.
 
I did that on my forum (basically copying the layout of my old vB3 forum):

http://www.mscclan.com/

View attachment 72078

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.
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:

2qUNbeG.png

Note: I'm not using Responsive feature.
 
Last edited:
@Jake Bunce
Can you suggest a way to get this code working on a XenPorta 2 homepage.
It shows just fine- but none of the stats are populated. I wonder if there's a simple edit to be made to make it compatible and show on an XP2 homepage.

Thanks for all suggestions.

J.
 
Back
Top Bottom