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.

Contents

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 @@
 </td></tr>
 {IF: !$hide_controls}{TEMPLATE: dmsg_message_toolbar}{ENDIFI}
 </table></td></tr>
+{IF: !$obj->reply_to}<tr><td>Put your ad here!</td></tr>{ENDIFI}
 {MAIN_SECTION: END}

 {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

Languages
Personal tools
This is a cached copy of the requested page, and may not be up to date.

Sorry! This site is experiencing technical difficulties.
Try waiting a few minutes and reloading.

(Can't contact the database server: Cannot return last error, no db connection)


You can try searching via Google in the meantime.
Note that their indexes of our content may be out of date.