vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Show Thread Enhancements - Google Adsense after first post (or other advertisements) (https://vborg.vbsupport.ru/showthread.php?t=231857)

utahraves 01-16-2010 05:41 PM

I like mine to display every 5 posts... so I use this line. :)

Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND (($post[postcount] % 5) == 0)">

barcena 01-17-2010 03:48 AM

How can I do so it will display on every page of every thread?

Right now is only showing on the first page of a given thread.

Bear w/ me since i'm not coder.

Thanks.

djbaxter 01-20-2010 02:30 PM

Your code:

PHP Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
  <
div class="attachments">
        <
div style="width: 100%; text-align: center">
       
Your text here
      
</div>
</
div>
</
vb:if> 

places the ad ONLY after Post#1.

How to modify it so that if the thread spans multiple pages the ad appears after the first post on each page?

ninjashoes 01-20-2010 04:18 PM

I know theres an if conditional to get this to appear in the subforums you want. I just don't know exactly what I need to put in there.

I need one of the smart coders on here to give me what I need for this to work. This is just the first part. It worked before version 4.0

Code:

<vb:if condition="$foruminfo['forumid'] == 9 OR $foruminfo['forumid'] == 20 OR $foruminfo['forumid'] == 11 OR $foruminfo['forumid'] == 21 OR $foruminfo['forumid'] == 48 OR THIS_SCRIPT == 'newthread' OR THIS_SCRIPT == 'editpost' OR THIS_SCRIPT == 'register' OR THIS_SCRIPT == 'search' OR THIS_SCRIPT == 'usercp' OR THIS_SCRIPT == 'inlinemod' OR THIS_SCRIPT == 'member' OR THIS_SCRIPT == 'online' OR THIS_SCRIPT == 'newreply' OR THIS_SCRIPT == 'login' OR THIS_SCRIPT == 'private'">

nomoreturn 01-24-2010 01:49 PM

installed but gor this error
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected '[' in /home/****/public_html/includes/adminfunctions_template.php(4597) : eval()'d code on line 12

993ti 01-26-2010 03:07 PM

Quote:

Originally Posted by djbaxter (Post 1961248)
Your code:

PHP Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
  <
div class="attachments">
        <
div style="width: 100%; text-align: center">
       
Your text here
      
</div>
</
div>
</
vb:if> 

places the ad ONLY after Post#1.

How to modify it so that if the thread spans multiple pages the ad appears after the first post on each page?

Instead of
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
Use
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !$GLOBALS['FIRSTPOSTID']">
Works for me :)

djbaxter 01-26-2010 03:22 PM

Quote:

Originally Posted by 993ti (Post 1967132)
Instead of
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
Use
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !$GLOBALS['FIRSTPOSTID']">
Works for me :)

That's perfect. Thank you!

haluk 01-27-2010 06:37 AM

Quote:

Originally Posted by 993ti (Post 1967132)
Instead of
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND ($post[postcount] == '1')">
Use
Code:

<vb:if condition="(THIS_SCRIPT == showthread) AND !$GLOBALS['FIRSTPOSTID']">
Works for me :)

Thank you. But how can I add ads after second or third (or fourth) post on every page?

RedHacker 01-27-2010 07:51 PM

Dont show anything and if put second method show ads inside first post...

RedHacker 01-28-2010 05:36 PM

I have 16:9 1920*1080....


All times are GMT. The time now is 02:23 PM.

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.01116 seconds
  • Memory Usage 1,749KB
  • 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
  • (8)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete