vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Make your adsense look like a post! With Referals, forum exclusion and more! (https://vborg.vbsupport.ru/showthread.php?t=122010)

icemanic 07-26-2006 02:06 AM

if i stick a number like

<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == 5) AND (!in_array($forum[forumid], array(2,3,32)))">

will it show the ads after every 5 posts?? if not, how do i make it do that? repetetive

icemanic 07-26-2006 02:41 AM

i have lots of forum areas, is there a way to do this so i can only show it to one forum area without listing all the other forum ids in the array?

question? 07-26-2006 06:21 AM

Quote:

Originally Posted by icemanic
i have lots of forum areas, is there a way to do this so i can only show it to one forum area without listing all the other forum ids in the array?

Yeh.

Code:

<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == 5) AND (in_array($forum[forumid] == forumid))">
Quote:

Originally Posted by icemanic
if i stick a number like

<if condition="THIS_SCRIPT == 'showthread'AND ($post[postid] == 5) AND (!in_array($forum[forumid], array(2,3,32)))">

will it show the ads after every 5 posts?? if not, how do i make it do that? repetetive

How many posts do you show per page? You would have to put it manually as an array like the forum id, without the !.

Remember google only allow 3 ads, so you might as well do it manually.

icemanic 07-26-2006 06:29 AM

PHP Code:

AND ($post[postcount] % == 0

using this code will do what i want, show the ads after every 4 posts
, which should not be used for adsense , i might add because of TOS i believe

question? 07-26-2006 06:32 AM

Quote:

Originally Posted by icemanic
PHP Code:

AND ($post[postcount] % == 0

using this code will do what i want, show the ads after every 4 posts
, which should not be used for adsense , i might add because of TOS i believe

You can use it, as long as theres not more than 3 ads per page.

GrendelKhan{TSU 07-26-2006 07:40 AM

Quote:

Originally Posted by question?
How would it violate google's TOS?

actually it USED to (related to dynamically created pages). but Google has softened their policies...seems fine now:

Google Ad Placement
  • Up to three ad units may be displayed on each Web site page.
  • A maximum of two Google AdSense for search boxes may be placed on a page.
  • A single link unit may be placed on each Web site page, in addition to the ad units and search boxes specified above. Link units are considered to be 'Google ads' for purposes of these program policies.
  • A single referral button per product may be placed on a page up to a maximum of 4 buttons, in addition to the ad units, search boxes, and link units specified above. Referral buttons are considered to be ?Google ads? for purposes of these program policies.
  • No Google ad may be placed on any non-content-based pages.
  • No Google ad or Google search box may be displayed on any domain parking websites, pop-ups, pop-unders, or in any email.
  • No Google ad may be placed on pages published specifically for the purpose of showing ads, whether or not the page content is relevant.
  • Elements on a page must not obscure any portion of the ads, and the ad colors must be such that any ad elements, including text and URL, are visible.
  • Clicks on Google ads must not result in a new browser window being launched.

Dumi 07-26-2006 08:11 AM

Is there anyway to have this code show like ever 3rd post or something like that. Awesome code, this has been the only adsense code ive gotten to work.

Nick

Thomas P 07-26-2006 08:51 AM

@Dumi: add this to the line beginning with <if condition="THIS_SCRIPT == 'showthread' :

AND ($post[postcount] % 3 == 0)

@question?:
I think I got it, all users who don't see the adcode have to delete their cookies once, after that the adcode shows up.

/edit: I guess I'm going for this option here: http://www.vbulletin.com/forum/showp...82&postcount=3

question? 07-28-2006 11:34 AM

Quote:

Originally Posted by Thomas P
@Dumi: add this to the line beginning with <if condition="THIS_SCRIPT == 'showthread' :

AND ($post[postcount] % 3 == 0)

@question?:
I think I got it, all users who don't see the adcode have to delete their cookies once, after that the adcode shows up.

/edit: I guess I'm going for this option here: http://www.vbulletin.com/forum/showp...82&postcount=3

Why do all the users have to delete their cookies?

ldma 07-31-2006 03:46 AM

How can I get it to show ads after the first post on every page of my thread, not just the first page like at present?


All times are GMT. The time now is 02:57 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.01076 seconds
  • Memory Usage 1,750KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_php_printable
  • (5)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