vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   If Condition=$Post? (https://vborg.vbsupport.ru/showthread.php?t=314949)

Daniel 10-17-2014 10:56 PM

If Condition=$Post?
 
Hi all,

I made a profile field (radio) that lets a user choose whether or not his profile is "Public" (seen by all members) or "Private" (only those with the link can see it).

I understand I'll have to find each instance of a link to someone's profile page and wrap something like this code around it:

<vb:if condition="$post['field15'] != 'Private'">display link</vb:if>

I tried this out in postbit_legacy and it works only if the person viewing the thread is the thread starter. I'm looking for a way to change that so that each time a post comes up & the post creator has his profile field marked as "Private" the link his profile will not be shown. It may just be a matter of switching "$post" with something different.

Grateful for the help!

Zachery 10-18-2014 01:15 PM

Radio buttons are stored as a bitfield. 1 2 4 8 16 32, etc.

kh99 10-18-2014 02:13 PM

In the profile field, check to make sure "Private Field" is set to No. If it's a private field, then the value won't be available when someone else is viewing the information.

Quote:

Originally Posted by Zachery (Post 2519259)
Radio buttons are stored as a bitfield. 1 2 4 8 16 32, etc.

You're thinking of checkboxes.


All times are GMT. The time now is 10:26 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.01020 seconds
  • Memory Usage 1,710KB
  • 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_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (3)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