How to implement different adsense unit for depending on authors..

Discussion in 'HTML & Website Design' started by Khaludi92, Mar 29, 2010.

  1. #1
    Hi, I have a friend working with me on my blog. I want to place his adsense unit or adsense code over his post content, but under that same content i want my adsense to be placed. Like lets say he does a post on how to Watch Lost online, So this is how i want the ads to be placed

    Title = How to watch Lost online

    <His adsense unit>

    POST CONTENT

    <My adsense unit>

    I have seen couple of ways online, one of them is adsense revenue sharing plugin for wordpress, but the plugin keeps rotating his and my ads.. but i want his ads to Stay over his post, and my ads to stay under his post. But when its my post, i want my adsense code to be placed over and under my post..

    Similarly if the post is mine, i want only my adsense codes to placed on that post.. Not his..

    Please is there any way, then let me know :)
     
    Khaludi92, Mar 29, 2010 IP
  2. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #2
    Reply plz :$
     
    Khaludi92, Mar 29, 2010 IP
  3. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi Khaliudi

    This isn't too difficult, just depends on your coding skills - sorry not aware of a WP plugin that will do exactly what you want. You can use the wp_author tags to get the author ID then create a function (not too difficult) that identifies the adsense code based on the author ID. advatage of this is that it will work with multiple authors.
     
    parotstalk, Mar 29, 2010 IP
  4. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #4
    Sorry but i want to know how exactly to create a function, or someone can give me the function. I have seen a function which is famous all over the net, but it didnt actually work. I also asked some of my experienced friends to help me out, but they were like i think that the function is broken or isnt working with WP 2.9 :)
     
    Khaludi92, Mar 29, 2010 IP
  5. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Couple of quick questions; are both the adsense units the same size? i.e. 460x60, 250x300 etc. Do you know how to edit the template page?

    Depending on your answers will depend on what I can suggest next (I can give you the code but it will depend on the adove and how complex it needs to be)
    Russell
     
    parotstalk, Mar 29, 2010 IP
  6. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Oh, forgot to say you will need both adsense account numbers to be able to do anything
     
    parotstalk, Mar 29, 2010 IP
  7. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #7
    Yes they are both the same size.. They both have same unit name and publisher id ( as both the ad units are created using the same adsense account ), the only difference is that they have different ad_slot, which is unique for every ad unit created in adsense.. Apart from that everything is exactly same..
     
    Khaludi92, Mar 29, 2010 IP
  8. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Hi Khaludi92

    Really sorry about this, I am caught up in making some huge corrections on a WP theme for someone; I will be burning the midnight oil. Is it OK if I get back to you tommorrow?
     
    parotstalk, Mar 29, 2010 IP
  9. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #9
    Talk Your time bro :) but did you understand my requirements ? It is ok if you can even get any thing to close to what i want.. ill manage :) Anyways, take your time :) i will be waiting :d

    thanks in advance :)
     
    Khaludi92, Mar 29, 2010 IP
  10. sajan1kota

    sajan1kota Active Member

    Messages:
    186
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    50
    #10
    Looks like integrating different adsense units is a very difficult and time consuming task. i want to implement this on my blog but after reading this thread i have changed my mind. All the best guys
     
    sajan1kota, Mar 29, 2010 IP
  11. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #11
    Its not hard for someone who can make functions :$ m pretty sure just 2 - 3 lines of coding.. and its all done :)
     
    Khaludi92, Mar 30, 2010 IP
  12. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #12
    Bro.. Found anything ?!? :) ?
     
    Khaludi92, Mar 30, 2010 IP
  13. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #13
    HI Khaludi92

    A mad mad day, at the moment DP sending 100's of help messages np. can you give me about 30-40 mins? then I will send/give you the function.

    Really sorry got totally caught up on a clinets project today and not stopped. I know I said I would give you the function and I will - oh, do you know how to change/edit your WP functions file?
     
    parotstalk, Mar 30, 2010 IP
  14. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #14
    Yes, i do :) I will implement the code and let you know how is it working :) Thanks anyways..
     
    Khaludi92, Mar 30, 2010 IP
  15. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #15
    WOW want a moment; it is untested
     
    parotstalk, Mar 30, 2010 IP
  16. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #16
    Can you give me the URL pls
     
    parotstalk, Mar 30, 2010 IP
  17. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #17
    Khaludi92, Mar 30, 2010 IP
  18. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #18
    You have an error on line 245 functions.php - talktogadgets.com
     
    parotstalk, Mar 30, 2010 IP
  19. parotstalk

    parotstalk Peon

    Messages:
    43
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #19
    OK my error line 243

    Parse error: syntax error, unexpected '<' in /home1/sizzledc/public_html/talktogadgets.com/wp-content/themes/wp-soul/functions.php on line 243
     
    parotstalk, Mar 30, 2010 IP
  20. Khaludi92

    Khaludi92 Member

    Messages:
    259
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    28
    #20
    Yea, i think because i placed the function in the wrong way, i got that error. I have dont access to the host currently, so i wont be able to Fix that now :$ lets try with Streamlivesports
     
    Khaludi92, Mar 30, 2010 IP