vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   User Profile Conditionals (https://vborg.vbsupport.ru/showthread.php?t=256284)

David Regimbal 01-01-2011 12:54 AM

User Profile Conditionals
 
Hey everyone,

I was wondering if it was possible to have it so that if you were the owner of the profile to which you were viewing that you didn't see "Send A Message," and other options such as that?

Lynne 01-01-2011 04:42 PM

Put a condition around it like <vb:if condtion="$bbuserinfo['userid'] != $userinfo['userid']">show code</vb:if> (I'm not sure if $userinfo is the correct variable, you will need to look in the template in order to see what it is.)

David Regimbal 01-02-2011 12:26 AM

Hi Lynne,

I have tried that though for some reason that was not working, I most likely had the two mixed up in the tag. However, I came across this variable: "<vb:elseif condition="$prepared['myprofile']" />"

I'm assuming that this would also work "<vb:if condition="$prepared['myprofile']" >"
Wrapped in that would only allow the profile owner to see it. Though I shouldn't get my hopes up since I have not tried it out yet. I will try what you have suggested again, though using your code.

Lynne 01-02-2011 02:54 AM

Yes, you are probably right. There are a couple of variables that work on that page in different hook locations. I can never remember which.


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