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_site_news 1.00

Author: hurstdog [Info]

Description:

Displays a short message on the front page if the user hasn't visited the newest site news story yet. Can be tailored to any section, and ad_box is just a block with only |content| in it.

Box Code:

return unless ($S->{UID} > 0);

my ($rv, $sth) = $S->db_select({
WHAT => 'sid',
FROM => 'stories',
WHERE => 'section = "sitenews"',
LIMIT => 1,
ORDER_BY => 'time DESC'});
my $sid = $sth->fetchrow();
$sth->finish();

return unless $sid;

$S->story_last_seen($sid);

return if (defined($S->{LAST_SEEN}->{$sid}->{lastseen}));

return {content => qq{<table cellpadding=3 cellspacing=0 border=0><tr><td width="12" align="center"><IMG SRC="|imagedir|/alert.gif" width=12 height=16 alt="!" border=0></td><td><b>There is <A HREF="/story/$sid">New Site News</A>.</b></td></tr></table>}};
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