Forum administrators commonly want to embed advertisements (like Google's adsense) into forum messages. This article should help you to get started.
Contents |
Add the adcode to either header.tmpl or footer.tmpl. See procedure for changing the forum's header and footer at header and footer.
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:
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.