vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   call to undefined function, why? (https://vborg.vbsupport.ru/showthread.php?t=58869)

sabret00the 11-28-2003 01:11 PM

call to undefined function, why?
 
ok this has baffled me, i was suggested using this method to get it to pick between user groups, only problem is, is that it doesn't seem to know the array, i thought the user group array would've been defined in the global, how else can i go about getting it to work?
PHP Code:

  if ($confessionid!='') {
   
$clause="WHERE confessionid = $confessionid ";
   
$num=0;
   
$limit='LIMIT 1';
    if (
$bbuserinfo[usergroupid] == 6) {
     eval(
"\$adminoptions = \"".gettemplate("confession_adminoptions",1,0)."\";");
     eval(
"\$report = \"".gettemplate("confession_report",1,0)."\";");
     eval(
"\$rate = \"".gettemplate("confession_rate",1,0)."\";");
    } else if(
$bbuserinfo[usergroupid("2","5","7","12")]) {
     eval(
"\$report = \"".gettemplate("confession_report",1,0)."\";");
     eval(
"\$rate = \"".gettemplate("confession_rate",1,0)."\";");
    } else {
     eval(
"\$report = \"".gettemplate("confession_report",1,0)."\";");
    }
  } 


ps. this is the line that seems to be messing everything up
PHP Code:

 } else if($bbuserinfo[usergroupid("2","5","7","12")]) { 


assassingod 11-28-2003 02:33 PM

Try using elseif rather than else if.
Also, I don't believe that
PHP Code:

$bbuserinfo[usergroupid("2","5","7","12")] 

will work unless you use an array properly

NTLDR 11-28-2003 02:36 PM

PHP Code:

  } elseif (in_array($bbuserinfo['usergroupid'], array(25712))) { 


assassingod 11-28-2003 02:37 PM

Quote:

Originally Posted by NTLDR
PHP Code:

  } elseif (in_array($bbuserinfo[usergroupid], array(25712))) { 


You beat me too it:(;)

sabret00the 11-28-2003 03:52 PM

refreshed the page, works fine now :)

stupid cache :)

MindTrix 11-28-2003 04:03 PM

How comes the ' ' marks around the usergroupid dissapeared when it was quoted? hmm

assassingod 11-28-2003 04:05 PM

Quote:

Originally Posted by MindTrix
How comes the ' ' marks around the usergroupid dissapeared when it was quoted? hmm

Good point

MindTrix 11-28-2003 04:07 PM

BUG ALERT BUG ALERT!!! lol, go post it assassingod :p

sabret00the 11-28-2003 04:37 PM

lol, thanks alot everyone, you really helped me, it's working perfectly now, special thanks to NTLDR :)

MindTrix 12-13-2003 03:51 PM

Just a quick note on an old thread :)

else if is the same as elseif


All times are GMT. The time now is 04:43 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.01144 seconds
  • Memory Usage 1,743KB
  • 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
  • (5)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete