News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Forum advice :: How I placed Adsense on my forum.

Started by Niteblade, February 25, 2007, 09:47:21 PM

Previous topic - Next topic

donjazzy

#100
I really like using tips and trick as oppose ad mod. Please how can I place ad after every first post in smf2.0. Thanks.

Hj Ahmad Rasyid Hj Ismail

Try changing the code above a bit like this. Find:
echo '
<div class="inner" id="msg_', $message['id'], '"', '>', $message['body'], '</div>
</div>';

Replace:
echo '
<div class="inner" id="msg_', $message['id'], '"', '>
', $message['body'], '';
if ($message['id'] == $context['first_message'])
echo '
<div style="text-align:center;">
<script target="_blank" type="text/javascript"><!--
google_ad_client = "pub-xxxxxxxxxxxxxxxxxxx";
/* All 790x90 */
google_ad_slot = "xxxxxxxxxxxxx";
google_ad_width = xxx;
google_ad_height = xxx;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js?target=_blank">
</script></div>';
echo '
</div>
</div>';


azzuhro

example_http:hxxp:www.azzuhro-forum.tk [nonactive]

I successfully edit the theme

Display.template.php

echo '
<tr> <td style="padding: 0 0 1px 0;"> </ td> </ tr> <center> <script>
ADS HERE
</ table>
<a name="lastPost"> </ a> ';


example _http:hxxp:www.azzuhro-forum.tk [nonactive]


index.template.php

echo '
            document.getElementById("upshrink_ic").src = smf_images_url + (mode ? "/expand.gif" : "/collapse.gif");

            document.getElementById("upshrinkHeaderIC").style.display = mode ? "none" : "";

            current_header_ic = mode;
         }
      // ]]></script>
ADS HERE
</head>
<body>';


example _http:hxxp:www.azzuhro-forum.tk [nonactive]


moguns

Hello,

Does anyone know how to place an add between first and second post only?

Thanks


Biology Forums

Best what to do this is to use TinyPortal mod, it's very effective.

Hj Ahmad Rasyid Hj Ismail


Hj Ahmad Rasyid Hj Ismail

Quote from: moguns on September 15, 2011, 07:27:18 PM
Hello,

Does anyone know how to place an add between first and second post only?

Thanks
Care to read the OP first before asking?

Advertisement: