News:

Wondering if this will always be free?  See why free is better.

Main Menu

Google AdSense in SMF, various positions...

Started by Moonray, September 25, 2005, 11:46:56 PM

Previous topic - Next topic

trenchteam

You have to give your site time to be spidered... I have over 500,000 posts so it took quite sometime. Now my site is filled with ads.  As you can see at www.shoyoroll.com/forum or www.otek671.com

StanJ

The google ads are still a blank space after the first post....
I thought i did the code right...
example, see the huge blank after the first post..

http://foroadventista.com/index.php/topic,39.0.html

Thanks for any help..

Moonray

Quote from: StanJ on February 07, 2006, 08:21:10 AM
The google ads are still a blank space after the first post....
I thought i did the code right...
example, see the huge blank after the first post..

http://foroadventista.com/index.php/topic,39.0.html

Thanks for any help..

Obviously there is something wrong with the codes. You google adsense code is okay, but the inserted code is sour. Check it again and may be redo it all over again.

Good luck.

mann3r

hello all,
first i dont like to hijack this thread,
second is my problem on my forum
it is located at hxxp:www.stuffdaily.com/forums [nonactive]

i want my adsense to NOT appear on registration page because i believe it is against adsense TOS.

The forum is up but no post yet because i am setting it up. I am using the default theme
hxxp:www.allseocontest.com [nonactive] hxxp:www.shopauto.ca [nonactive]
hxxp:www.stuffdaily.com [nonactive]
hxxp:www.allseocontest.com/blackhat-fish.html [nonactive]

mann3r

hxxp:www.allseocontest.com [nonactive] hxxp:www.shopauto.ca [nonactive]
hxxp:www.stuffdaily.com [nonactive]
hxxp:www.allseocontest.com/blackhat-fish.html [nonactive]

Prasad007

thanks for the info guys! Although now i use the Ad management mod for my site! :)

ormuz

And who to make this in the new deafult theme (1.1 rc2)? Can someone post he code please?

ZhongFu

Thanks this work great! Expect for the color, all is great!
My SMF at www.community.wuzhongfu.com [nofollow]

knightfolk

Quote from: StanJ on February 05, 2006, 02:24:29 PM
Appreciate your input ,  it is still not working BUT  the blank is not under the first post rather than on top of it.

I am using tinyportal  but do not think that affects it at all.  When I used the other guys code it was showing up with links to his afflicate page...

Weird



I was having the same problem.. I had adsense in a in another block and turned it off and the ads starting showing up in the posts just the way they should.  hope this helps.

mcm

Quote from: Mashahood on December 16, 2005, 02:39:39 AM
Open Display.template.php Find
// Show the member's signature?
      if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
         echo '
                     <hr width="100%" size="1" class="hrcolor" />
                     <div class="signature">', $message['member']['signature'], '</div>';

      echo '
                  </td>
               </tr>
            </table>
         </td></tr>
      </table>
   </td></tr>';


replace it with


// Show the member's signature?
      if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
         echo '
                     <hr width="100%" size="1" class="hrcolor" />
                     <div class="signature">', $message['member']['signature'], '</div>';

      echo '
                  </td>
               </tr>
            </table>
         </td></tr>
      </table>
   </td></tr>';
      //Show Google Adsense after the 1st post
if ($message['id'] == $context['first_message'])
         echo '
         <div align="center">
        <script type="text/javascript"><!--
        google_ad_client = "YOURADSENSECODE";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_type = "text";
        google_ad_channel ="";
        google_color_border = "577494";
        google_color_bg = "577494";
        google_color_link = "FFFFFF";
        google_color_url = "999999";
        google_color_text = "EFEFEF";
        //--></script>
        <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        </div>
         ';
      //End of the adsense Code

This looks like this hxxp:www.fullfunda.com/forum/index.php?topic=622.0 [nonactive]

Anyone know how to get this to work with 1.06 ?

I tried it .. and it just puts an uncentered ad "on top" of the first post.

Thanks
;D
hxxp:thai.expatz.net [nonactive]

carlatf

hi,

any ideas of how to show advertisement in the 5th message of a thread?

best,
Carla

sbarnes

What can be changed so that when the adsense links are clicked they are opened in a new window?

Prasad007

Quote from: sbarnes on April 20, 2006, 07:40:00 PM
What can be changed so that when the adsense links are clicked they are opened in a new window?
ya good question. wanted to know that myself...
wouldnt want my members to go elsewhere upon clicking of ads.

JayBachatero

You can't do that.  It is againgt Google's TOS.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

Prasad007

