Skip to content

Commit

Permalink
added call to action link for RSS
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon 'CowboyNeal' Pater committed Apr 18, 2007
1 parent 2dbd400 commit b2731a7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Slash/XML/RSS/RSS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -398,19 +398,24 @@ sub rss_story {
if $story->{title};
if ($story->{sid}) {
my $edit = "admin.pl?op=edit&sid=$story->{sid}";
my $action = "article.pl?sid=$story->{sid}\&from=rss";
if ($story->{primaryskid}) {
my $dir = url2abs(
$reader->getSkin($story->{primaryskid})->{rootdir},
$channel->{'link'}
);
$encoded_item->{'link'} = _tag_link("$dir/article.pl?sid=$story->{sid}");
$edit = "$dir/$edit";
$action = "$dir/$action";
} else {
$encoded_item->{'link'} = _tag_link("$channel->{'link'}article.pl?sid=$story->{sid}");
$edit = "$channel->{'link'}$edit";
$action = "$channel->{'link'}$action";
}
$_ = $self->encode($_, 'link') for ($encoded_item->{'link'}, $edit);

$story->{introtext} .= "<p><a href=\"$action\">Read more of this story</a> at $constants->{sitename}.</p>";

if (getCurrentUser('is_admin')) {
$story->{introtext} .= qq[\n\n<p><a href="$edit">[ Edit ]</a></p>];
}
Expand Down

0 comments on commit b2731a7

Please sign in to comment.