vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   conditionals help (exclude certain forums) (https://vborg.vbsupport.ru/showthread.php?t=232723)

GTX2 01-10-2010 05:27 PM

conditionals help (exclude certain forums)
 
Hi All !


I've been advised by google to remove adsense ads from my adult forum sections (i just just a couple, forum is technology related).

Could you please help me out correcting this codes?


This code stand alone works fine to exclude certain forums
Code:

<if condition="!in_array($forumid, array(472,417,474,475,473,476))">
adsense here
</if>


How about this conditionals, how to add the above code to exclude the same forums?
Code:

<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND $bbuserinfo['usergroupid'] == '1, 3' AND (!$show[member])">

And for last, how to add the exclude conditionals here also:
Code:

<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND ($show[member])">


Thank you

Lynne 01-10-2010 06:09 PM

I'm not sure what you are asking. You should be able to add the condition from your first code block into the conditions in the other two code boxes. Is it not working?

GTX2 01-10-2010 10:53 PM

First sorry if i'm not explaining OK, english is my second language.

No, they are not working. They are not excluding ads from those forumsID.
But maybe i'm doing something wrong and not putting the conditional code in the right way.

I've tried in different ways:


Code:

<if condition="!in_array($forumid, array(472,417,474,475,473,476))">
<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND $bbuserinfo['usergroupid'] == '1, 3' AND (!$show[member])">
adsense code here
</if>
</if>

and

Code:

<if condition="THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND $bbuserinfo['usergroupid'] == '1, 3' AND (!$show[member]) AND !$foruminfo['forumid'] == '472, 417, 474, 475, 473, 476'">
adsense code here
</if>


I'm trying also to make this work with vb ad management mod here: https://vborg.vbsupport.ru/showthrea...39#post1952139

Code:

<if condition="$forum['forumid'] != '472 , 417 , 474 , 475 , 473, 476'">
<div align="left">$template_hook[navbar_below]</div>
</if>


nothing from this is excluding ads from those forumID ...

Lynne 01-11-2010 03:27 AM

I'm not sure why the first code box doesn't work as it looks like it should. But, you can try this which combines the two:
HTML Code:

<if condition="!in_array($forumid, array(472,417,474,475,473,476)) AND (THIS_SCRIPT == 'showthread' AND !$GLOBALS['FIRSTPOSTID'] AND $bbuserinfo['usergroupid'] == '1, 3' AND (!$show[member]))">
adsense code here
</if>

You may want to try $threadinfo['forumid'] instead of $forumid if it still isn't working.

MuhammadC 03-30-2010 06:09 PM

I would do it with custom forum styles... and just remove the adsense tag from those styles.

struff 12-15-2011 04:55 AM

Quote:

Originally Posted by MuhammadC (Post 2013004)
I would do it with custom forum styles... and just remove the adsense tag from those styles.

Just stumbled upon this. Has this worked for people? Think this would work in vB4 too?

I don't have much experience in custom styles. In theory I should just be able to pick the style I want to use, search the templates for "adsense", and remove those instances, right?

Thanks.


All times are GMT. The time now is 07:07 AM.

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.01286 seconds
  • Memory Usage 1,727KB
  • 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
  • (6)bbcode_code_printable
  • (1)bbcode_html_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete