The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
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?
|
#3
|
|||
|
|||
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> 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 ... |
#4
|
||||
|
||||
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> |
#5
|
|||
|
|||
I would do it with custom forum styles... and just remove the adsense tag from those styles.
|
#6
|
|||
|
|||
Quote:
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. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|