Full credit goes to http://save.link.ba/viewtopic.html for most of the work. I never found a way to add ads to the sub-forum page but this will add ads to the following:
• Top and bottom of the main page
• Top of the forum page (not sub-forums of the forums)
• Top of each topic and directly under the first post
• Top of the search page
I also didn’t like the way the original ads were displayed so I created my own formatting and started from scratch. You can either edit the following files using the built-in editor in the Administrator Control Panel or download them via FTP and then re-upload them.
1. Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
2. Open /styles/subsilver2/theme/stylesheet.css
3. Add the following to the bottom of the file
.google_ad {
border: 1px solid #A9B8C2;
background-color: #ECECEC;
}
4. Save and close /styles/subsilver2/theme/stylesheet.css
5. In Notepad or similar text editor paste the following. Make sure that you replace your Google Adsense code with your own. From here own I will refer to this as the Google Code.
<div class="google_ad">
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-xxx";
google_ad_slot = "xxx";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</div>
6. Open /styles/subsilver2/template/index_body.html
7. Find “<!-- INCLUDE forumlist_body.html -->”
8. Place Google Code before “<!-- INCLUDE forumlist_body.html -->” for top of the main page ad placement
9. Place Google Code after “<!-- INCLUDE forumlist_body.html -->” for bottom of the main page ad placement
10. Save and close /styles/subsilver2/template/index_body.html
11. Open /styles/subsilver2/template/viewforum_body.html
12. Find “<!-- INCLUDE forumlist_body.html -->”
13. Place Google Code before “<!-- INCLUDE forumlist_body.html -->” for top of the forum ad placement
14. Save and close /styles/subsilver2/template/viewforum_body.html
15. Open /styles/subsilver2/template/viewtopic_body.html
16. Find “<!-- BEGIN postrow -->”
17. Place Google Code before “<!-- BEGIN postrow -->” for top of the topic ad placement
18. Find “<!-- END postrow -->”
19. Place “<!-- IF postrow.S_FIRST_ROW -->” Google Code “<!-- ENDIF -->” before “<!-- END postrow -->” for topic ad placement after the first post
20. Save and close /styles/subsilver2/template/viewtopic_body.html
21. Open /styles/subsilver2/template/search_results.html
22. Find “<!-- IF S_SHOW_TOPICS -->”
23. Place Google Code before “<!-- IF S_SHOW_TOPICS -->” for top of the search page ad placement
24. Save and close /styles/subsilver2/template/search_results.html
The results are not as sophisticated as the original mod but I am happy with the results. You can see a working version of this mod at http://ycoderscookbook.com/forums.

