Announcement

Collapse
No announcement yet.

ads specific to usergroups

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • ads specific to usergroups

    I know I've seen this covered in the forum elsewhere, but for all my hunting I cannot find exactly what I'm after...

    I'm using the following code on my postbig_legacy, I took it from another thread elsewhere (and made minor amendments):


    PHP Code:
    <!-- Advertisement post code--> 
    <
    br />
    <if 
    condition="$post[postcount] % $vboptions[maxposts] == 1">
    <
    div style="padding:0px 0px $stylevar[cellpadding]px 0px">
     
    <
    table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
    <
    tr>
    <
    td class="thead" style="font-weight:normal" align="left"
    <!-- 
    status icon and date -->
    $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>

    </
    td>
    <
    td class="thead" style="font-weight:normal" align="right">
    &
    nbsp;
    #<a><strong>$post[postcount]</strong></a>
    </td>
     
    </
    tr>
    <
    tr valign="top">
    <
    td class="alt2" width="175">
     
    <
    div>
    <
    class="bigusername" href="">Advertisement</a>
    </
    div>
     
    <
    div class="smallfont">Sponsored posting</div>
    <
    div class="smallfont">
    &
    nbsp;<br />
    <!-- 
    PUT ADD AVATAR IMAGE HERE -->
    <
    script type="text/javascript"><!--
    google_ad_client "pub-mydets";
    google_ad_width 120;
    google_ad_height 240;
    google_ad_format "120x240_as_rimg";
    google_cpa_choice "CAAQvYvuiwIaCPmXDw_RY2fLKM3B93M";
    google_ad_channel "";
    //--></script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </
    script>
    <!-- 
    google adwords end here -->
    </
    div>
     
    <
    div class="smallfont">
    &
    nbsp;<br />
    <if 
    condition="$post['joindate']"><div>$vbphrase[join_date]: the beginning</div></if>
    <if 
    condition="$post['field2']"><div>$vbphrase[location_perm]: everywhere</div></if>
    <if 
    condition="$post['age']"><div>$vbphrase[age]: really old</div></if>
    <
    div>
    $vbphrase[posts]: lots
    </div>
    </
    div
     
    </
    td>
    <
    td class="alt1">
     
    <!-- 
    icon and title -->
    <
    div class="smallfont">
    <if 
    condition="$post['title']"><strong>$post[title]</strong></if>
    </
    div>
    <
    hr size="1" style="color:$stylevar[tborder_bgcolor]/>
    <!-- / 
    icon and title -->
     
    <!-- 
    message -->
    <
    div align="center">

    <
    table border="0" width="100%">
        <
    tr>
            <
    td><script type="text/javascript"><!--
    google_ad_client "pub-mydets";
    google_ad_width 336;
    google_ad_height 280;
    google_ad_format "336x280_as";
    google_ad_type "text_image";
    google_ad_channel ="6715804898";
    google_color_border "F5F5FF";
    google_color_bg "F5F5FF";
    google_color_link "22229C";
    google_color_text "000000";
    google_color_url "22229C";
    //--></script>
    <script type="text/javascript"
      
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </
    script></td>
            <
    td><script type="text/javascript"><!--
    google_ad_client "pub-mydets";
    google_ad_width 336;
    google_ad_height 280;
    google_ad_format "336x280_as";
    google_ad_type "text_image";
    google_ad_channel ="6715804898";
    google_color_border "F5F5FF";
    google_color_bg "F5F5FF";
    google_color_link "22229C";
    google_color_text "000000";
    google_color_url "22229C";
    //--></script>
    <script type="text/javascript"
      
    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </
    script></td>
        </
    tr>
    </
    table>


    </
    div>
    <!-- / 
    message --><br><br><br>
    <
    p>Be a MAF Supporter to remove these ads. (<i>coming soon</i>)
    <!-- 
    signature above this --> 
     
    </
    td>
    </
    tr>
    <
    tr>
    <
    td class="alt2">
    <
    img class="inlineimg" src="images/statusicon/user_online.gif" alt="Google is online" border="0" />
    &
    nbsp;
    </
    td>
    <
    td class="alt1" align="right">
     
    <!-- 
    controls -->
    <!-- / 
    controls -->
    </
    td
    </
    tr>
    </
    table>
    </
    div>
    </if>
    <!-- / 
    Advertisement Post Code --> 



    <!-- 
    Advertisement post code--> 

    <if 
    condition="$post[postcount] % $vboptions[maxposts] == 9">
    <
    div style="padding:0px 0px $stylevar[cellpadding]px 0px">
    <
    table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="0" border="0" width="100%" align="center">
    <
    tr>
    <
    td class="thead" style="font-weight:normal" align="left"
    <!-- 
    status icon and date -->
    $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if>

    </
    td>
    <
    td class="thead" style="font-weight:normal" align="right">
    &
    nbsp;
    #<a><strong>$post[postcount]</strong></a>
    </td>
     
    </
    tr>
    <
    tr valign="top">
    <
    td class="alt2" width="175">
     
    <
    div>
    <
    class="bigusername" href="">Advertisement</a>
    </
    div>
     
    <
    div class="smallfont">Sponsored posting</div>
    <
    div class="smallfont">
    &
    nbsp;<br />
    <!-- 
    PUT ADD AVATAR IMAGE HERE -->
    <
    script type="text/javascript"><!--
    google_ad_client "pub-mydets";
    google_ad_width 125;
    google_ad_height 125;
    google_ad_format "125x125_as_rimg";
    google_cpa_choice "CAAQ8InqhwIaCHqVfiMS4r_VKPDc6n4";
    google_ad_channel "";
    //--></script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </
    script>
    <!-- 
    google adwords end here -->
    </
    div>
     
    <
    div class="smallfont">
    &
    nbsp;<br />
    <if 
    condition="$post['joindate']"><div>$vbphrase[join_date]: the beginning</div></if>
    <if 
    condition="$post['field2']"><div>$vbphrase[location_perm]: everywhere</div></if>
    <if 
    condition="$post['age']"><div>$vbphrase[age]: really old</div></if>
    <
    div>
    $vbphrase[posts]: lots
    </div>
    </
    div
     
    </
    td>
    <
    td class="alt1">
     
    <!-- 
    icon and title -->
    <
    div class="smallfont">
    <if 
    condition="$post['title']"><strong>$post[title]</strong></if>
    </
    div>
    <
    hr size="1" style="color:$stylevar[tborder_bgcolor]/>
    <!-- / 
    icon and title -->
     
    <!-- 
    message -->
    <
    div align="center">

    <
    table border="0" width="100%">
        <
    tr>
            <
    td>
    <
    script type="text/javascript"><!--
    google_ad_client "pub-mydets";
    google_ad_width 468;
    google_ad_height 60;
    google_ad_format "468x60_as_rimg";
    google_cpa_choice "CAAQ5eWTlwIaCGS77-kQsZEsKNO193M";
    google_ad_channel "";
    //--></script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </
    script>
    <
    script type="text/javascript"><!--
    google_ad_client "pub-mydets";
    google_ad_width 468;
    google_ad_height 60;
    google_ad_format "468x60_as_rimg";
    google_cpa_choice "CAAQ3PmIlAIaCD9wwNS7QL9HKOzJrYMB";
    google_ad_channel "";
    //--></script>
    <script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
    </
    script>
    </
    td>
        </
    tr>
    </
    table>
    </
    div>
    <!-- / 
    message --><br><br><br>
    <
    p>Be a MAF Supporter to remove these ads. (<i>coming soon</i>)
    <
    p size="1">those who have already contibutedwill see the ads vanish in the near future :)</size></p>
    <!-- 
    signature above this --> 
     
    </
    td>
    </
    tr>
    <
    tr>
    <
    td class="alt2">
    <
    img class="inlineimg" src="images/statusicon/user_online.gif" alt="Google is online" border="0" />
    &
    nbsp;
    </
    td>
    <
    td class="alt1" align="right">
    </
    td
    </
    tr>
    </
    table>
    </
    div>
    </if> 
    The above gives posts that look like the below attachments.

    Can someone give me an idea of how to implement it in a group setting?
    i.e. I'd like to have it that it isn't shown to moderators & subscribers, but is showing to regular visitors & normal-members etc.
    Attached Files
    VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
    No Addons - none at all.

  • #2
    Code:
    <if condition="$post[postcount] % $vboptions[maxposts] == 1 AND !is_member_of($bbuserinfo, X, Y, Z)">
    Where X, Y, Z is a comma list of usergroupids for which you don't want the banner to show.

    Comment


    • #3
      Thanks Jake.

      Unsurprisingly, I managed to find this thread of yours shortly after posting this thread.

      Thanks for both the above thread and this reply lol
      VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
      No Addons - none at all.

      Comment


      • #4
        ignore this post - i figured out the answer...
        VB 5.4.1 - PHP 7..2.4 - MySQL 5.5.56
        No Addons - none at all.

        Comment

        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
        Working...
        X