Oh okay. but what if im using another ad company that hasnt specified anything about the same.
Is there any particular code for it ?

mcm

Quote from: Prasad007 on April 21, 2006, 02:23:25 AM
Oh okay. but what if im using another ad company that hasnt specified anything about the same.
Is there any particular code for it ?


If the "other" ad companys script resides at thier site like Googles does... then you would have to hack into thier site to change it ... then get your account cancelled !  :D
hxxp:thai.expatz.net [nonactive]

Prasad007

Quote from: mcm on April 21, 2006, 03:44:30 AM
Quote from: Prasad007 on April 21, 2006, 02:23:25 AM
Oh okay. but what if im using another ad company that hasnt specified anything about the same.
Is there any particular code for it ?


If the "other" ad companys script resides at thier site like Googles does... then you would have to hack into thier site to change it ... then get your account cancelled !  :D
hmmmm ::) seems pretty simple
lol :P
bah. forget it :P

sbarnes

Thats a bit god damn cheeky if you ask me. Surely if its your site you should have the say as to the workings of it. Nevermind, thanks.

geezmo

Quote from: mcm on March 29, 2006, 10:10:51 PM
Quote from: Mashahood on December 16, 2005, 02:39:39 AM
Open Display.template.php Find
// Show the member's signature?
      if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
         echo '
                     <hr width="100%" size="1" class="hrcolor" />
                     <div class="signature">', $message['member']['signature'], '</div>';

      echo '
                  </td>
               </tr>
            </table>
         </td></tr>
      </table>
   </td></tr>';


replace it with


// Show the member's signature?
      if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
         echo '
                     <hr width="100%" size="1" class="hrcolor" />
                     <div class="signature">', $message['member']['signature'], '</div>';

      echo '
                  </td>
               </tr>
            </table>
         </td></tr>
      </table>
   </td></tr>';
      //Show Google Adsense after the 1st post
if ($message['id'] == $context['first_message'])
         echo '
         <div align="center">
        <script type="text/javascript"><!--
        google_ad_client = "YOURADSENSECODE";
        google_ad_width = 728;
        google_ad_height = 90;
        google_ad_format = "728x90_as";
        google_ad_type = "text";
        google_ad_channel ="";
        google_color_border = "577494";
        google_color_bg = "577494";
        google_color_link = "FFFFFF";
        google_color_url = "999999";
        google_color_text = "EFEFEF";
        //--></script>
        <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
        </div>
         ';
      //End of the adsense Code

This looks like this http://www.fullfunda.com/forum/index.php?topic=622.0

Anyone know how to get this to work with 1.06 ?

I tried it .. and it just puts an uncentered ad "on top" of the first post.

Thanks
;D

I have the same problem. Adsense is on top-left of the first post not under it. And there's no "dummy poster" aka "Sponsored Links."

Anyone?

Sledgie

Quote from: shashikiranu on September 25, 2005, 11:46:56 PM
Google AdSense and SMF:


--------
EDIT:
Please check my new post in this thread here.
Have made new changes and will be releasing them soon. Need your feedback on any further improvements.
Thanks
--------
All information is now being compiled at this thread in Joomlaspan forum also.


Position 1: After 1st post

File to be modded: Display.template.php

Find this in the file:

// Show the member's signature?
if (!empty($message['member']['signature']) && empty($options['show_no_signatures']))
echo '
<hr width="100%" size="1" class="hrcolor" />
<div style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div>';

echo '
</td>
</tr>
</table>
</td></tr>
</table>
</td></tr>';
[color=red]}[/color]


Insert this code, just ABOVE the "}" indicated in red, above.


if ($message['id'] == $context['first_message'])
echo '
<div align="center">
        <script type="text/javascript"><!--
        google_ad_client = "pub-youradsenseID";
        google_ad_width = 468;
        google_ad_height = 60;
        google_ad_format = "468x60_as";
        google_ad_type = "text";
        google_ad_channel ="yourCHANNEL";
        google_color_border = "577494";
        google_color_bg = "577494";
        google_color_link = "FFFFFF";
        google_color_url = "999999";
        google_color_text = "EFEFEF";
        //--></script>
        <script type="text/javascript"
          src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
        </script>
  </div>
';


PS: Do not forget to put in your AdSense ID.

Demo:
Mediscuss: Medical education Discussion forum


Grr. It's making me crazy! I don't use the same theme, I use Oxygen, and I can't find where this code goes. Oxygen doesn't have a display.template.php. I've searched every file I could think of looking for the "signature" code and I can't find it. Does anyone know where it is in the Oxygen theme?

Advertisement: