vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   If conditional for when it's not current user?? (https://vborg.vbsupport.ru/showthread.php?t=159307)

chickadee 10-02-2007 03:23 PM

If conditional for when it's not current user??
 
Is there a condition that says <if not current user, display this?

Hope that makes sense....

Opserty 10-02-2007 03:30 PM

Are you comparing it to a set variable or something?

(For userids:)
Code:

<if condition="$bbuserinfo['userid'] == 1">
    CURRENT USER VIEWING PAGE HAS USERID OF 1
</if>


chickadee 10-02-2007 03:38 PM

No not quite,

I think this means current user: <if condition="$bbuserinfo[userid] == $userinfo[userid]">
So I guess I'm looking for the opposite, I want to show an 'add to buddylist' link on memberinfo show to everyone who is not that user.

efc9 10-02-2007 09:21 PM

If you want to do it in the memberinfo template, then you can just use:
Code:

<if condition="$show['addbuddylist']">
that'll show to anyone who can add the person as a buddy.

now for it to show to anyone, you can use:
Code:

<if condition="$bbuserinfo[userid] != $userinfo[userid]">
or
Code:

<if condition="$bbuserinfo[userid] <> $userinfo[userid]">
but that'll also show the add buddy link to users that person has ignored, who will get an error when they try to add to the person to their buddylist.

chickadee 10-03-2007 07:15 AM

Thanks, I'll see if I can play around with that!

WhaLberg 10-03-2007 10:17 AM

Quote:

Originally Posted by chickadee (Post 1351545)
No not quite,

I think this means current user: <if condition="$bbuserinfo[userid] == $userinfo[userid]">
So I guess I'm looking for the opposite, I want to show an 'add to buddylist' link on memberinfo show to everyone who is not that user.

Don't you have "Add x to Your Buddy List" in member profiles? That's a vBulletin default.

chickadee 10-04-2007 11:40 AM

Quite possibly, but I've changed my memberinfo template to beyond recognition.

I also have other uses for this sort of code.

Quote:

Originally Posted by WhaLberg (Post 1352060)
Don't you have "Add x to Your Buddy List" in member profiles? That's a vBulletin default.

--------------- Added at 15:28 ---------------

Quote:

Originally Posted by efc9 (Post 1351733)
If you want to do it in the memberinfo template, then you can just use:
Code:

<if condition="$show['addbuddylist']">
that'll show to anyone who can add the person as a buddy.

now for it to show to anyone, you can use:
Code:

<if condition="$bbuserinfo[userid] != $userinfo[userid]">
or
Code:

<if condition="$bbuserinfo[userid] <> $userinfo[userid]">
but that'll also show the add buddy link to users that person has ignored, who will get an error when they try to add to the person to their buddylist.

This works perfectly, thanks!


All times are GMT. The time now is 05:46 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.01734 seconds
  • Memory Usage 1,725KB
  • 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
  • (7)bbcode_code_printable
  • (3)bbcode_quote_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