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

Author: coryking [Info]

Description:

This is the companion to rss_export. I created this box to encourage people using feeds to stick around and browse the site rather then leech. I figure if they see the story the RSS feed gives them, plus two more stories, they are more likely to check out the rest of the site. If you are using (and you probably are) the extended body, you'll probably want to modify this code. I'd imagine you'd show the entire body, it's comments and below that you'd show the summaries of two more stories. Since I suck, there is probably some photographica specific stylesheet stuff you'll want to pull out as well (like that div crap down there...).

Box Code:

my $content;

my $sid=$S->{CGI}->param('sid');
my $ssid=$S->{DBH}->quote($sid);
return "" unless $sid;

my ($rv, $sth) = $S->db_select({
WHAT=>'*',
FROM=>'stories',
WHERE=>"sid=$ssid",
DEBUG=>0
});

my $story=$sth->fetchrow_hashref();
my $aid = $S->{DBH}->quote($$story{aid});


$content = $S->displaystory($sid, $story);

# clearly you'll want to change this...
$content .= qq(<div class="box_head">Other Photographica Members:</div>);

$sth->finish;
$sth=undef;

($rv, $sth) = $S->db_select({
WHAT=>'*',
FROM=>'stories',
WHERE=>"aid != $aid",
ORDER_BY=>'time DESC',
LIMIT=>'2',
DEBUG=>0
});

while(my $extra_story = $sth->fetchrow_hashref())
{
$content .= $S->story_summary($extra_story);

}

$content .= "<a href='/'>View the rest...</a>";

return $content;
Display: Sort:
reader (none / 0) (#1)
by Lejlaimsjont on Tue Mar 19, 2019 at 06:34:21 AM PST

Rss_story is completely an ideal and in a way a perfect blog. There will be readers who will try to make this blog more ideal as buy essays online australia developed blogs are the best.



Reader (none / 0) (#2)
by Bersimsjont on Thu Apr 25, 2019 at 03:11:03 AM PST

This image which is partaken in this blog is a perfect picture and individuals might want this blog as a result of the given picture. I would propose the perusers to peruse homeworkforme blog and offer it too with some different perusers.



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

Scoop Site Scroller: Get one yourself!
The OpenNIC
Democratically operated Domain Name System; using Scoop since Jan. 2001.

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