=cut
-our $VERSION = "1.025";
+our $VERSION = "1.027";
my $excerptSize = 300;
return unescape_html($_[0]);
}
-sub _embed_low {
+sub _embed_tag {
my ($self, $acts, $articles, $what, $template, $maxdepth, $templater) = @_;
$maxdepth = $self->{maxdepth}
or return "** Cannot find article $id to be embedded **";;
}
+ return $self->_embed_low($embed, $articles, $template, $maxdepth);
+}
+
+sub _embed_low {
+ my ($self, $embed, $articles, $template, $maxdepth) = @_;
+
my $gen = $self;
if (ref($self) ne $embed->{generator}) {
my $genname = $embed->{generator};
sub vembed {
- my ($self, $article, $template) = @_;
+ my ($self, $article, $template, $maxdepth) = @_;
+
+ $maxdepth = $self->{maxdepth}
+ if !$maxdepth || $maxdepth > $self->{maxdepth};
- return $self->embed($article, "BSE::TB::Articles", $template);
+ return $self->_embed_low($article, "BSE::TB::Articles", $template, $maxdepth);
}
sub iter_kids_of {
return '' if $args eq 'start' || $args eq 'end';
my ($what, $template, $maxdepth) = split ' ', $args;
undef $maxdepth if defined $maxdepth && $maxdepth !~ /^\d+/;
- return $self->_embed_low($acts, $articles, $what, $template, $maxdepth, $templater);
+ return $self->_embed_tag($acts, $articles, $what, $template, $maxdepth, $templater);
},
ifCanEmbed=> sub { $self->{depth} <= $self->{maxdepth} },