Sign In  |  Register
 
 
DotNetNuke Support Forums
Adding Adsense Advertising to ActiveForums Topics
Last Post 29 Oct 2007 03:51 PM by John Mitchell. 4 Replies.
Printer Friendly
Sort:
PrevPrevNextNext
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.
AuthorMessages
John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
13 Aug 2007 10:22 PM  

ActiveForums is the awesome forum module used on this site. One of the great and under-used features of this mosule is it's templating capability.  In this tutorial I will show you how to update the templates so that you can include advertising like you see on this site.

The first thing you will need is an adsense account and to run through the AdSense setup wizard.

If you don't already have an Adsense account you can get one now:

Now use the Adsense Setup to get the Ad code.

Now what you need to do is login with admin privileges and navigate to the control panel for the active forums module.

Assuming you already have your groups and forums setup you can enter the templates area of the control panel.

Now we need to select a template to modify. I'll start with the ForumView, which is the intial list of all the Groups and their respective Forums. To make your ads show up right below the breadcrumb and just before the first group locate those tokens in the ForumView Template and paste in your adsense ad code. I also put a paragraph element around the code to align it.

 

After pasting in the code to the Forum View template like shown above and clicking on update you may need to go into the Main options and make sure that the ForumView Template is actually the one that will be used. 

 

Note: You may need to restart the application to actually have the new template get picked up.  Before doing that, you may also want to put ad code into one or more of the other templates. 

The image below shows the code needed to make the Google Ads appear after the first post in a thread. To find this location in the template you can looking for the closing /Topic tag. In this example I am actually adding a new row < tr > to the table that holds the first post (the Topic), and putting some styling on it so that it blends in with the replies.

 

This image below shows the location of where the Ads will display when modifying the TopicView template like in the image above.

 

And that is it.  Please reply with any feedback or questions.

Terp
New Member
New Member
Send Private Message
Posts:79
Avatar

--
14 Aug 2007 11:20 PM  

Sold.

Given that the only difference in features (not to mention the portal limitations) between the standard and professional version is "banner integrations," I am leaning toward the standard; but thought I would ask, one doesn't need this feature to integrate adsense, I assume? ...given that it's more of a skinning issue and not an integrated banner, per se...

John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
14 Aug 2007 11:43 PM  
Right, if you want to track your banners inside DNN then you may want to use the integrated banners. If you are just doing Adsense then you can do it with the standard version.

You can also use this same technique with other external banner managers or services.
Terp
New Member
New Member
Send Private Message
Posts:79
Avatar

--
27 Oct 2007 06:20 PM  

John,

Worked like a champ!  Many thanks, sir.

One think that may be helpful to other rookies like myself who stumble upon this post; you addressed the need to select the 'ForumView' template to get the header ads in there, but for the leaderboard ads that follow the initial post, you didn't mention that you had to go to the respective forum and ensure that the 'Topic Template' is also changed from default to 'TopicView.'

...being new to both making template changes and AF, I spent a little more time than I would like to admit restarting the app, clearing the cache, turning off PB, retyping the code, comparing screenshots of your entry versus mine, etc. :)

 

John Mitchell
Administrator
Veteran Member
Veteran Member
Send Private Message
Posts:4384
Avatar

--
29 Oct 2007 03:51 PM  
Thanks for adding that useful information Terp. Feedback like that is what makes doing these tutorials in a "living" document like this a lot better than other mediums.
Please Register to post a reply.
Another benefit of registration is the ability to subscribe to and recieve notifications of new posts.


Active Forums 4.1
Visit our Store for great DotNetNuke Modules and Skins
DotNetNuke CSS Menu 3.4.6 (single use)

Item codeCSSNM33SU
AuthorJohn Mitchell
Base Price$39.00
Product Information 
DotNetNuke CSS NavMenu 3.4.6 (Developers)

Item codeCSSNM33DEV
Base Price$149.00
Product Information 
DotNetNuke Performance Caching & Compression - PageBlaster 3.4.5 - Professional Edition

AuthorJohn Mitchell
Base Price$59.00
Product Information