View Full Version : online.php error.... PLEASE HELP ME lol $5 for peron who fixes it
Xelation
04-11-2003, 11:33 PM
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
Today at 08:45 PM Boofo said this in Post #2 (https://vborg.vbsupport.ru/showthread.php?postid=380850#post380850)
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
$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:
$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
Today at 07:47 PM Xelation said this in Post #5 (https://vborg.vbsupport.ru/showthread.php?postid=380853#post380853)
$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:
$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:
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. ;)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.