Inserting ads

From FUDforum Wiki
Jump to: navigation, search
Google Adsense in message body

Forum administrators commonly want to embed advertisements (like Google's adsense) into forum messages. This article should help you to get started.


Ads at top or bottom of page

Add the adcode to either header.tmpl or footer.tmpl. See procedure for changing the forum's header and footer at header and footer.

Ads after first post

To insert an ad after the first message in a topic, edit the drawmsg.tmpl template (only add the line starting with a +):

Index: drawmsg.tmpl
RCS file: /forum21/install/forum_data/thm/default/tmpl/drawmsg.tmpl,v
retrieving revision 1.93
diff -u -r1.93 drawmsg.tmpl
--- drawmsg.tmpl        3 Apr 2009 05:40:32 -0000       1.93
+++ drawmsg.tmpl        17 May 2009 12:13:36 -0000
@@ -355,6 +355,7 @@
 {IF: !$hide_controls}{TEMPLATE: dmsg_message_toolbar}{ENDIFI}
+{IF: !$obj->reply_to}<tr><td>Put your ad here!</td></tr>{ENDIFI}

 {SECTION: dmsg_no_msg_body}

To add your adcode via the GUI, navigate to the Admin Control Panel -> Theme Manager:

  1. Select a template set and language (usually Default and English).
  2. Click on message_entry.
  3. Add the line starting with a + (above) to the bottom of the text box.

Ads inside message bodies

Edit the drawmsg.tmpl template and search for the message_entry section. Now add your banner code somewhere in the <td colspan="2" class="MsgR3"> block.

Also see

External links

Personal tools