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)
-   -   Randomly positioned ad in between postbits in showthread (https://vborg.vbsupport.ru/showthread.php?t=98057)

TitanJeff 01-15-2006 03:21 PM

Quote:

Originally Posted by neutek
just want certain usergroups not to be able to see

Me too.

Also, I'm wondering if there is a way to randomize ads for that area if you want to rotate banners along with AdSense.

TitanJeff 01-18-2006 09:02 PM

Bump for the cause.

bloggerMel 01-20-2006 05:30 AM

thanks for the hack, works well :)

Dreamchaser 01-21-2006 08:36 PM

Quote:

Originally Posted by lochie
Does this deffinetly work with 3.5.3? I've installed it and it doesn't appear at al;l no matter which of the 2 postbits I put the code in. I'm having some issues with my skin since upgrading and not sure if this is all connected.

I know it's for 3.5.2 but wasn't sure if it's just not compatible with my version or caused by my other issues.

I am using vb 3.5.3 and this works great with no problem and did anyone find a best way to restrict some user groups in seeing the ads or anyway where every can see the ads ?

Thanks for the wonderful hack!

DC

UK Jimbo 01-25-2006 02:21 AM

Quote:

Originally Posted by TitanJeff
Here's what I added:
<!-- / post #$post[postid] -->
<if condition="is_member_of($bbuserinfo,array(2,5,6,7) )">
<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0">
$spacer_open
<div style="padding:0px 0px $stylevar[cellpadding]px 0px">

My goal is for groups 2,5,6,7 to not see the ads.

Where did I goof? Thanks.

Did you add an other </if> to close the statement?

You're logic would also only show it to users that are in groups 2,5,6,7. If you want to stop them from seeing it I suggest you use the template code listed in my first post with the following change:

instead of

PHP Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0"

use

PHP Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && ! is_member_of($bbuserinfo,array(2,5,6,7))"

This will mean the ad is not shown to groups 2,5,6 and 7.

If you wanted to do the opposite and only show it to groups 2,5,6 and 7 then you should remove the ! like:

PHP Code:

<if condition="$GLOBALS['adsense_position'] == $post['postcount'] && $GLOBALS['adsense_position'] > 0 && is_member_of($bbuserinfo,array(2,5,6,7))"

No other changes to the template will be necessary

UK Jimbo 01-25-2006 02:23 AM

Update: I've changed the tested version info to v3.5.3 as it runs fine in this latest version.

UK Jimbo 01-25-2006 02:25 AM

Quote:

Originally Posted by adobepoint
Is there a way to post the ads on top of the first post?

Have a look back through this thread. The same question was asked a while back and I posted the solution.

You just need to do a template change, no plugin is required.

TitanJeff 01-25-2006 11:26 AM

My thanks for taking the time to further explain. The changes worked perfectly.

UK Jimbo 01-25-2006 04:30 PM

Excellent!

lochie 01-27-2006 09:31 PM

I've installed this on a clean install of vbulletin 3.5.3 using iSkin form extremepixels at www.djstalk.com and it doesn't show up at all. :(


All times are GMT. The time now is 06:42 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.01505 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
  • (3)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (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