Results 1 to 3 of 3

Thread: integrate each author's adsense code in their own articles?

  1. #1
    New to vBFAQ
    Join Date
    Feb 2011
    Posts
    3

    Question integrate each author's adsense code in their own articles?

    I managed to put authors in diferent usergroups.

    For their forum posts I modified postbit template with this condition, that checks the usergroup they belong to:

    <vb:if condition="is_member_of($post, 10)">

    Still, for their CMS articles, this conditional doesn't work in vbcms_content_article_page.

    What conditional to use, regarding author's user id or usergroup id, so I can show his adsense code in his articles only?

  2. #2
    Janitor Dave A's Avatar
    Join Date
    Sep 2006
    Location
    Durban, South Africa
    Posts
    2,118
    I suspect the problem is the variable isn't initalised in the template you're trying to add the condition to.

    I've been trying to wrap my head around this, but by my understanding:

    In vB3 variables such as usergroup were globalised and you could use them in a conditional almost anywhere on a page.
    vB4 goes about processing of variables in a totally different way. If you want to use a variable in any template, it has to be initialised for that particular template first.

    Don't ask me the syntax needed on how to do it - as I say I've only just wrapped my head around the concept. At this point (with the unpredictable nature of vB4 development) I'm trying to avoid that level of modifying like the plague.

  3. #3
    New to vBFAQ
    Join Date
    Feb 2011
    Posts
    3
    thanks a lot, Dave!
    NOBODY ELSE, PLEASE?

Similar Threads

  1. Where To Place Adsense Code In My Header?
    By kortic in forum HTML, Design, DHTML, CSS
    Replies: 3
    Last Post: 04-01-2008, 05:35 PM
  2. New Adsense Code
    By popowich in forum Google Adsense
    Replies: 2
    Last Post: 11-21-2007, 01:36 PM
  3. where in vbulletin calendar template to add adsense code
    By bongwater in forum vBulletin Discussion and Questions
    Replies: 1
    Last Post: 06-24-2007, 12:31 PM
  4. Adsense code placement
    By ski diva in forum Google Adsense
    Replies: 18
    Last Post: 08-11-2006, 01:55 AM
  5. Its Up!!!! PhotoShop Tutorials!! How to tweak adsense code!!!
    By amigo in forum Off Topic Discussion
    Replies: 0
    Last Post: 04-29-2006, 07:05 PM

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
  •