> not sure exactly, but i do know on the story pages the next/prev buttons 
go by section, i think. you might try looking there in the code...

Hmm, I don't think this is the case for our setup (which I inherited).
Thanks for the suggestion though.

Anyone else have other ideas? 

-----Original Message-----
From: kpaul mallasch [mailto:kpaul at mallasch.com] 
Sent: Wednesday, February 01, 2006 8:30 AM
To: Chris Schults
Cc: scoop-help at lists.kuro5hin.org
Subject: RE: [Scoop-help] RESEND: How do determine story section?

not sure exactly, but i do know on the story pages the next/prev buttons 
go by section, i think. you might try looking there in the code...

-kpaul

On Tue, 31 Jan 2006, Chris Schults wrote:

>> define: 'determine' - what are you trying to do?
>
> Oh, sorry I wasn't clear.
>
> Use this story for an example:
>
> http://gristmill.grist.org/story/2006/1/31/122537/174
>
> The above is in this section:
>
> http://gristmill.grist.org/section/new_in_grist
>
> On the story page, I would like the recent comments box to only list
> comments from stories in that section. While I know I could create a
> different recent comments box for each section, I would prefer to only
have
> one box.
>
> Here is what I have now:
>
> # Section?
> my $section = $S->{CGI}->param('section');
> my $where;
> if ($section eq "new_in_grist") {
> 	$where = "stories.section = 'new_in_grist'";
> } else {
> 	$where = "stories.section != 'new_in_grist'";
> }
>
> # How many?
> my $count = '20';
>
> my ($rv, $sth) = $S->db_select({
> 	WHAT => 'comments.sid, comments.cid, comments.uid, stories.title',
> 	FROM => 'comments LEFT JOIN stories on comments.sid = stories.sid',
> 	WHERE => $where,
> 	ORDER_BY => 'comments.date desc',
> 	LIMIT => $count
> });
>
> This works fine for the section index page, but not for story pages (for
> obvious reasons). I've toyed around with $S->displaystory() and
> $S->getstories() with no success.
>
> -----Original Message-----
> From: kpaul mallasch [mailto:kpaul at mallasch.com]
> Sent: Tuesday, January 31, 2006 3:00 PM
> To: Chris Schults
> Cc: scoop-help at lists.kuro5hin.org
> Subject: Re: [Scoop-help] RESEND: How do determine story section?
>
> define: 'determine' - what are you trying to do?
>
> -kpaul
> mallasch.com
>
> On Tue, 31 Jan 2006, Chris Schults wrote:
>
>> How does one determine the section of a story?
>>
>> Chris
>>
>> --------------------------
>>
>> Chris Schults
>> Web Production Manager
>> Grist Magazine
>> 811 First Avenue, Suite 466
>> Seattle, WA  98104
>> Phone: 206-876-2020, ext. 204
>> Fax: 253-423-6487
>> <http://www.grist.org>
>>
>> To sign up for Grist by email, the world's top environmental news served
> up
>> with a sense of humor, click here <http://www.grist.org/signup/> or send
a
>> blank email message to <daily-grist-subscribe at lists.grist.org>
>>
>> _______________________________________________
>> Scoop-help mailing list
>> Scoop-help at lists.kuro5hin.org
>> http://lists.kuro5hin.org/mailman/listinfo/scoop-help
>>
>
> _______________________________________________
> Scoop-help mailing list
> Scoop-help at lists.kuro5hin.org
> http://lists.kuro5hin.org/mailman/listinfo/scoop-help
>