Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
#202811 05/07/2004 1:17 AM
Joined: May 2001
Posts: 1,042
Likes: 7
B
Brett Offline OP
Moderator
OP Offline
Moderator
B
Joined: May 2001
Posts: 1,042
Likes: 7
Whoops, thinking about the wrong hack. okay, replace:
require "vars_config.cgi";

with

eval {
do "vars_config.cgi";
};

Sponsored Links
#202812 05/07/2004 11:02 AM
Joined: Nov 2003
Posts: 156
P
Member
Offline
Member
P
Joined: Nov 2003
Posts: 156
Ok, so I did that, and then I got the Error for the lext line of code, where it looks for vars_pntf. So I went and replaced it also. Now I get this if I try and run online.cgi by itself...

Code
 var AllImgs = document.body.getElementsByTagName("img"); function ChangeAll(img) { for(var i=0;
i <= AllImgs.length; i++) { if(AllImgs[i] && AllImgs[i].id == img) { AllImgs[i].src = '/user_online.gif';
AllImgs[i].alt = 'Online'; AllImgs[i].title = 'Online'; } // end if } // end for }
And the image doesn't change.

#202813 05/07/2004 8:15 PM
Joined: Jan 2000
Posts: 5,813
Likes: 13
UBBDev / UBBWiki Owner
Time Lord
Offline
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,813
Likes: 13
That is a standard message when you run online.cgi by itself.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
#202814 05/07/2004 10:31 PM
Joined: Nov 2003
Posts: 156
P
Member
Offline
Member
P
Joined: Nov 2003
Posts: 156
Ok, so I replaced the standard "Require" code with
Code
 
eval {
do "vars_config.cgi";
};
eval {
do "vars_pntf.cgi";
};
ofcourse I get no errors, but it still doesn't work confused

#202815 05/07/2004 11:33 PM
Joined: May 2001
Posts: 1,042
Likes: 7
B
Brett Offline OP
Moderator
OP Offline
Moderator
B
Joined: May 2001
Posts: 1,042
Likes: 7
online.cgi doesn't log you. You/or another registered user needs to be on the boards. Also, the user must have hide pntf off.

n/m please check your private messages, phillip.

Sponsored Links
#202816 05/09/2004 2:04 PM
Joined: Jan 2003
Posts: 118
G
Member
Offline
Member
G
Joined: Jan 2003
Posts: 118
OK, I just tried to install this one and it semi-appears to work except for the big error I get when I click on a topic. Rehacked 3 times now.

"A Runtime Error has occured. Do you wish to debug?

Line:1
Error: Syntax error"

A picture does show up though and says I am offline.
Help? smile


-GATOR

"Pain is temporary, Pride is forever"
#202817 05/09/2004 2:14 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
I
Master Hacker
Offline
Master Hacker
I
Joined: Jan 2003
Posts: 3,456
Likes: 2
it can't find vars_config

#202818 05/09/2004 2:18 PM
Joined: Mar 2001
Posts: 7,394
L
LK Offline
Admin / Code Breaker
Offline
Admin / Code Breaker
L
Joined: Mar 2001
Posts: 7,394
Al, it's in the JS code, not the Perl code... Also it's not surely line 1, IE's not so accurate when it comes to line numbers...

#202819 05/09/2004 2:26 PM
Joined: Jan 2003
Posts: 118
G
Member
Offline
Member
G
Joined: Jan 2003
Posts: 118
After going back over the thread I had to do what Phillip had to do in online.cgi. Wasn't exactly clear, but I figured it out. Replace

require "vars_config.cgi";
require "$vars_config {VariablesPath}/vars_pntf.cgi";

with

eval {
do "vars_config.cgi";
};
eval {
do "vars_pntf.cgi";
};

What's really interesting is that I replaced images, cleared cache, and it's still showing the old image for me being offline... How is that happening? I searched my entire www root directory for images of the same name and the one I want is the only one there???


-GATOR

"Pain is temporary, Pride is forever"
#202820 05/09/2004 2:33 PM
Joined: Jan 2003
Posts: 3,456
Likes: 2
I
Master Hacker
Offline
Master Hacker
I
Joined: Jan 2003
Posts: 3,456
Likes: 2
Quote
Originally posted by LK:

Al, it's in the JS code, not the Perl code... Also it's not surely line 1, IE's not so accurate when it comes to line numbers...

the javascript is made by the perl, and Firefox gives you great javascript errors.

Sponsored Links
#202821 05/09/2004 4:31 PM
Joined: Jan 2003
Posts: 118
G
Member
Offline
Member
G
Joined: Jan 2003
Posts: 118
Hmm... I still can't get this to change status though. I always see offline also. Had another person register just to test and ask if they see me online which they don't, and I didn't see their online status change either. Any ideas?


-GATOR

"Pain is temporary, Pride is forever"
#202822 05/09/2004 5:49 PM
Joined: May 2001
Posts: 1,042
Likes: 7
B
Brett Offline OP
Moderator
OP Offline
Moderator
B
Joined: May 2001
Posts: 1,042
Likes: 7
Looks like the same thing from Phillip's server. The way i fixed it was, okay do this. Download a fresh copy of the cgi file.

Code
replace:
use CGI ':standard';
use CGI::Carp qw(fatalsToBrowser set_message);

with:
BEGIN {
($0 =~ m!(.*)(\|/)[^/\]+!) && unshift(@INC, $1, "$1$2Modules");
$| = 1;
};
use lib("./Modules", ".");
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

#202823 05/09/2004 8:28 PM
Joined: Jan 2003
Posts: 118
G
Member
Offline
Member
G
Joined: Jan 2003
Posts: 118
Whoo Hoo! It worked! :::does a little dance::: Thanks for your help Brett.


-GATOR

"Pain is temporary, Pride is forever"
#202824 06/20/2004 4:57 PM
Joined: Aug 2000
Posts: 178
P
Member
Offline
Member
P
Joined: Aug 2000
Posts: 178
Here are a couple of Status .gifs you are free to use if you like.

[Linked Image]
[Linked Image]

Enjoy!

#202825 06/22/2004 8:29 AM
Joined: Sep 2001
Posts: 672
H
Member
Offline
Member
H
Joined: Sep 2001
Posts: 672
I'll add to that Painfool wink


[Linked Image]
[Linked Image]

#202826 02/10/2005 10:52 PM
Joined: Mar 2004
Posts: 58
T
Member
Offline
Member
T
Joined: Mar 2004
Posts: 58
very kewl smile

Is it possible to change the location of the offline/online images to show under the avatar or next to where it says " IP: Logged" at the bottom?

#202827 02/11/2005 12:02 PM
Joined: May 2001
Posts: 1,042
Likes: 7
B
Brett Offline OP
Moderator
OP Offline
Moderator
B
Joined: May 2001
Posts: 1,042
Likes: 7
Yes, you could put the image anywhere.
All in /non-cgi/Templates/public_topic_page.pl

If you want it under the avatar:
Replace:
$AvatarBits


with:
$AvatarBits

$OnlineBits


Or next to ip logged, just add the variable $OnlineBits after $ip_wording

#202828 02/11/2005 11:25 PM
Joined: Mar 2004
Posts: 58
T
Member
Offline
Member
T
Joined: Mar 2004
Posts: 58
Thanks thumbsup

Joined: Jan 2007
Posts: 3
W
Lurker
Offline
Lurker
W
Joined: Jan 2007
Posts: 3
I have added this hack to my UBB 6.7.2.
The online status never changes from offline to online.
I do not receive any error messages.
I am certain that the required files are located in the correct directories.

My website is www.termpro.com (Click on Audio Forum).

I really, really want this feature. Any suggestions would be greatly appreciated.

Sincerely,

Wayne Harris

Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
I'd re-check your changes to the base script files.


- Allen wavey
- What Drives You?
Joined: Jan 2007
Posts: 3
W
Lurker
Offline
Lurker
W
Joined: Jan 2007
Posts: 3
When checking my server logs I am receiving an error "502 - Bad Gateway" whenever the online.cgi file is referenced. My server is Win 2003 Enterprise Edition with IIS.

The online.cgi script is as follows ...

#!/usr/bin/perl

# load modules
use strict;

BEGIN {
($0 =~ m!(.*)(\|/)[^/\]+!) && unshift(@INC, $1, "$1$2Modules");
$| = 1;
};
use lib("./Modules", ".");
use UBBCGI qw(:cgi);
use UBBCGI::Carp qw(fatalsToBrowser set_message);

use vars qw(%vars_config %vars_pntf);
require "vars_config.cgi";
require "$vars_config{VariablesPath}/vars_pntf.cgi";

print qq~Content-type: text/html\n\n
var AllImgs = document.body.getElementsByTagName("img");
function ChangeAll(img) {
for(var i=0; i <= AllImgs.length; i++) {
if(AllImgs[i] && AllImgs[i].id == img) {
AllImgs[i].src = '$vars_config{NonCGIURL}/user_online.gif';
AllImgs[i].alt = 'Online';
AllImgs[i].title = 'Online';
} // end if
} // end for
}
~;

if($vars_pntf{Enabled} eq "yes" && -e "$vars_config{CachePath}/pntf/now.cgi") {
do "$vars_config{CachePath}/pntf/now.cgi";
my $load = UBB::PNTF::_load();

foreach my $uniq (keys %{ $load->{uniq}->{logins} }) {
my $user = $load->{uniq}->{logins}->{$uniq}->[0];

# check to see if actual user or if hidden
next if $user eq '' || $load->{uniq}->{logins}->{$uniq}->[2] eq 1;


print qq~ChangeAll('online$user');\n~;
} # end if
} # end if

exit(0);
1;

Joined: Jan 2007
Posts: 3
W
Lurker
Offline
Lurker
W
Joined: Jan 2007
Posts: 3
I am pretty sure that all of the security settings are correct. The requested url in the log file is /cgi-bin/ubb/online.cgi.

This is where all of my cgi scripts are located. This is also where the online.cgi file resides.

The offline graphic is showing up correctly on my pages and the online.cgi script is being called.

Your suggestions are appreciated.

Last edited by Wayne Harris; 01/19/2007 2:07 PM.
Joined: Mar 2000
Posts: 21,079
Likes: 3
I type Like navaho
Offline
I type Like navaho
Joined: Mar 2000
Posts: 21,079
Likes: 3
Did you update the path to perl to match that of your ultimatebb.cgi file? I used to run ubbdev on a windows server for a few years and I believe the path to perl has to be set (usually something like c:\perl\perl.exe - it's been a while shocked )


- Allen wavey
- What Drives You?
Page 2 of 2 1 2

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
AllenAyres
AllenAyres
Texas
Posts: 21,079
Joined: March 2000
Forum Statistics
Forums63
Topics37,555
Posts293,845
Members13,842
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online 320
Topics Created 0
Posts Made 0
Users Online 0
Birthdays 17
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,813
Greg Hard 4,625
Top Posters(30 Days)
Morgan 3
isaac 2
Top Likes Received
isaac 69
Gizmo 13
Brett 7
WebGuy 2
Top Likes Received (30 Days)
isaac 3
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2021 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Snapshot build 20201211)
Responsive Width:

PHP: 5.4.45 Page Time: 0.135s Queries: 62 (0.069s) Memory: 3.4950 MB (Peak: 3.7836 MB) Data Comp: Zlib Server Time: 2021-05-17 17:08:01 UTC
Valid HTML 5 and Valid CSS