Gossamer Forum
Home : Products : Gossamer Forum : Development, Plugins and Globals :

Re: [bgkhoo] Scripts for last 10 posting

Quote Reply
Re: [bgkhoo] Scripts for last 10 posting In reply to
Code:
use strict;
use GForum qw/$DB/;

my @posts;
my $db = $DB->table('Post');

$db->select_options("ORDER BY post_time DESC", "LIMIT 10");

my $sth = $db->select('post_id', 'post_subject');

while (my ($tags) = $sth->fetchrow_hashref) {
push @posts, qq|<a href="gforum.cgi?post=| . $tags->{post_id} . qq|;sb=post_latest_reply;so=ASC;forum_view=forum_view_collapsed;">| . $tags->{post_subject} . qq|</a>|;
}

return join '<br>', @posts;

I'm not in the mood to test it but hope it puts you on the right track.

Last edited by:

PaulW: Dec 3, 2001, 8:18 AM
Subject Author Views Date
Thread Scripts for last 10 posting bgkhoo 13663 Dec 3, 2001, 7:40 AM
Post Re: [bgkhoo] Scripts for last 10 posting
Wil 13459 Dec 3, 2001, 7:42 AM
Thread Re: [bgkhoo] Scripts for last 10 posting
Paul 13472 Dec 3, 2001, 8:14 AM
Thread Re: [PaulW] Scripts for last 10 posting
bgkhoo 13433 Dec 3, 2001, 9:52 AM
Post Post deleted by PaulW
Paul 13418 Dec 3, 2001, 10:36 AM
Thread Re: [bgkhoo] Scripts for last 10 posting
Paul 13429 Dec 3, 2001, 11:02 AM
Post Post deleted by kjetilpa
kjetilpa 13358 Jul 31, 2002, 1:54 AM
Thread Re: [Paul] Scripts for last 10 posting
Jag 13252 Sep 2, 2002, 7:03 AM
Thread Re: [Jag] Scripts for last 10 posting
Paul 13302 Sep 2, 2002, 7:36 AM
Post Re: [Paul] Scripts for last 10 posting
Jag 13217 Sep 2, 2002, 7:43 AM
Post Re: [Paul] Scripts for last 10 posting
Jag 13199 Sep 2, 2002, 7:53 AM
Thread Re: [Paul] Scripts for last 10 posting
Jag 13211 Sep 2, 2002, 9:04 AM
Thread Re: [Jag] Scripts for last 10 posting
maxpico 13180 Sep 4, 2002, 12:41 PM
Post Re: [maxpico] Scripts for last 10 posting
Jag 13120 Sep 5, 2002, 6:57 AM
Post Re: [Paul] Scripts for last 10 posting
mick31 2307 Aug 1, 2003, 12:33 PM
Thread Re: [Paul] Scripts for last 10 posting
Sir Up 13089 Oct 4, 2002, 11:41 AM
Thread Re: [Sir Up] Scripts for last 10 posting
Paul 13085 Oct 4, 2002, 12:30 PM
Post Re: [Paul] Scripts for last 10 posting
Sir Up 13067 Oct 4, 2002, 12:51 PM
Thread Re: [Paul] Scripts for last 10 posting
kencl 12631 Feb 3, 2003, 3:32 PM
Thread Re: [kencl] Scripts for last 10 posting
yogi 12664 Feb 4, 2003, 1:22 AM
Thread Re: [yogi] Scripts for last 10 posting
kencl 12587 Feb 4, 2003, 1:01 PM
Thread Re: [kencl] Scripts for last 10 posting
kencl 12552 Feb 21, 2003, 9:48 AM
Thread Re: [kencl] Scripts for last 10 posting
Alex 12539 Feb 26, 2003, 12:59 AM
Thread Re: [Alex] Scripts for last 10 posting
kencl 12443 Mar 18, 2003, 4:54 PM
Thread Re: [kencl] Scripts for last 10 posting
Alex 12479 Mar 18, 2003, 5:04 PM
Post Re: [Alex] Scripts for last 10 posting
kencl 12454 Mar 18, 2003, 5:15 PM
Post Re: [bgkhoo] Scripts for last 10 posting
rmurdo 1872 Nov 15, 2008, 6:30 PM