This is fairly simple, it only displays topics, and you can config it for as many or as few as you'd like.
You can add other fields such as username, date, forum name and so on
It's based on the &GetDaily routine
To run the script at specified intervals, you'll need cron and a fetching script. I use a fetching script from the AP Wire. So I can't give it to you. There should be others on the net.
Then use an SSI to put the topics where you want on your web page.
Here's the code:
Find:&GetDaily;
}
Add:if ($in{'action'} eq "getdailynh") {
&GetDailynh;
}
Find:} #end GetDaily
Add:sub GetDailynh {
&GetDateTime;
if ($AllowSearch eq "FALSE") {
$SearchOption = "";
} else {
$SearchOption = qq(
refine search | );
}
if (-e "$NonCGIPath/dailyindex-$LastLoginJulianDATE.file") {
$Daily = "exists";
@daily2 = &OpenFile("$NonCGIPath/dailyindex-$LastLoginJulianDATE.file");
@daily = sort(@daily2);
} else {
$Daily = "";
@daily = @blank;
}
#eliminate duplicates
foreach $check(@daily) {
chomp($check);
(@testit) = split(/|/, $check);
$testit = ("$testit[0]" . "$testit[1]");
$Duplicate = "";
for $dupcheck(@good) {
@testit2 = split(/|/, $dupcheck);
$testit2 = ("$testit2[0]" . "$testit2[1]");
if ($testit eq "$testit2") {
$Duplicate = "true";
}
}
if ($Duplicate ne "true") {
push(@good, $check);
}
}
$MatchTotal = @good;
my $MaxDisplay = 10; #maximum number to view per screen
if ($in{'StartPoint'} eq "") {
$StartPoint = 1;
if ($MatchTotal <= $MaxDisplay) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
$EndPoint = $MaxDisplay;
}
$EP = $EndPoint - 1;
@daily = @good[0..$EP];
} else {
$StartPoint = $in{'StartPoint'};
$EndPoint = $StartPoint + $MaxDisplay;
$EndPoint = $EndPoint - 1;
if ($MatchTotal <= $EndPoint) {
$EndPoint = $MatchTotal;
$Done = "true";
} else {
$Done = "";
}
}
#If no matches, return nothing
if ($MatchTotal eq 0){
print<
NADA
exit;
}
$SP = $StartPoint - 1;
$EP = $EndPoint - 1;
@daily = @good[$SP..$EP];
if ($Done ne "true") {
$NextStart = $EndPoint + 1;
$NextWording = qq([Next Topics]);
} else {
$NextWording = "";
}
if ($MatchTotal == 0) {
$StartPoint = 0;
}
print<
Today's TalkBack Topics:
TOP
for $eachone(@daily) {
@goodline = split(/|/, $eachone);
chomp($goodline[5]);
@GetForumName = &GetForumRecord("$goodline[0]");
$ForumName = "$GetForumName[1]";
$HyphenIt = "$goodline[3]";
($ThisMo, $ThisDay, $ThisYear) = split(/-/, $HyphenIt);
if ($DateFormat eq "US") {
$TheDate = "$HyphenIt";
$DateSize = "2";
}
elsif ($DateFormat eq "Euro") {
$TheDate = "$ThisDay-$ThisMo-$ThisYear";
$DateSize = "2";
}
elsif ($DateFormat eq "USX") {
$TheDate = &DateFormat("$HyphenIt", "USExpanded");
$DateSize = "1";
} else {
$TheDate = &DateFormat("$HyphenIt", "EuroExpanded");
$DateSize = "1";
}
if (-e "$NonCGIPath/Forum$goodline[0]/HTML/$goodline[1].html") {
print< $goodline[4]
ROW
}
}
print<
BOTTOM
} #end GetDailynh