vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Placing Adsense (https://vborg.vbsupport.ru/showthread.php?t=121148)

specmav 07-14-2006 01:09 AM

Placing Adsense
 
Yup another Adsense post.

I am looking to place adsense after the first post, after the 5th post and the last post. I also want to hide it from admins, mods and paid subscribers.

What do I need to finish this code, where do I need to place it and do I need to place it in more than one place?

Code:

<if condition="$post[postcount] == 1" condition="!is_member_of($bbuserinfo, 1, 2, 3)">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
        <td class="alt1" align="center">
                ADSENSE CODE
        </td>
</tr>
</table>

</div>
$spacer_close

</if>

Thanks for the help!

specmav 07-16-2006 01:08 PM

bump

zooki 07-17-2006 01:34 PM

I would love to see solution to this too. Come on, where are the geeks when you need them :p

specmav 07-17-2006 04:29 PM

I found a backwards way of doing it.

Code:

<if condition="!is_member_of($bbuserinfo, 1, 2, 3)">
<if condition="$post[postcount] == 1">

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr>
        <td class="thead" align="left">Sponsored Links</td>
</tr>
<tr>
        <td class="alt1" align="center">
                ADSENSE CODE
        </td>
</tr>
</table>

</div>
$spacer_close

</if>
</if>

Unfortunately I have to use this code three times (post count for 1st, 5th and 10th) . I have to change the post count for each copy of it.

I wish I knew a way to add the other post count numbers into the first conditional.

Any Ideas?

lightwave 07-17-2006 11:53 PM

this should work

PHP Code:

<if condition="!is_member_of($bbuserinfo, 1, 2, 3)">
<if 
condition="$post[postcount] == 1 || $post[postcount] == 5 || $post[postcount] ==10"

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead" align="left">Sponsored Links</td>
</
tr>
<
tr>
    <
td class="alt1" align="center">
        
ADSENSE CODE
    
</td>
</
tr>
</
table>

</
div>
$spacer_close

</if>
</if> 


Paul M 07-18-2006 02:55 AM

Or this ;

PHP Code:

<if condition="!is_member_of($bbuserinfo, 1, 2, 3) AND in_array($post[postcount], array(1,5,9)"

$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

<
table class="tborder" cellpadding="$stylevar[cellpadding]cellspacing="$stylevar[cellspacing]border="0" width="100%" align="center">
<
tr>
    <
td class="thead" align="left">Sponsored Links</td>
</
tr>
<
tr>
    <
td class="alt1" align="center">
        
ADSENSE CODE
    
</td>
</
tr>
</
table>

</
div>
$spacer_close

</if> 


specmav 07-18-2006 03:10 AM

Thanks!

TSM_Pikachu 07-18-2006 09:37 AM

I am having issues setting up my adsense but this one seems cool and what I really want on my forum. I know you have to modify one of the templates but what part of the template do i modify for THIS specific one to work?


All times are GMT. The time now is 07:11 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01012 seconds
  • Memory Usage 1,744KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (8)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete