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
offline icon
#######################################################
# 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//
/gim;
} else {
$ThisHTML =~ s//
/gim;
}
}
}
print "$ThisHTML"; exit;
#####################
In ubb_get_topic.cgi ,
sub get_topic and
sub get_new_topicIn ubb_lib.cgi
sub ServeFromCacheHow to hack? I need your help!!!!
[ 01-15-2002 07:51 PM: Message edited by: vent ]