vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   What conditional? (https://vborg.vbsupport.ru/showthread.php?t=166425)

Hex_legend 12-30-2007 01:56 AM

What conditional?
 
What conditional do I put for a user not being able to see a link if its something to do with their user account?

I mean, I have iTrader installed and a user can not submit feedback for their own account. I have made a link for all users to leave feedback for everyone, but I don't want them to see the link under their own username.

How do I stop them seeing links like this?

Adam21 12-30-2007 02:06 AM

If you do not want to display to that particular userid,it should be
Code:

<if condition="$bbuserinfo['userid'] != XXX"></if>
Where XXX is the userid you wish to hide that particular info from but display to everyone else.:)

Hex_legend 12-30-2007 02:21 AM

That doesn't really make any sense, because:


PHP Code:

<if condition="$bbuserinfo['userid'] != XXX"></if> 

The XXX would be a usernumber, e.g. 1 (for the first admin account).

But I would want it to show for all users, so it hides it.


So,

User 31 can't see their own 1 but can see others.
User 32 can't see their own 1 but can see others.

Etc..

Adam21 12-30-2007 03:28 AM

Have you tried it?

Hex_legend 12-30-2007 03:36 AM

No, but I'm presuming that XXX would be 1 (for my user)

But I don't see how that would affect other users (that aren't user ID 1)

Opserty 12-30-2007 10:29 AM

$bbuserinfo['userid'] is the userid of the person current browsing the site. You need to find another variable to compare this this two. (You may find a clue by looking at the template/phrase used to generate the link). Since this is custom script you'll have to find that variable yourself, I'll call it $yourvar for now.

Then in your template you would have:
Code:

<if condition="$bbuserinfo['userid'] != $yourvar['userid']">
    DISPLAY LINK
</if>


COBRAws 01-03-2008 04:33 PM

does anyone know the conditional info for timezones?

Code:

<if condition="$bbuserinfo['timezone'] != -0700"></if>
or something


All times are GMT. The time now is 08:56 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.01504 seconds
  • Memory Usage 1,720KB
  • 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
  • (3)bbcode_code_printable
  • (1)bbcode_php_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