Code:
#!/usr/bin/perl
#==============================
use strict;
use lib '/path/to/admin';
use GForum qw/$DB $IN/;
GForum::init('/path/to/admin');
last();
#==============================
sub last {
#------------------------------------------------
# Last five posts.
my ($tab, $output, $sth) = ($DB->table('Post'), undef, undef);
$tab->select_options('ORDER BY post_time DESC', 'LIMIT 5');
$sth = $tab->select( 'post_subject', 'post_id' );
while (my $post = $sth->fetchrow_hashref) {
$output .= qq|<a href="/cgi-bin/gforum.cgi?do=post_view&post=$post->{post_id}">$post->{Title}</a><br>|;
}
print $IN->header();
print $output;
}
Well something like that :)