Members Online + Stats at bottom?

thunderup

Active member
Hi, I am sure you all are aware of vBulletin's structure with having the users currently online, as well as the forum stats in the bottom of the board..

Is there anyone with an addon or a code that I can use to insert this at the bottom of my XF board?
I would like to keep the sidebar with this info as well, just trying to add it to the bottom too for those who like it there! (I have a collapsing sidebar)
 
Admin CP -> Appearance -> Templates -> forum_list

Add the red code (copied and pasted from the sidebar):

Rich (BB code):
<xen:h1>{$xenOptions.boardTitle}</xen:h1>

<xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:index'}" /></xen:container>
<xen:if is="{$xenOptions.boardDescription}"><xen:container var="$head.description">
	<meta name="description" content="{$xenOptions.boardDescription}" /></xen:container></xen:if>
<xen:container var="$head.openGraph">
	<xen:include template="open_graph_meta">
		<xen:set var="$url">{xen:link 'canonical:index'}</xen:set>
		<xen:set var="$title">{$xenOptions.boardTitle}</xen:set>
	</xen:include></xen:container>

<xen:hook name="forum_list_nodes">
	<xen:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>
</xen:hook>

		<xen:include template="sidebar_online_users" />
		
		<!-- block: forum_stats -->
		<div class="section">
			<div class="secondaryContent statsList" id="boardStats">
				<h3>{xen:phrase forum_statistics}</h3>
				<div class="pairsJustified">
					<dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
						<dd>{xen:number $boardTotals.discussions}</dd></dl>
					<dl class="messageCount"><dt>{xen:phrase messages}:</dt>
						<dd>{xen:number $boardTotals.messages}</dd></dl>
					<dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
						<dd>{xen:number $boardTotals.users}</dd></dl>
					<dl><dt>{xen:phrase latest_member}:</dt>
						<dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
					<!-- slot: forum_stats_extra -->
				</div>
			</div>
		</div>
		<!-- end block: forum_stats -->

<xen:sidebar>
	<xen:edithint template="sidebar.css" />
	
	<xen:hook name="forum_list_sidebar">
		<xen:include template="sidebar_online_users" />
		
		<!-- block: forum_stats -->
		<div class="section">
			<div class="secondaryContent statsList" id="boardStats">
				<h3>{xen:phrase forum_statistics}</h3>
				<div class="pairsJustified">
					<dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
						<dd>{xen:number $boardTotals.discussions}</dd></dl>
					<dl class="messageCount"><dt>{xen:phrase messages}:</dt>
						<dd>{xen:number $boardTotals.messages}</dd></dl>
					<dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
						<dd>{xen:number $boardTotals.users}</dd></dl>
					<dl><dt>{xen:phrase latest_member}:</dt>
						<dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
					<!-- slot: forum_stats_extra -->
				</div>
			</div>
		</div>
		<!-- end block: forum_stats -->
		
		<xen:include template="sidebar_share_page">
			<xen:set var="$url">{xen:link canonical:index}</xen:set>
		</xen:include>
		
	</xen:hook>
</xen:sidebar>

However, you lose some styling by taking this content out of the sidebar. Some extra work is required to get it looking how you want.
 
Admin CP -> Appearance -> Templates -> forum_list

Add the red code (copied and pasted from the sidebar):

Rich (BB code):
<xen:h1>{$xenOptions.boardTitle}</xen:h1>
 
<xen:container var="$head.canonical"><link rel="canonical" href="{xen:link 'canonical:index'}" /></xen:container>
<xen:if is="{$xenOptions.boardDescription}"><xen:container var="$head.description">
<meta name="description" content="{$xenOptions.boardDescription}" /></xen:container></xen:if>
<xen:container var="$head.openGraph">
<xen:include template="open_graph_meta">
<xen:set var="$url">{xen:link 'canonical:index'}</xen:set>
<xen:set var="$title">{$xenOptions.boardTitle}</xen:set>
</xen:include></xen:container>
 
<xen:hook name="forum_list_nodes">
<xen:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>
</xen:hook>
 
<xen:include template="sidebar_online_users" />
 
 <!-- block: forum_stats -->
 <div class="section">
 <div class="secondaryContent statsList" id="boardStats">
 <h3>{xen:phrase forum_statistics}</h3>
 <div class="pairsJustified">
 <dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
 <dd>{xen:number $boardTotals.discussions}</dd></dl>
 <dl class="messageCount"><dt>{xen:phrase messages}:</dt>
 <dd>{xen:number $boardTotals.messages}</dd></dl>
 <dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
 <dd>{xen:number $boardTotals.users}</dd></dl>
 <dl><dt>{xen:phrase latest_member}:</dt>
 <dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
 <!-- slot: forum_stats_extra -->
 </div>
 </div>
 </div>
 <!-- end block: forum_stats -->
 
<xen:sidebar>
<xen:edithint template="sidebar.css" />
 
<xen:hook name="forum_list_sidebar">
<xen:include template="sidebar_online_users" />
 
<!-- block: forum_stats -->
<div class="section">
<div class="secondaryContent statsList" id="boardStats">
<h3>{xen:phrase forum_statistics}</h3>
<div class="pairsJustified">
<dl class="discussionCount"><dt>{xen:phrase discussions}:</dt>
<dd>{xen:number $boardTotals.discussions}</dd></dl>
<dl class="messageCount"><dt>{xen:phrase messages}:</dt>
<dd>{xen:number $boardTotals.messages}</dd></dl>
<dl class="memberCount"><dt>{xen:phrase members_count}:</dt>
<dd>{xen:number $boardTotals.users}</dd></dl>
<dl><dt>{xen:phrase latest_member}:</dt>
<dd><xen:username user="$boardTotals.latestUser" /></dd></dl>
<!-- slot: forum_stats_extra -->
</div>
</div>
</div>
<!-- end block: forum_stats -->
 
<xen:include template="sidebar_share_page">
<xen:set var="$url">{xen:link canonical:index}</xen:set>
</xen:include>
 
</xen:hook>
</xen:sidebar>

However, you lose some styling by taking this content out of the sidebar. Some extra work is required to get it looking how you want.


Very good, Jake...
Is there any way we can mod this code so that it doesn't show "Staff Online Now" ?
 
Very good, Jake...
Is there any way we can mod this code so that it doesn't show "Staff Online Now" ?

That requires editing the sidebar_online_users template, but that will affect both locations. Or you can replace <xen:include template="sidebar_online_users" /> with just the code that you want from sidebar_online_users
 
I believe bd Widget Framework has the capability. But I do not use it. Fetching the data and adding it shouldn't be too difficult if you know PHP.
 
Top Bottom