• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.
  • This forum is for release discussion only. Discussions that do not relate specifically to the resource release should be discussed in another, more appropriate forum.
  • This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Sidebar Advertisements

FredC

Well-known member
#1
Im sure there is a easier way to do this, but im no coder and just made this on the fly.. therefore support will be limited to my basic understanding..
This hack is simply html and tables. You will have to edit the image name for your advertisers.

  • upload contents of the upload folder to your xenforo root
  • Appearance / Templates / Create New Template..
  • Template Name: advertisements
-------------------------------------------------------------------
add:

<div class="section">
<div class="secondaryContent">
<h3>Advertisements</h3>
<table border="1" cellpadding="1" cellspacing="1" style="height: 230px; width: 230px;">
<tbody>
<tr>
<td style="text-align: center;">
<a href="http://your_advertisers_url.com" target="_blank"><img alt="" src="http://your-site.com/styles/default/xenforo/advertisements/advertise.jpg" /></a></td>
<td style="text-align: center;">
<a href="http://your_advertisers_url.com" target="_blank"><img alt="" src="http://your-site.com/styles/default/xenforo/advertisements/advertise.jpg" /></a></td>
</tr>
<tr>
<td style="text-align: center;">
<a href="http://your_advertisers_url.com" target="_blank"><img alt="" src="http://your-site.com/styles/default/xenforo/advertisements/advertise.jpg" /></a></td>
<td style="text-align: center;">
<a href="http://your_advertisers_url.com" target="_blank"><img alt="" src="http://your-site.com/styles/default/xenforo/advertisements/advertise.jpg" /></a></td>
</tr>
</tbody>
</table>
<br /> </div>
</div>

------------------------------------------------------------------
  • Open forum_list template and add..
HTML:
        <xen:include template="advertisements" />

Screen Shot
Capture_02132011_134727.jpg
The images are 115 x 115px and will need to be added as you ad actual advertisements, as well as the names of the new images in the file path.

Hopefully i haven't forgot anything. ;)

Change Log:
V1.00 released 2-15-2011
 

Attachments

#5

If you would like to use DIVS, i have customed this to DIVS, so its easier for myself to use and edit however its not fully suited for everyone so you may have to edit the CSS.

Do the same as the above which VonDoom did with the files uploaded etc.

In the Advertisement template paste in:
HTML:
<div class="section">
<div class="secondaryContent">
<h3>Advertisements</h3>
<div id="advertbox">
<a href="http://your_advertisers_url.com" target="_blank"><div id="advert"></div></a>
<a href="http://your_advertisers_url.com" target="_blank"><div id="advert2"></div></a>
</div>

<div id="advertbox">
<a href="http://your_advertisers_url.com" target="_blank"><div id="advert"></div></a>
<a href="http://your_advertisers_url.com" target="_blank"><div id="advert2"></div></a>
</div>
<br />
<div id="link">Click <a href="http://wwepower.com/forum/pages/advertise/">here</a> to advertise.</div>
</div></div>
Then open Extra.css paste in the following:
PHP:
#advertbox{
width: 240px;
height: 118px;
}

#advert{
background: url(http://wwepower.com/forum/ads/advertisehere.png);
width: 115px;
height: 115px;
float: left;
}
#advert2{
background: url(http://wwepower.com/forum/ads/advertisehere.png);
width: 115px;
height: 115px;
float: left;
}
#link{
width: 150px;
margin-left: auto;
margin-right: auto;
}
and its completed:


To add more adverts copy a advert div and say call it advert3

then on the advert template where you want it put advert3.
 

Garamond

Well-known member
#10
What does it mean when I get the message "Templates in this style can not be modified. Please try another." ? This when trying to use the ad_sidebar templates.