vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Problem with conditionals (https://vborg.vbsupport.ru/showthread.php?t=196981)

dismas 11-23-2008 01:52 AM

Problem with conditionals
 
In my postbit template, I have:
Code:

        <if condition="is_member_of($bbuserinfo, 5,6,7,15)">
              <div>
                  <if condition="$post['field5']">
                      a.k.a.: $post[field5]
                  </if>
              </div>
        </if>

Usergroup 15 is a club member's only usergroup. Basically, when someone joins the club, I add them to a subscription which puts them in 15 as the primary and 2 (Registered Users) as the additional usergroup. I'd like this to be visible to members of 15 but not those who are only in 2.

So do I have to change the way my subscription is set up or the way I have the if condition set up?

Dismounted 11-23-2008 02:49 AM

That conditional will not match those who are only in 2, so you do not have to change it.

dismas 11-23-2008 03:42 AM

But it's not showing up for those who are primarily in 15 and additionally in 2. And that's what I want.

Let me say it another way and maybe it will be more clear.

The way I want it and the way I thought it would work:
Club members with a subscription who are in 15 and 2 - see this field
Regular users who are only in 2 - don't see it

The way it is now:
Club members who are in 15 and 2 - don't see it <-- bad
Regular users who are only in 2 - don't see it <--good

Lynne 11-23-2008 05:05 PM

Can members in group 5,6,7 see it? Is your condition perhaps inside of another condition that members in group 15 don't get to see?

dismas 11-23-2008 11:29 PM

It works for 6 (me) and 7. Just not 15. And it's not inside another condition.

Dismounted 11-24-2008 04:16 AM

If you remove the "$post['field5']" conditional (the second one), does it still not show for the other group?

dismas 11-24-2008 05:08 AM

If I remove that, all group 15 sees is "a.k.a.:" but it doesn't show the value in field5. Group 6 sees both the aka and the value in the field.

This is what I have now:

Code:

        <if condition="is_member_of($bbuserinfo, 5,6,7,15)">
              <div>
               
                      a.k.a.: $post[field5]
                 
              </div>
        </if>


Dismounted 11-24-2008 09:57 AM

That means "field5" is not populated for group 15 - fill in that field for the user.

dismas 11-24-2008 11:27 AM

It is filled in in many user's profiles. It's an optional profile field.

Dismounted 11-25-2008 05:06 AM

Are you sure it is field 5? Because none of the conditionals are wrong - they are working.


All times are GMT. The time now is 11:23 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.02039 seconds
  • Memory Usage 1,724KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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