vBulletin 4, the most powerful community software + vBSEO 3.5, the ultimate SEO solution = Your ultimate platform for 2010 and beyond. Click below to learn more.

Results 1 to 7 of 7

Placing Kontera Ads

This is a discussion on Placing Kontera Ads within the Ad Networks forums, part of the Monetizing category; Is there a way, that while I'm showing Kontera ads for guests in postbit (for the entire forum) - I ...

  1. #1
    Member
    Real Name
    ultrono
    Join Date
    Sep 2007
    Posts
    34

    Placing Kontera Ads

    Is there a way, that while I'm showing Kontera ads for guests in postbit (for the entire forum) - I can chose to show it to members in a certain section as well?

    I tried doing the following, but it doesn't work. Kindly, can anyone in here help me out with this bit.

    For Guests - in Post bit:

    Code:
    <!-- message -->
            <if condition="$show['guest'] and THIS_SCRIPT == 'showthread'"><div class=KonaBody></if>
            <div id="post_message_$post[postid]">$post[message]</div>
            <if condition="$show['guest'] and THIS_SCRIPT == 'showthread'"></div></if>
            <!-- / message -->
    
    For Members - in Post bit: [I placed this right underneath the above code]

    Code:
    <!-- message -->
            <if condition="$bbuserinfo[usergroupid] != 1 and THIS_SCRIPT == 'showthread' and "$forum[forumid] == 9"><div class=KonaBody></if>
            <div id="post_message_$post[postid]">$post[message]</div>
            <if condition="$bbuserinfo[usergroupid] != 1 and THIS_SCRIPT == 'showthread' and "$forum[forumid] == 9"></div></if>
            <!-- / message -->
    

    Footer:

    For Guests:

    Code:
    <if condition="$show['guest'] and THIS_SCRIPT == 'showthread'">
    --==Kontera Code==--
    </if>
    
    For Members:

    Code:
    <if condition="$bbuserinfo[usergroupid] != 1 and THIS_SCRIPT == 'showthread' and "$forum[forumid] == 9">
    --==Kontera Code==--</if>
    

  2. #2
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,983
    do you have this wrapped in the KonaBody div ?

  3. #3
    Member
    Real Name
    ultrono
    Join Date
    Sep 2007
    Posts
    34
    Yes, from the code above, this is what I think you're referring to.

    Code:
    <!-- message -->
            <div class=KonaBody></if>
            <div id="post_message_$post[postid]">$post[message]</div>
            <!-- / message -->
    
    Following is the error that I'm getting upon implementing the code above:

    Code:
    syntax error, unexpected T_CLASS in /home/******/public_html/testvb/includes/adminfunctions_template.php(3716) : eval()'d code on line 106 
    Last edited by ultrono; 06-26-2008 at 01:30 AM.

  4. #4
    Senior Member briansol's Avatar
    Real Name
    Brian
    Join Date
    Apr 2006
    Location
    Central CT, USA
    Posts
    6,983
    firstly, be sure to quote all attributes for xhtml reasons.
    ie:

    Code:
    <div class="KonaBody">
    
    For your fix, try wrapping your multi-conditionals and putting it all in one div instead of nested for everything:

    Code:
    <div id="post_message_$post[postid]"
    <if condition="((THIS_SCRIPT == 'showthread') AND (($show['guest']) OR (($show['member']) AND ($forum[forumid] == 9))))"> class="KonaBody"></if>>$post[message]</div>
    
    untested. i think that's right though...

    this groups everything in the condition of:
    -in Show thread
    -- all guests
    -- members + forum 9

    Looks like you had some extra quotes around the forum ID condition in youf code.
    Code:
    and "$forum[forumid]
    
    that quote is misplaced.

    This also saves you from coding the same template block over and over again... only need this one block for both guests and members.


    For the footer, you can just include it for everything... once its loaded once, its cached anyway and its probably less overheard than the template conditional is worth.

    Code:
    <if condition="(THIS_SCRIPT == 'showthread')">
    KONA JS
    </if>
    

  5. #5
    Member
    Real Name
    ultrono
    Join Date
    Sep 2007
    Posts
    34
    Brian, thanks a bunch for the help. It works! Can you please tell me that if I want to add multiple forum ids, I can add them like the following:

    Code:
    $forum[forumid] == 9,10,11
    

  6. #6
    Member
    Real Name
    ultrono
    Join Date
    Sep 2007
    Posts
    34
    Ok, I'm having one issue with the above code.

    If added in the form that you've written here - it gets pasted all over my forum (for my members) - which I don't want. And if I add the following code in the footer as well, instead of simple condition of showthread, members can't see it anymore in that particular forum.

    Code:
    <if condition="((THIS_SCRIPT == 'showthread') AND (($show['guest']) OR (($show['member']) AND ($forum[forumid] == 9))))">
    
    Kon Js
    
    </if>
    

  7. #7
    Member
    Real Name
    ultrono
    Join Date
    Sep 2007
    Posts
    34
    Anyone?

Similar Threads

  1. Placing Kontera Ads
    By sunrise in forum Off-Topic & Chit Chat
    Replies: 23
    Last Post: 06-25-2008, 07:36 PM
  2. Placing post_linkback.gif somewhere else
    By Lian in forum LinkBacks
    Replies: 2
    Last Post: 04-26-2007, 07:07 PM
  3. Placing Ads in Threads
    By ruhrpottforum in forum Ad Networks
    Replies: 9
    Last Post: 03-01-2007, 01:07 PM
  4. Kontera
    By phuddle in forum General Discussion
    Replies: 6
    Last Post: 06-26-2006, 04:22 PM
  5. Placing an archive link on index page...
    By Sonnie in forum General Discussion
    Replies: 4
    Last Post: 05-19-2006, 04:42 PM