Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts

    AdSense Conditional Author Codes

    Hey guys, wondering if you can help me out with a problem I seem to not be able to wrap my head around. I have a blog with multiple authors on it and I'd like to have one of the AdSense spots change depending on the author. That way, by default, anyone who writes a post gets their code on that page and for everything else it defaults back to me.

    I was assuming it would be an easy <b:if cond='dataost.author == "Author"'>insert AdSense code<b:else/> insert my AdSense code</b:if> or something of the sort, but I can't seem to get anything to work. I always end up with error screens, such as one about "invalid data reference post.url: No dictionary named" or about it simply being formatted incorrectly.

    Any thoughts on how to accomplish this? I'm sure it's something easy that I'm just overlooking.

    Many thanks in advance.

  • #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,471
    Thanks
    0
    Thanked 634 Times in 624 Posts
    What server side language is that if statement using? Do you have that language available on your server?
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #3
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    To be honest I have no idea what that means haha. I forgot to mention that this is a Blogger site though, if that helps.

  • #4
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    I still can't figure this out. Does anyone have any suggestions?

  • #5
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Still having problems with this if anyone has any ideas

  • #6
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hate to keep bumping but I haven't figured this out yet and I'd like to get it running as soon as possible for the other contributors to my website, so any help would really be appreciated

  • #7
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    ...bump......

  • #8
    New Coder
    Join Date
    Oct 2012
    Posts
    15
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Alright, I guess you should just save the forum space and delete this thread.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •