1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

how to put adsense in smf forum?

Discussion in 'PHP' started by traffic4sale, Mar 2, 2008.

  1. #1
    how can i put adsense on my smf forum? please let me know.

    thanks
     
    traffic4sale, Mar 2, 2008 IP
  2. swishman

    swishman Well-Known Member

    Messages:
    1,264
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #2
    hi..
    here is how to put ads in your forum..
    open this file (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 style="overflow: auto; width: 100%; padding-bottom: 3px;" class="signature">', $message['member']['signature'], '</div>';
    
    		echo '
    						</td>
    					</tr>
    				</table>
    			</td></tr>
    		</table>
    	</td></tr>';
    PHP:
    add you google ads code after it..thats all..
    eg:
    // 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><tr><td>';
          //Show Google Adsense after the 1st post
    if ($message['id'] == $context['first_message'])
             echo '
             <div align="center">
            <script type="text/javascript"><!--
            google_ad_client = "pub-4098094541740579";
            google_ad_width = 728;
            google_ad_height = 90;
            google_ad_format = "728x90_as";
            google_ad_type = "text_image";
            google_ad_channel ="4809291968";
            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
    }
       echo '
       </td><tr><td style="padding: 0 0 1px 0;"></td></tr>
    </table>
    PHP:
    more help feel free to pm me..
    bye
     
    swishman, Mar 2, 2008 IP
  3. brokerdedi

    brokerdedi Banned

    Messages:
    256
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    brokerdedi, Mar 2, 2008 IP
  4. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    any help guys ???? i need more help.. please let me know.

    thanks
     
    traffic4sale, Mar 2, 2008 IP
  5. eng152

    eng152 Banned

    Messages:
    1,377
    Likes Received:
    21
    Best Answers:
    0
    Trophy Points:
    0
    #5
    There are many tips available in SMF forum
     
    eng152, Mar 2, 2008 IP
  6. brokerdedi

    brokerdedi Banned

    Messages:
    256
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Are you blind, ignorant or lazy? What help do you need exactly? You've got everything you need. If you want others to do this for you then you'll have to spit out some money. People put effort because they want to help and you don't have that much respect towards them to try their advices. Keep moaning, perhaps the problem will solve by itself.
     
    brokerdedi, Mar 2, 2008 IP
  7. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #7
    hi there.

    im so sorry. i just need many options but all the advices will be apply later. :)
     
    traffic4sale, Mar 2, 2008 IP
  8. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8

    Hi mate. this one is not working. :( huhuhhu...

    can anyone tell me how to put adsense on my smf ???

    my forum is www[dot]paypalcommunity[dot]info

    please help!!!!!!!!!!!!!!!!
     
    traffic4sale, Mar 2, 2008 IP
  9. gsv13

    gsv13 Well-Known Member

    Messages:
    2,773
    Likes Received:
    114
    Best Answers:
    0
    Trophy Points:
    130
    #9
    Try ad management modification of smf!!
     
    gsv13, Mar 2, 2008 IP
  10. swishman

    swishman Well-Known Member

    Messages:
    1,264
    Likes Received:
    28
    Best Answers:
    0
    Trophy Points:
    140
    #10
    its working..
    show us photoshot of your indexpage..
     
    swishman, Mar 2, 2008 IP
  11. nastynappy

    nastynappy Banned

    Messages:
    499
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #11
    nastynappy, Mar 2, 2008 IP
  12. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #12
    screen shot of my html of my index page ???
    please be specific. it was not working when i put that.

    i really need help !!
     
    traffic4sale, Mar 2, 2008 IP
  13. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #13
    anyone who can help ?
     
    traffic4sale, Mar 2, 2008 IP
  14. Joobz

    Joobz Peon

    Messages:
    598
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #14
    You have been given all of the tools necessary for accomplishing this task from the helpful and generous members of this forum. Start thinking for yourself and learn how it works. It's not that hard, you just have to edit a template file.

    Start here:
    http://www.webmasternow.com/copyandpaste.html

    Then here:
    http://docs.simplemachines.org/index.php?topic=402

    If that doesn't work, you might need this:
    http://www.albinoblacksheep.com/flash/youare
     
    Joobz, Mar 2, 2008 IP
  15. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #15
    hi there, :)

    the codes that they give me was an error i already try it to my site.

    thats why i need help.
     
    traffic4sale, Mar 2, 2008 IP
  16. Joobz

    Joobz Peon

    Messages:
    598
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Here's how I learned.

    I entered this code into various areas of my template files:
    
    <img src="noimage.jpg">
    
    Code (markup):
    Then I would upload the template file to my site and refresh my page. If I see a place that is missing an image (because I never had an image named "noimage.jpg" on my server), then I know that's the area of the html code on my template file that I needed to edit (if, in fact that is where I wanted my google adsense or other ad code to show). If that area is NOT the correct place, then I keep trying by moving my image code around the template until I found the place where I want my ads to show. Then I would replace my noimage code with my ad code.

    It's the best way to learn. Just feel your way around the code that way.
     
    Joobz, Mar 2, 2008 IP
  17. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #17
    thats a great idea mate :)
    but my question is

    where i will insert the code ? in noimage.jpg or i will replace <img src="noimage.jpg"> in to my Adsense code.

    please give some example.

    thanks for your help
     
    traffic4sale, Mar 2, 2008 IP
  18. Joobz

    Joobz Peon

    Messages:
    598
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #18
    Insert the code wherever. You don't know yet. That's why you insert the code in one place that you think the ads might look good. If you refresh your page and you see this:

    [​IMG]

    Then you know what part of the code shows up there.
     
    Joobz, Mar 2, 2008 IP
  19. traffic4sale

    traffic4sale Banned

    Messages:
    408
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #19
    i mean an example when you insert the code.
     
    traffic4sale, Mar 2, 2008 IP
  20. Joobz

    Joobz Peon

    Messages:
    598
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #20
    You insert the code by logging into your Adsense account, setting up your ad unit, copy the code that Google outputs, and paste it in your SMF template file in the desired location. It's not difficult.
     
    Joobz, Mar 2, 2008 IP