Ode to Banners

August 4, 2003

I’m a big believer in using Movable Type for most projects at work. I really needed a banner ad system and remembered that IIS kinda has one built in. Well, I’m lazy, so I setup a template inside of Movable Type that was setup for the text database, then I used the built-in uploader to upload my banners.

I’m using the IIS Content Rotator program that uses the following template:

`

%% // <$MTEntryTitle$> :
<$MTEntryTitle$>


Then save as ContentRotator.txt
`

In the way this is setup, the title of my blog entry is also the ALT text of the image. I upload all of my banners, via the “Upload File” option in Movable Type and strip down the entry to just the url of the image. I then use the excerpt field to give the destination url of the banner. Then I pop this script into my Movable Type templates:

<br /> Between the <head> tags<br /> <% Dim objContentRotator Set objContentRotator = Server.CreateObject("MSWC.ContentRotator") %><br /> then where every the banner needs to be, add:<br /> <%=objContentRotator.ChooseContent("ContentRotator.txt")%><br />