|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
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"; };
|
|
|
|
Joined: Nov 2003
Posts: 156
Member
|
Member
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... 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.
|
|
|
|
Joined: Jan 2000
Posts: 5,834 Likes: 20
UBBDev Owner Time Lord
|
UBBDev Owner Time Lord
Joined: Jan 2000
Posts: 5,834 Likes: 20 |
That is a standard message when you run online.cgi by itself.
|
|
|
|
Joined: Nov 2003
Posts: 156
Member
|
Member
Joined: Nov 2003
Posts: 156 |
Ok, so I replaced the standard "Require" code with eval { do "vars_config.cgi"; }; eval { do "vars_pntf.cgi"; }; ofcourse I get no errors, but it still doesn't work 
|
|
|
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
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.
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
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? 
-GATOR
"Pain is temporary, Pride is forever"
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
it can't find vars_config
|
|
|
|
Joined: Mar 2001
Posts: 7,394
Admin / Code Breaker
|
Admin / Code Breaker
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...
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
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"
|
|
|
|
Joined: Jan 2003
Posts: 3,456 Likes: 2
Master Hacker
|
Master Hacker
Joined: Jan 2003
Posts: 3,456 Likes: 2 |
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.
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
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"
|
|
|
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
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. 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);
|
|
|
|
Joined: Jan 2003
Posts: 118
Member
|
Member
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"
|
|
|
|
Joined: Aug 2000
Posts: 178
Member
|
Member
Joined: Aug 2000
Posts: 178 |
Here are a couple of Status .gifs you are free to use if you like. Enjoy!
|
|
|
|
Joined: Sep 2001
Posts: 672
Member
|
Member
Joined: Sep 2001
Posts: 672 |
|
|
|
|
Joined: Mar 2004
Posts: 58
Member
|
Member
Joined: Mar 2004
Posts: 58 |
very kewl 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?
|
|
|
|
Joined: May 2001
Posts: 1,042 Likes: 7
Moderator
|
Moderator
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
|
|
|
|
Joined: Mar 2004
Posts: 58
Member
|
Member
Joined: Mar 2004
Posts: 58 |
Thanks 
|
|
|
|
Joined: Jan 2007
Posts: 3
Lurker
|
Lurker
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
|
I type Like navaho
Joined: Mar 2000
Posts: 21,079 Likes: 3 |
I'd re-check your changes to the base script files.
|
|
|
|
Joined: Jan 2007
Posts: 3
Lurker
|
Lurker
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
Lurker
|
Lurker
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
|
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  )
|
|
|
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.
|
|
Posts: 808
Joined: July 2001
|
|
Forums63
Topics37,575
Posts293,931
Members13,823
|
Most Online6,139 Sep 21st, 2024
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|