Advertisements in Sidebar

Dav

Active member
Hi,

Could someone please tell me how i put a advertisement in the sidebar below the forum statistics box.

Thanks
 

Jake Bunce

XenForo moderator
Staff member
Admin CP -> Appearance -> Templates -> forum_list

Add this code:

Code:
	<div class="section">
		<div class="secondaryContent">
			BANNER CODE HERE
		</div>
	</div>
...as shown below:

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:if is="{$renderedNodes}"><xen:include template="node_list" /></xen:if>
	
<xen:sidebar>

	<xen:edithint template="sidebar.css" />
	
	<xen:include template="sidebar_online_users" />
	
	<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}:</dt>
					<dd>{xen:number $boardTotals.users}</dd></dl>
				<dl><dt>{xen:phrase latest_member}:</dt>
					<dd><a href="{xen:link members, $boardTotals.latestUser}" class="username">{$boardTotals.latestUser.username}</a></dd></dl>
			</div>
		</div>
	</div>

	<div class="section">
		<div class="secondaryContent">
			BANNER CODE HERE
		</div>
	</div>

</xen:sidebar>
 

fattony69

Well-known member
Sorry to bump, but I did this on my forum and it only shows up for guests, not members. How do I fix this so everyone can see it?
 

Brogan

XenForo moderator
Staff member
The sidebar contents are the same for guests and members, apart from the member avatar at the top which is replaced with the "Sign Up" button.

Are you sure you don't have the content wrapped in a conditional?
 

Andy.N

Well-known member
Anyone know how to put 4 banner of 125x125 size on the sidebar? How to space them evenly on a 2x2 matrix on a block right above Members Online block.
 
Top