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

Author: hillct [Info]

Description:

This box takes a section and displays all the stories in that section in a FAQ-style format. This box is best deployed as an OP. It lists the titles of each story in a section as FAQ questions with named targets pointing ot each of the intro texts as the answer and links to the body text (using the displaystory OP) as answer 'details'.

Box Code:

my($content,$answers);
my $section=$S->{CGI}->param('section');
my $title=qq{FAQ: }.$S->{SECTION_DATA}->{$section}->{title};
my ($rv, $sth) = $S->db_select({
WHAT => 'sid, title,introtext,bodytext,commentstatus',
FROM => 'stories',
WHERE => qq{section = "$section" AND displaystatus >=0},
ORDER_BY => 'time DESC'});

# Add the link for each story
while (my $story = $sth->fetchrow_hashref()) {
$content .= qq{<li><A HREF="#$story->{sid}">$story->{title}</a><br>\n};
my $comments = $S->_commentcount($story->{sid});
$answers .= qq{<br><a name="$story->{sid}"></a><b>$story->{title}</b><br>\n
$story->{introtext}<br>
<table border=0 width=100%><tr><td align=left>|norm_font|};
if($story->{bodytext} ne ''){
$answers .= qq{<A HREF="|rootdir|/story/$story->{sid}">Details >></a>
};
if($story->{commentstatus}==0 \|\| ($story->{commentstatus}==1 && $comments)){
$answers .= qq{ ($comments Comments)};
}
} elsif($story->{commentstatus}==0 \|\| ($story->{commentstatus}==1 && $comments)){
$answers .= qq{<A HREF="|rootdir|/story/$story->{sid}">Comments >></a> ($comments)};
}
$answers .= qq{|end_norm_font|</td><td align=right>
|norm_font|[|end_norm_font|<a href="#top"
>|norm_font|Top|endnorm_font|</a>|norm_font|]|end_norm_font|
</td></tr></table><br>};
}

$content=qq{|norm_font|$content<br><br>$answers|end_norm_font|};

# And return the content, like normal.
return {content => $content, title => $title};
Announcement and Discussion
Display: Sort:
We wanted it to be pretty stable and clear before (none / 0) (#1)
by newstart028 on Thu Jun 16, 2016 at 03:10:50 AM PST

We wanted it to be pretty stable and clear before we fully released 0.6. 192.168.l.l



reply (none / 0) (#2)
by merlinjohn on Tue Jul 18, 2017 at 08:06:53 AM PST

I think you people have explained things very neatly and in perfect order so that we are able to decode it easily. I found this box exchange display things while searching something else in this blog but I found them very useful and informative. manufactured home for sale



Good work (none / 0) (#3)
by cofakabel on Thu Mar 07, 2019 at 10:45:14 AM PST

This box code is performed to display FAQ section about anything in any kind of business or discussion.This https://www.australian-writings.org/ is one of the most important way to improve the quality of the group discussion.Will this code work for the long pages discussion about the training?



writer (none / 0) (#4)
by cajacvsdf on Mon Mar 18, 2019 at 03:42:01 AM PST

No comments were posted adfasdf No comments were posted



Arianna (none / 0) (#5)
by JacksonJackson on Thu Oct 08, 2020 at 12:45:57 AM PST

wow, great, I was wondering how to cure acne naturally. and found your site by google, learned a lot, now i'm a bit clear. I've bookmark your site and also add rss. keep us updated. pest control sharjah



Arianna (none / 0) (#6)
by JacksonJackson on Fri Oct 09, 2020 at 02:00:32 PM PST

I have read your article; it is very informative and helpful for me. I admire the valuable information you offer in your articles. Thanks for posting it. International movers in Dubai



Arianna (none / 0) (#7)
by JacksonJackson on Sun Oct 11, 2020 at 02:00:19 AM PST

We are really grateful for your blog post. You will find a lot of approaches after visiting your post. Great work Painting services in Dubai



Arianna (none / 0) (#8)
by JacksonJackson on Mon Nov 16, 2020 at 02:41:00 AM PST

Thanks for the informative and helpful post, obviously in your blog everything is good.. buy vicoprofen online



gutter maintenance wilmington nc (none / 0) (#9)
by Chaddy on Mon Dec 14, 2020 at 10:03:47 PM PST

I really enjoyed reading your article. I found this as an informative and interesting post, so I think it is very useful and knowledgeable. gutter maintenance wilmington nc



dental (none / 0) (#10)
by sambrokh on Sun Jan 31, 2021 at 09:27:53 PM PST

I agree with you. This post is truly inspiring. This is clearly one extraordinary post. https://www.jdental.co/



junk removal (none / 0) (#11)
by sambrokh on Thu Feb 04, 2021 at 07:32:22 AM PST

You made some good points there. I really think this excellent website wants much more consideration. If you need j dogg junk removal



junk removal (none / 0) (#12)
by sambrokh on Thu Feb 04, 2021 at 07:32:58 AM PST

You made some good points there. I really think this excellent website wants much more consideration. If you need j dogg junk removal



Great! (none / 0) (#13)
by chrisjohn2211 on Wed Jul 07, 2021 at 06:38:18 AM PST

It is really wonderful description! Thanks for sharing! www.concretecontractorsfortsmith.com



Interesting! (none / 0) (#14)
by alfredlan217 on Thu Aug 05, 2021 at 08:32:19 AM PST

The content inside the box is really interesting! Thank you for sharing collaborative media for masses! birmingham concrete contractors



Hmm (none / 0) (#15)
by Jon889 on Fri Aug 06, 2021 at 08:16:31 AM PST

This is nice. Thank you! concrete staining



Confusing (none / 0) (#16)
by diplo777 on Tue Aug 17, 2021 at 05:59:22 PM PST

I am just confused about how can I use these codes. Granite Lebanon Ohio



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

Scoop Site Scroller: Get one yourself!
Satanosphere
/* You are not expected to understand this. */

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