Scoop -- the swiss army chainsaw of content management
Front Page · Everything · News · Code · Help! · Wishlist · Project · Scoop Sites · Dev Notes · Latest CVS changes · Development Activities
Scoop Box Exchange - Show Box: new_section_stories 1.00

Author: hurstdog [Info]

Description:

This is the new section stories box on kuro5hin as of 2002-02-02. It shows the last 6 section stories, and the new diaries. Import this from the admin box editor.

Box Code:

my $content = qq{
<b><a href="|rootdir|/special/browse/">Browse all the newest headlines by section >></a></b><p>};

my ($rv, $sth) = $S->db_select({
WHAT => 'sid, title, aid, section, tid',
FROM => 'stories',
WHERE => "displaystatus = 1 AND section != 'Diary'",
ORDER_BY => 'time desc',
LIMIT => '7'});

my $stories = $sth->fetchall_arrayref();
$sth->finish();

foreach my $story (@{$stories}) {
my $urlnick = $S->urlify($story->[2]);
$story->[2] =~ s/(\S{20})/$1- /g;
$story->[1] =~ s/(\S{20})/$1 /g;
$content .= qq{
<b><a href="|rootdir|/story/$story->[0]">$story->[1]</a></b><br>
<font size="-2">by <a href="|rootdir|/user/$urlnick">$story->[2]</a><br>
<a href="|rootdir|/section/$story->[3]">$S->{SECTION_DATA}->{$story->[3]}->{title}</a>::<a href="|rootdir|/search/?topic=$story->[4]">$S->{TOPIC_DATA}->{$story->[4]}->{alttext}</a></font>
<p>};
}


return {content => $content};
Display: Sort:
Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Keepers of Lists
Got Lists? We've got over 1800

Login
Make a new account
Username:
Password:

Hosted by ScoopHost.com Powered by Scoop
All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest © 1999 The Management

create account | faq | search