Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
call to undefined function, why? Details »»
call to undefined function, why?
Version: , by sabret00the sabret00the is offline
Developer Last Online: Apr 2010 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 11-28-2003 Last Update: Never Installs: 0
 
No support by the author.

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")]) { 

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 11-28-2003, 02:33 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #3  
Old 11-28-2003, 02:36 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
  } elseif (in_array($bbuserinfo['usergroupid'], array(25712))) { 
Reply With Quote
  #4  
Old 11-28-2003, 02:37 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NTLDR
PHP Code:
  } elseif (in_array($bbuserinfo[usergroupid], array(25712))) { 
You beat me too it
Reply With Quote
  #5  
Old 11-28-2003, 03:52 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

refreshed the page, works fine now

stupid cache
Reply With Quote
  #6  
Old 11-28-2003, 04:03 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How comes the ' ' marks around the usergroupid dissapeared when it was quoted? hmm
Reply With Quote
  #7  
Old 11-28-2003, 04:05 PM
assassingod's Avatar
assassingod assassingod is offline
 
Join Date: Jul 2002
Posts: 3,337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by MindTrix
How comes the ' ' marks around the usergroupid dissapeared when it was quoted? hmm
Good point
Reply With Quote
  #8  
Old 11-28-2003, 04:07 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

BUG ALERT BUG ALERT!!! lol, go post it assassingod
Reply With Quote
  #9  
Old 11-28-2003, 04:37 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

lol, thanks alot everyone, you really helped me, it's working perfectly now, special thanks to NTLDR
Reply With Quote
  #10  
Old 12-13-2003, 03:51 PM
MindTrix's Avatar
MindTrix MindTrix is offline
 
Join Date: Apr 2002
Location: United Kingdom
Posts: 1,833
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just a quick note on an old thread

else if is the same as elseif
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:59 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.04382 seconds
  • Memory Usage 2,303KB
  • Queries Executed 23 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete