vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   More Questions About Conditionals (https://vborg.vbsupport.ru/showthread.php?t=68266)

InsaneContender 08-12-2004 08:54 PM

More Questions About Conditionals
 
I am having some trouble with conditionals. I am trying to display my Google Ads to everyone, except those of certian usergroups.

EG:

So everyone in groups: 1,2,3,5 would see the ad.

While everyone in groups: 4,6, and 7 would not.

What exactly should I put? Since there is no realy simple guide (that I could find) about using the conditionals... I am at a loss! lol.

I can get it to only show for one group, but that is it.

Please help! Much appreciated. :)

Modin 08-13-2004 05:06 PM

Code:

<if condition="$bbuserinfo[usergroupid] != 4 && $bbuserinfo[usergroupid] != 6 && $bbuserinfo[usergroupid] != 7">
Google Ad
</if>

try that :)

Michael Morris 08-15-2004 02:13 PM

Modin, that only checks the user's primary usergroup.

Use the is_member_of function, it's one of the few you can call in a template That function also checks ALL of the users groups, primary and secondary.

HTML Code:

<if condtion="!is_member_of($bbuserinfo, 4) AND !is_member_of($bbuserinfo, 6)">

Ad

</if>


Modin 08-15-2004 02:19 PM

nice tip mate, thanks :)

InsaneContender 08-15-2004 04:03 PM

Alright, that did the trick. Thanks!

13th_Disciple 08-15-2004 05:09 PM

got this from http://www.theadminzone.com - good site for find a bit of info on maybe a few possibilities for forum admins.. Keeps the ad from displaying on certain pages..

HTML Code:

<if condition="THIS_SCRIPT != 'register' AND THIS_SCRIPT != 'search' AND THIS_SCRIPT != 'usercp' AND THIS_SCRIPT != 'sendmessage' AND THIS_SCRIPT != 'profile' AND THIS_SCRIPT != 'private' AND THIS_SCRIPT != 'subscriptions' AND THIS_SCRIPT != 'subscription' AND THIS_SCRIPT != 'member' AND THIS_SCRIPT != 'memberlist' AND THIS_SCRIPT != 'faq'">
Google AdSense Info
</if>


AN-net 08-15-2004 05:40 PM

@disciple
would it not be simpler to put that information into an array and then make a condition?


All times are GMT. The time now is 10:54 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.00949 seconds
  • Memory Usage 1,721KB
  • 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
  • (1)bbcode_code_printable
  • (2)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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