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: focus 1.00

Author: hurstdog [Info]

Description:

This box shows the focus box on the front page of kuro5hin as of today 4/11/02.

Box Code:

my $section = 'sectionname';
my $desc = $S->{SECTION_DATA}->{$section}->{title};
my $content;

my ($rv, $sth) = $S->db_select({
WHAT => 'sid, title',
FROM => 'stories',
WHERE => qq{section = "$section" AND displaystatus >= 0},
ORDER_BY => 'time DESC',
LIMIT => 3
});

while (my $story = $sth->fetchrow_hashref()) {
my $comments = $S->_commentcount($story->{sid});
my $s = ($comments ==1) ? '' : 's';
$content .= qq{
<b><A HREF="|rootdir|/story/$story->{sid}">$story->{title}</A></b><br>($comments comment$s)<br>}; #|
}

$content .= qq{
<p>
<font size="1"><div align="right">
<a href="http://www.kuro5hin.org/story/2002/4/11/0436/72501">About this Focus Topic</a><br>
Sponsored by <a href="http://www.digitalidworld.com/">DigitalIDWorld.com</a></div></font>
};


return {'content' => $content, 'title' => qq{Focus: <a href="/section/$section"><font color="#eeeeee">$desc</font></a>}};

Display: Sort:
Menu
· create account
· faq
· search
· report bugs
· Scoop Administrators Guide
· Scoop Box Exchange

Scoop Site Scroller: Get one yourself!
Smokedot
It's 4:19... do you know where your bong is?

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