Subscribe and/or follow
Recent Entries
- My new Mac Mini
- Guest Post: How To Display Ad Blocks In Specific Posts In WordPress
- USB Sound Blaster Live! 24-bit on Windows 7
- Google has ajaxed their search engine
- Opera 10 equal to FireFox 3 or even better ?
- Save your code snippets with Snippely
- Re-inserting ads on the blog and using a free theme
- Always-on-top solution for Windows OS
- Bots following me on Twitter ?
- Best way to inspect dead links using your 404 page
Popular Entries
- phpbb3 should have native support for quick edit and quick reply
- Latest posts standalone script for phpbb3 and phpbb2
- Integrate RSS and ATOM into a phpbb3 based forum
- Top 10 phpbb3 styles
- Integrate AdSense into phpbb3
- Remove ads from Yahoo! Messenger 9
- K2 RC6 is now available and compatible with WP 2.5
- Google's PageRank Update outcome
- RSS awareness day
- Care to read some reviews about web hosting ?
Integrate AdSense into phpbb3
If you want to monetize your phpbb3 based forum and want to display some Google AdSense ads go ahead and read this simple tutorial. The following method can be applied on any prosilver based style. You can edit the files via your ACP or edit and upload them via FTP. I will post another tutorial showing you how to integrate AdSense into a subsilver2 based style. This tutorial covers the basic process of implementation but feel free to customize the code as you please.
Don’t forget to fill in your Google AdSense ID. Also you can place any kind of ads not just AdSense ads, so it’s up to you how your forum will look as there are no limits on customizing.
I suggest that you create file backups before you proceed, just in case.
Setting up the styling aspects.
@import url("adsense.css");Displaying ads one the index page.
AdSense on the index page-top
Displaying ads one the viewforum page.
AdSense on the viewforum page
If you want to display the ad block after every forum block (though i don’t really recommend it if you have small forum blocks) find <!– IF topicrow.S_FIRST_ROW or not topicrow.S_TOPIC_TYPE_SWITCH –> and AFTER it copy the SAME code.
Find <!– IF topicrow.S_LAST_ROW –> and after (just before <!– ENDIF –>)
paste the same code.
Displaying ads one the viewtopic page.
AdSense on the viewtopic page
<div class="content">{postrow.MESSAGE}</div>and BEFORE it add the following code
<div class="content">{postrow.MESSAGE}</div>add the following code
Displaying ads one the search results page.
AdSense on the search page
<!– IF S_SHOW_TOPICS –>
If you encounter problems with this method please give me a notice.
Also, if you want to see a live example check out this forum.