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-25-2008 07:57 AM

Quote:

Originally Posted by Dismounted (Post 1672504)
Are you sure it is field 5?


Certain.

dismas 12-17-2008 09:03 AM

So, I'm still trying to figure out why this doesn't work...

I want this profile field to show in the postbit to those who are a member of both usergroups 2 and 15. No matter what group the poster is in.

Now I'm trying variations on a theme. I tried doing this but I don't know if it's even possible:

Code:

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

It doesn't return any errors when I save it but it also does not show the profile field to those members. Can an "AND" be used in this fashion?

Dismounted 12-17-2008 10:02 AM

Code:

<if condition="is_member_of($bbuserinfo, 2) AND is_member_of($bbuserinfo, 15)">
Is the same as:
Code:

<if condition="is_member_of($bbuserinfo, 2, 15)">
(Note this only applies in this case, and does not apply to every function.)

SEOvB 12-17-2008 01:23 PM

Have you tried

Code:

<if condition="(is_member_of($bbuserinfo, 2,15)) AND ($post[field5]) ">
a.k.a.: $post[field5]
</if>


Lynne 12-17-2008 02:10 PM

Quote:

Originally Posted by Dismounted (Post 1687268)
Code:

<if condition="is_member_of($bbuserinfo, 2) AND is_member_of($bbuserinfo, 15)">
Is the same as:
Code:

<if condition="is_member_of($bbuserinfo, 2, 15)">
(Note this only applies in this case, and does not apply to every function.)

I thought this:
Code:

<if condition="is_member_of($bbuserinfo, 2, 15)">
Is the same as this:
Code:

<if condition="is_member_of($bbuserinfo, 2) OR is_member_of($bbuserinfo, 15)">
At least, that is the way I've always used it. :confused:

Dismounted 12-18-2008 10:20 AM

My bad, Lynne. Late at night and not enough coffee. :)

I stand corrected.

dismas 12-19-2008 04:05 PM

Quote:

Originally Posted by FRDS (Post 1687332)
Have you tried

Code:

<if condition="(is_member_of($bbuserinfo, 2,15)) AND ($post[field5]) ">
a.k.a.: $post[field5]
</if>


As I understand it, that would mean that anyone who had filled out field 5 and was a member of UG #2 would see this. Which would mean that any regular user who filled out field 5 would be able to see everyone's field 5 entry. Right?

SEOvB 12-19-2008 04:09 PM

Quote:

Originally Posted by dismas (Post 1688862)
As I understand it, that would mean that anyone who had filled out field 5 and was a member of UG #2 would see this. Which would mean that any regular user who filled out field 5 would be able to see everyone's field 5 entry. Right?

It reads, if you are in usergroup 2 or 15, and the user has field 5 entered, it will show it to you.

If you aren't in usergroup 2 or 15 and the user has it entered, it wont show it to you

If you are in usergroup 2 or 15 and the user doesn't have field 5 entered, it shows nothing


So you probably just want the usergroup ID of 15 there (and not 2), and the field5

dismas 12-19-2008 04:33 PM

Quote:

Originally Posted by FRDS (Post 1688867)
It reads, if you are in usergroup 2 or 15, and the user has field 5 entered, it will show it to you.

My club members have 15 as primary and 2 as additional. It does not show for them. Is there a way to change that "or" to "and"?

Dismounted 12-20-2008 02:57 AM

Code:

<if condition="is_member_of($bbuserinfo, 2) AND is_member_of($bbuserinfo, 15) AND $post['field5'] ">
a.k.a.: $post[field5]
</if>



All times are GMT. The time now is 03:15 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.01846 seconds
  • Memory Usage 1,738KB
  • 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
  • (10)bbcode_code_printable
  • (5)bbcode_quote_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