vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=246)
-   -   Mini Mods - A Neater Google Adsense After First Post (https://vborg.vbsupport.ru/showthread.php?t=241944)

Xencored 06-02-2010 07:48 PM

Quote:

Originally Posted by strudinox (Post 2047172)
Any way to exclude a certain group? A have a certain usergroup that does not view ads. I'd use this for sure if it's possible. :)

Code:

<vb:if condition="is_member_of($bbuserinfo,1,2,3,4,5,6) AND $post['isfirstshown']" >
<li class="firstpost_advert_container"><div class="firstpost_advert">
      REPLACE THIS WITH YOUR ADSENSE CODE HERE
</div>
</li>
</vb:if>

1,2,3,4,5,6 = usergroups you want to see the AD

kavehch 06-02-2010 09:13 PM

hi

a want google ads add after first post and 5 10 15 20 and ...... post what this ?

thanks

AURFSCAN 06-02-2010 11:08 PM

thx jaycob, I'll use your code (modded a bit) to display random linkable banners


Add multiple Images (banners) with links corresponding to Image and display them randomly after first post on every page


Code:


<vb:if condition="is_member_of($bbuserinfo,6,7) AND $post[postcount] % $vboptions[maxposts] == 1" >
<li class="firstpost_advert_container"><div class="firstpost_advert">

<script language="JavaScript">

<!--

//store the quotations in arrays

images = new Array(3);

images[0] = "<a href = 'http://www.link.php'><img src='/images/adred.jpg' alt='adred' ></a>";

images[1] = "<a href = 'http://www.link.php'><img src='/images/adblue.jpg' alt='adblue'></a>";

images[2] = "<a href = 'http://www.link.php'><img src='/images/adgreen.jpg' alt='adgreen'></a>";


index = Math.floor(Math.random() * images.length);

document.write(images[index]);

//done

// -->

</script>


</div>
</li>
</vb:if>


red - usergroups you want to show
green - image/banner link
blue - location of Image

add more arrays for more Images

AURFSCAN 06-03-2010 12:28 AM

geez, after looking around here for conditionals theres a million of these ad placement threads.
have to say yours is the neatest jaycob due to the css thx :)

and sorry also for going nuts with the code in your thread

kavehch 06-03-2010 10:40 PM

hi

a want google ads add after first post and 5 10 15 20 and ...... post what this ?

thanks

rmani84 07-23-2010 07:32 PM

perfect ... exactly what i was looking for ... Thanks a ton

Numenorean7 07-26-2010 09:16 PM

This mod owns! :)

dzinerfusion 07-29-2010 03:01 AM

Hi, would there be a way to exclude this ad for certain boards?

ShawneyJ 08-02-2010 10:27 AM

thanks guys, works for vB Version: 4.0.5.

Seb@ 08-05-2010 09:07 PM

thanks


All times are GMT. The time now is 06:53 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.01192 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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