UBB.Dev
Posted By: vent WhosOnline on the topic page - 01/14/2002 1:00 PM
this is Gamer's hack "WhosOnline addon" for 6.0, it displays the member's stat "online" or "offline" on the topic page, I try to edit it for 6.1, but there are still some qustuin, I need you help....

online icon
[Linked Image]

offline icon
[Linked Image]

#######################################################
# onlineaddon.txt Version 1.1 #
# addon for Who is Online Version 4.0 #
# #
# Show's in every posting if the user is online #
# #
#######################################################


###################
#Begin of the Hack#
###################


##############################
# open public_topic_page.pl #
##############################

#########
# find #
#########

$show_public_name


#############################
# add this under #
#############################


$show_user_online


#############################
# open ubb_lib_posting.cgi #
#############################

#########
# find #
#########

# more pages in topic to create?
#if ($ContinueAt ne '') {
# &create_topic("$in{f}", "$topic_number", "$ContinueAt", "$NextPage");
#}

} # end create_topic


#############################
# add this above #
#############################

#creat the **online.cgi (Topic Author, Beginer and replier)

$onlinecounter="0";
unlink "$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/forums/$exact_path/$page_name.online";

$onlinecounter=$onlinecounter+1;
open (FILE, ">>$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/forums/$exact_path/$page_name.online");
&lock;
print FILE ("$show_public_namen");
&unlock;
close (FILE);
chmod (0666, "$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/forums/$exact_path/$page_name.online");

$show_user_online="";


####Call the **online.cgi

These Codes are that I need you help me. I don't kown where I can add them in the ubb_get_topic.cgi or ubb_lib.cgi


################
$ThisHTML = &OpenFileAsVar("$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/forums/$exact_path/$_[1].cgi");

@useronline = &OpenFileAsArray("$vars_config{NonCGIPath}/cache-$cache_cookie/ubb_files/forums/$exact_path/$_[1].online");
$onlinecounter="0";
foreach $useryes(@useronline){
chomp ($useryes);
$onlinecounter=$onlinecounter+1;
if (-e "$vars_config{MembersPath}/UBB6online.cgi") {
$people = &OpenFileAsVar("$vars_config{MembersPath}/UBB6online.cgi");
if ($people =~ /$useryes/){
$ThisHTML =~ s//This member is Online!/gim;
} else {
$ThisHTML =~ s//This member is Offline!/gim;
}
}
}


print "$ThisHTML"; exit;

#####################

In ubb_get_topic.cgi ,
sub get_topic and sub get_new_topic

In ubb_lib.cgi
sub ServeFromCache

How to hack? I need your help!!!!

[ 01-15-2002 07:51 PM: Message edited by: vent ]
Posted By: vent Re: WhosOnline on the topic page - 01/16/2002 3:47 AM
^_^
© UBB.Developers