Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 03-06-2012, 05:56 PM
lordi lordi is offline
 
Join Date: Dec 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default Help merging 2 codes

Hello

Well, I was looking for ways to add Adsense code in my forum

================================================== ====

1- I got this code for adding ADSENSE in first post of the thread...
POSTBIT ==> Search
<!-- message --> ADD BELOW
Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
       <div class="postbit_adcode">
<span style="float: right; width: 340px; height: 285px;">
			Your Code Goes Here
</span>
</div>
</if>
=============================================

2
BUT I had to find a code that allows me to STOP Adsense ads in some forums and sections

So, I got this code


Code:
<if condition="$post[postcount] == 1">
<if condition="($thread['forumid'] != '56') AND ($thread['forumid'] != '27') AND ($thread['forumid'] != '11')">
<center>
ADSENSE CODE HERE <center/> 
</if></if>

So, How Can I merge the "ADSENSE in FIRST POST" code (1) With the Stopping Code (2) ?
Reply With Quote
  #2  
Old 03-06-2012, 07:30 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The condition you have in #1 will show one after the first post on each page, while I think the condition in #2 will only show one after post#1. So you only need one of those and I'm going with #1. So try this (I've just put one inside the other):

Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<if condition="($thread['forumid'] != '56') AND ($thread['forumid'] != '27') AND ($thread['forumid'] != '11')">
       <div class="postbit_adcode">
<span style="float: right; width: 340px; height: 285px;">
			Your Code Goes Here
</span>
</div>
</if>
</if>
Reply With Quote
Благодарность от:
lordi
  #3  
Old 03-07-2012, 02:33 AM
lordi lordi is offline
 
Join Date: Dec 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks man

May I ask you?

In some forums..I see this ad in the fist post...but sometimes it shows rectangular sometimes square like mine

How do they make it random each time it takes different shape? I know I must put 2 different adsense codes 1 for rectangular ad and 1 for square ad .. but how to make them change ? The Squared ad takes place on the left or right of the thread at first post .. and the rectangular takes place in the middle of the thread
=======================

2- How to put adsense inside Quotes?

thank you
Reply With Quote
  #4  
Old 03-07-2012, 07:00 PM
kh99 kh99 is offline
 
Join Date: Aug 2009
Location: Maine
Posts: 13,185
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm sorry but I don't understand either of your questions. I don't have any real experience with adsense so I don't know about square vs rectange ads. Also I don't know what you mean by putting it in quotes.
Reply With Quote
  #5  
Old 03-07-2012, 09:20 PM
lordi lordi is offline
 
Join Date: Dec 2005
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

There are many shapes of Adsense ADS

Some Forums are using similar code to what u gave me .. but it has a feature that changes the shape of the ADvertisement .. it once show u the AD unit as a Square shaped AD on the first post of the thread ... and some times or if u refresh it might show u the AD in Rectangualar shape

In BRIEF :::

I want to use the code
Code:
<if condition="(($post[postcount] % $vboptions[maxposts] == 1))">
<if condition="($thread['forumid'] != '56') AND ($thread['forumid'] != '27') AND ($thread['forumid'] != '11')">
       <div class="postbit_adcode">
<span style="float: right; width: 340px; height: 285px;">
			Your Code Goes Here
</span>
</div>
</if>
</if>
+ I want to add a code that makes me put 2 ADS shapes .. example: 1- 468*60 and 2- 300*300 , and only one of those two shows and when refreshing the other shape shows ..etc

thank you
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:13 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.08062 seconds
  • Memory Usage 2,204KB
  • Queries Executed 13 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (4)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (5)post_thanks_box
  • (1)post_thanks_box_bit
  • (5)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (5)post_thanks_postbit_info
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete