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

Advertisements in Sidebar

Dav

Active member
#1
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
#3
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
#5
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
#6
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
#7
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.