vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   online.php error.... PLEASE HELP ME lol $5 for peron who fixes it (https://vborg.vbsupport.ru/showthread.php?t=51499)

Xelation 04-11-2003 11:33 PM

online.php error.... PLEASE HELP ME lol $5 for peron who fixes it
 
Fatal error: Call to a member function on a non-object in /home/texeoco/public_html/web/online.php on line 129

I have no clue whats wrong... First one to get it fixed for me will get $5... Just reply saying you'll do it and I'll send you the online.php file.

Boofo 04-11-2003 11:51 PM

Forget the 5 dollars. What is on line 129?

filburt1 04-11-2003 11:51 PM

You are not allowed to send vB files to anybody. However the problem is, I guarantee you, that you wrote a function that uses $DB_site and haven't made it global.

filburt1 04-11-2003 11:51 PM

Quote:

Today at 08:45 PM Boofo said this in Post #2
Forget the 5 dollars. What is on line 129?

Well you can forget it, the rest of us will remain interested :p

Xelation 04-11-2003 11:53 PM

PHP Code:


      $userinfo
[where] = "Retrieving Password";
      break;
    case 
'getinfo':
      
$userid explode('userid='$userinfo[location]);
      
$user   $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
      
        if (
$user[username]) {
          
$userinfo[where] = "Viewing Profile of <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";
        } else {
          
$userinfo[where] = "Viewing Profile of a Forum Member";
        } 

this is line 129:

PHP Code:

    $user   $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1])); 


Boofo 04-11-2003 11:53 PM

I guess I must be one of the few who aren't in it for the money then, huh?

Boofo 04-11-2003 11:56 PM

Quote:

Today at 07:47 PM Xelation said this in Post #5
PHP Code:


      $userinfo
[where] = "Retrieving Password";
      break;
    case 
'getinfo':
      
$userid explode('userid='$userinfo[location]);
      
$user   $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1]));
      
        if (
$user[username]) {
          
$userinfo[where] = "Viewing Profile of <a href=\"member.php?s=$session[sessionhash]&action=getinfo&userid=$user[userid]\">$user[username]</a>";
        } else {
          
$userinfo[where] = "Viewing Profile of a Forum Member";
        } 

this is line 129:

PHP Code:

    $user   $DB_site->query_first("SELECT username FROM user WHERE userid = ".intval($userid[1])); 


Like filburt said, just add the $DB_site to the global line somewhere above that code.

Xelation 04-11-2003 11:58 PM

do you mean like right here? im not sure how to do it, im an html person myself, not very good at php at all... I can add hacks thats it lol

// initialize everything
$postids = '';
$threadids = '';
$forumids = '';
$eventids = '';
$onlinebits = '';
$mod = array();
$userinfo = array();
$guests = array();
$post = array();
$thread = array();
$forum = array();
$gotforum = array();
$event = array();

Xelation 04-11-2003 11:59 PM

or is it this?

<?php

error_reporting(7);
$templatesused = 'whosonline,whosonlinebit,postbit_useremail,postbi t_sendpm,postbit_profile,whoso nline_ip,whosonline_pm,whosonline_email';
$templatesused .= ',whosonlinebit_ip,whosonlinebit_pm,whosonlinebit_ email,whosonline_legend';

require('./global.php');

Boofo 04-12-2003 12:02 AM

Add it in this line:

PHP Code:

  global $thread$post$forum$event$gotforum$hideprivateforums$bbuserinfo$timeformat$displayemails$enablepms$bbtitle$usergroupdef


Xelation 04-12-2003 12:06 AM

THX SO MUCH! :) worked :)

Boofo 04-12-2003 12:10 AM

Of course it did. ;) Just make sure that in the future, if you write something like this again, to enter the $DB_site in the global statement above it. ;)


All times are GMT. The time now is 02:05 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.01730 seconds
  • Memory Usage 1,755KB
  • 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
  • (12)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