vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   What is wrong with this? (https://vborg.vbsupport.ru/showthread.php?t=63129)

Scrub 03-29-2004 01:22 PM

What is wrong with this?
 
I've tried several diff ways to get this to work, but no luck with any. :ermm:

PHP Code:

if ($userinfo['usergroupid'] == && && && && 9)
{
    
$show['link'] = false;
}
else
{
    
$show['link'] = true;



assassingod 03-29-2004 01:27 PM

PHP Code:

if (in_array($bbuserinfo['usergroupid'], 1,3,4,8,9)
{
$show['link'] = false;
}
else
{
$show['link'] = true;


That'll do it:)

Scrub 03-29-2004 01:37 PM

Parse error: parse error, unexpected '{' in ***** on line 487

On line 487 is the { below the if in the code you posted. :(

Dean C 03-29-2004 02:08 PM

Steve just forgot a trailing bracket and to actualy have an array ;) :)

Use this it's more efficient:

PHP Code:

if (in_array($bbuserinfo['usergroupid'], array(1,3,4,8,9)))
{
$show['link'] = false;
}
else
{
$show['link'] = true;



filburt1 03-29-2004 02:11 PM

If you are using vB3, always prefer is_member_of() over a check of the usergroupid key. This will, among other things, take additional usergroups into effect (not just the primary usergroup).

assassingod 03-29-2004 02:58 PM

Quote:

Originally Posted by Dean C
Steve just forgot a trailing bracket and to actualy have an array

Whoops:)

Scrub 03-29-2004 03:34 PM

Thanks guys! :D

Filburt1, where would that go? Kind of a newbie in vB3 code :speechless:

Gary King 03-29-2004 07:48 PM

Quote:

Originally Posted by Scrub
Thanks guys! :D

Filburt1, where would that go? Kind of a newbie in vB3 code :speechless:

PHP Code:

if (is_member_of($bbuserinfo13489));
{
    
// etc.



Scrub 03-29-2004 09:26 PM

Thank you! :D

Scrub 03-31-2004 11:41 PM

Instead of making another thread, I'll post in this one. :D. Anyways, I am stuck yet again and on something that I thought would've been easy to do. :x.

Anyways, I am trying to achive something like member.php does, but no luck in making it work. I've scanned countless files trying almsot everything. LOL. But I need to show a username according to the userid, hence like the member.php file. Thanks in advanced. :)


All times are GMT. The time now is 10:00 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,745KB
  • 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
  • (4)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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