Right on, Drew!! Thank you very much for pointing me in the right direction...I had to adjust the codes slightly to work with LINKS SQL....
index.cgi ==> Forum Display Sub
In Reply To:
sub display {
# --------------------------------------------------------
my ($in, $dynamic) = @_;
my %OUT;
my ($forumcatrec, $forums, $forum_list, $moderator, $output);
my $s = $in->param('s') || $in->cookie('s');
$USER = &authenticate ($s);
my $title_linked = &build_linked_forum_title ("Anthro TECH Discussion Forum");
my $forumcats = '';
my $sth = $FORUMCATDB->prepare ("SELECT * FROM Forum_Cats ORDER BY ForumCatName");
$sth->execute() or die $DBI::errstr;
while (my $forumcatrec = $sth->fetchrow_hashref) {
my $forumcatname = $forumcatrec->{ForumCatName};
my $forum_list = '';
my $sti = $FORUMSDB->prepare ("SELECT * FROM Forum_Topics WHERE ForumCatID = ${$forumcatrec}{ForumCatID} ORDER BY ForumName");
$sti->execute() or die $DBI::errstr;
while (my $forums = $sti->fetchrow_hashref) {
$moderator = $forums->{ModeratorID};
undef $Links::DBSQL::DBH;
my $user = $USERDB->get_record ($moderator, 'HASH');
foreach (keys %$user) {
$forums->{$_} = $user->{$_};
}
$forum_list .= &site_html_forum_link ($forums);
}
$forumcats .= &site_html_forumcat_link ({ForumCatName => $forumcatname, Forum_List => $forum_list});
}
if (defined $USER) {
&site_html_forum_home ({Forums => $forumcats, Username => $USER{Username}, title_linked => $title_linked, %$USER});
}
else {
&site_html_forum_home ({Forums => $forumcats, title_linked => $title_linked});
}
} And in the
forumcatlinks.html file, I added
<%Forum_List%> and it worked!
http://www.anthrotech.com/cgibin/forum/ Now, I have to address some efficiency problems since I noticed that when I executed the script, the
mysqld was running at 90% WCPU and 90% CPU.
Regards,
Eliot Lee