joomla and adsense

Discussion in 'Joomla' started by Scarface., Aug 29, 2006.

  1. #1
    Hi,
    does any one know how i can put adsense under every news that i make?
     
    Scarface., Aug 29, 2006 IP
  2. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #2
    frankcow, Aug 29, 2006 IP
  3. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #3
    yes i tried all of those however i cannot find one that posts the adsense right after the news i post likst this:

    news
    ads
    ------
    news
    ads
    -------
    news
    ads

    is there a php file in side of it that i can go in and post the adsense script?
     
    Scarface., Aug 29, 2006 IP
  4. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #4
    well, kepe in mind that you can only use 3 ad blocks on a page, so this won't work if you're displaying more that 3 news items

    You'd have to modify the default output for the intro, not sure how you do that
     
    frankcow, Aug 29, 2006 IP
  5. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yes, i am only having 3 news block on each page.
     
    Scarface., Aug 29, 2006 IP
  6. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #6
    You;ll need to either use a mambot, or find the function that generates the intro blurb and modify it
     
    frankcow, Aug 29, 2006 IP
  7. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #7
    any suggestion?
     
    Scarface., Aug 29, 2006 IP
  8. mattr2110

    mattr2110 Active Member

    Messages:
    323
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    53
    #8
    If its under content you will have to use the adsense mambot.
     
    mattr2110, Aug 29, 2006 IP
  9. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #9
    please can you be more clear? and what mambot are you refering to?
     
    Scarface., Aug 29, 2006 IP
  10. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #10
    nvm, figured it out, dont need no modules ;)
     
    Scarface., Aug 29, 2006 IP
  11. frankcow

    frankcow Well-Known Member

    Messages:
    4,859
    Likes Received:
    265
    Best Answers:
    0
    Trophy Points:
    180
    #11
    how did you do it?
     
    frankcow, Aug 29, 2006 IP
  12. 010081

    010081 Banned

    Messages:
    4,657
    Likes Received:
    222
    Best Answers:
    0
    Trophy Points:
    0
    #12
    these is mod for that download from joomla site and with every articles just type {mosgoogle} thats all
     
    010081, Aug 30, 2006 IP
  13. Xitanto

    Xitanto Peon

    Messages:
    434
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #13
    Haha - I wrote a joomla extension for digg... First piece of php I ever had to touch. Ergh.
     
    Xitanto, Aug 30, 2006 IP
  14. Scarface.

    Scarface. Peon

    Messages:
    349
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #14
    ok here is how you do it:

    you go to your user menu and select my details, and then chenge your editor to "no WYSIWYG" this way what ever you write is acaul code. then you can just paste the adsense code after the news you posted.

    its really easy :p
     
    Scarface., Aug 30, 2006 IP
  15. livingingermany

    livingingermany Active Member

    Messages:
    311
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #15
    I did it by editing the "content.html.php" file in the /components/content directory. Look for the part of the code which you want to go before the ad, then escape the PHP and paste your adsense code in there. Start the PHP code tag again and hey presto - exactly what you wanted. If you want to be really clever, you can even pu a counter mechanism that loops three times, when you have a counter value of 3, then let the adsense code = null output. Then you can have as many news items on your page as you wish, only the first three will be followed by an adsense ad.
     
    livingingermany, Sep 5, 2006 IP
  16. TopDraw

    TopDraw Active Member

    Messages:
    314
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    58
    #16
    Nice tips, thanks!
     
    TopDraw, Sep 7, 2006 IP