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

Author: Scoop Developers

Description:

This displays the list of older stories on the site. Depending on the page its on, it will show all older stories, just older stories from the section you're viewing, or just older stories from the front page.

Box Code:

my $section = $S->{CGI}->param('section') || 'front';
my $stories = [];

if ($section eq 'front') {
$stories = $S->getstories({-type => 'titlesonly', -displaystatus => '0'});
} elsif ($section eq '__all__') {
$stories = $S->getstories({-type => 'titlesonly', -section => '!Diary'});
} else {
$stories = $S->getstories({-type => 'titlesonly', -section => $section});
}
my $box_content;

my $date = undef;
foreach my $story (@{$stories}) {
if (($story->{ftime} ne $date) || !$date) {
$date = $story->{ftime};
$box_content .= qq|
<P>
<B>$story->{ftime}</B>|;
}
$box_content .= qq|
<BR>%%dot%% <A CLASS="light" HREF="%%rootdir%%/story/$story->{sid}">$story->{title}</A> ($story->{commentcount} comments)|;

if ($S->have_perm('story_list')) {
$box_content .= qq| [<A CLASS="light" HREF="%%rootdir%%/admin/story/$story->{sid}">edit</A>]|;
}
}

my $offset = $S->{UI}->{VARS}->{maxstories} + $#{$stories};
my $search_url = qq{%%rootdir%%/?op=search;offset=$offset};
$search_url .= ';section='.$section if ($section ne 'front');

$box_content .= qq|
<P>
<A CLASS="light" HREF="$search_url">Older Stories...</A>
</P>|;
my $return = {content => "%%smallfont%%$box_content%%smallfont_end%%"};
if ($section ne 'front' && $section ne '__all__') {
$return->{title} = $S->{SECTION_DATA}->{$section}->{title};
} elsif ($section eq '__all__') {
$return->{title} = 'All Stories';
}

return $return;
Display: Sort:
asds (none / 0) (#1)
by julianamartin on Mon Feb 05, 2018 at 05:13:37 AM PST

I think this is an informative post and it is very useful and knowledgeable. therefore, I would like to thank you for the efforts you have made in writing this article. Link Building Service



Update. (none / 0) (#2)
by Kelly McLemore on Wed Apr 25, 2018 at 05:05:53 AM PST

Great article and the best assignment writing service uk reviews posted here. Honestly speaking I have never gone through any other good post than this about this topic. You have done an excellent job. You are really an inspiration to so many youngsters out there.



Attractive post (none / 0) (#3)
by Marlon99 on Tue Oct 01, 2019 at 05:35:54 AM PST

So informative post here. There are very useful information in this post that is really helpful in our practical life.Thanks and i really appreciate your working.Thanks. How to get best quality Garage Racking



great (none / 0) (#4)
by heenacruzl on Sat Dec 14, 2019 at 01:36:34 AM PST

Great, you have given interesting information and experiences, I really like it. happy wheels y8



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