[[= ttabs('v', $d{vn}) ]]

[[: $d{vn}{title} ]]

-[[ if($p{AuthLoggedin}) { ]]

< user options - [[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]] - [[= !$d{list}{vid} ? 'add to vn list' : 'status: '.lc $VNDB::LSTAT->[$d{list}{status}] ]] >

[[ } ]]- [[ if($d{vn}{hidden}) { ]]- This item has been deleted from the database. File a request on the forums to undelete this page. [[ } ]] [[ if(!$d{vn}{hidden} || $p{Authdel}) { ]]- [[ if($d{change}) { ]] [[= cdiff($d{prev}, $d{vn}, [ title => 'Title', 1 ], [ alias => 'Alias', 1 ], [ desc => 'Description', 1, 1 ], [ length => 'Length', sub { $VNDB::VNLEN->[$_[0] ][0] } ], [ l_wp => 'Wikipedia link', sub { $_[0] ? ''.$_[0].'' : 'No link' } ], [ l_encubed => 'Encubed tag', sub { $_[0] ? ''.$_[0].'' : 'No link' } ], [ l_renai => 'Renai.us link', sub { $_[0] ? ''.$_[0].'' : 'No link' } ], [ l_vnn => 'V-N.net link', sub { $_[0] ? ''.$_[0].'' : 'No link' } ], [ anime => 'Related anime', sub { join(' ', map qq|$$_{id}|, sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ], [ categories => 'Categories', sub { join(' ', map { my $l=$VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}; $l?$l.'('.$_->[1].')':() } sort { $a->[0] cmp $b->[0] } @{$_[0]}) || 'No categories selected' }, 1 ], [ relations => 'Relations', sub { join("
\n", map { $VNDB::VREL->[$_->{relation}].': '._hchar($_->{title}) } sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ], [ image => 'Image', sub { $_[0] > 0 ? sprintf '', $p{st}, $_[0]%100, $_[0] : $_[0] < 0 ? '[processing]' : 'No image'; } ], [ img_nsfw => 'NSFW', sub { $_[0] ? 'Not safe' : 'Safe' } ] ) ]] [[ } ]]- [[ my @lang; for (@{$d{rel}}) { my $l = $_->{language}; next if grep { $_ eq $l } @lang; push @lang, $l; } ]]
[[ if($d{vn}{image} > 0) { ]] [[ if($d{vn}{img_nsfw} && !$p{AuthNsfw}) { ]] [[ } else { ]] [[: $p{PageTitle} ]] [[ } ]] [[ } elsif($d{vn}{image} < 0) { ]]- [processing image, please return in a few minutes] [[ } else { ]]- No image uploaded yet... [[ } ]]-
-[[ $d{vn}{c_votes} =~ s#^([0-9]{2}.[0-9]{2})\|([0-9]{4})$#$2 == 0 ? 'No votes yet' : $1 == 0 ? sprintf 'N/A (%d vote%s)', $2, $2>1?'s':'' : sprintf '%.2f (%d vote%s)', $1, $2, $2>1?'s':''#e; my @links = ( $d{vn}{l_wp} ? [ 'Wikipedia', 'http://en.wikipedia.org/wiki/%s', $d{vn}{l_wp} ] : (), $d{vn}{l_encubed} ? [ 'Encubed', 'http://novelnews.net/tag/%s/', _huri $d{vn}{l_encubed} ] : (), $d{vn}{l_renai} ? [ 'Renai.us', 'http://renai.us/game/%s.shtml', _huri $d{vn}{l_renai} ] : (), $d{vn}{l_vnn} ? [ 'V-N.net', 'http://visual-novels.net/vn/index.php?option=com_content&task=view&id=%d', $d{vn}{l_vnn} ] : (), ); my $prod = @lang && grep { @{$_->{producers}} } @{$d{rel}}; if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]]

General info

[[ if($d{vn}{length}) { ]]-
Length
[[: $VNDB::VNLEN->[$d{vn}{length}][0] ]]- ([[: $VNDB::VNLEN->[$d{vn}{length}][1] ]])
[[ } ]]- [[ if($d{vn}{alias}) { ]]-
Aliases
[[: $d{vn}{alias} ]]
[[ } ]]- [[ if(@links > 0) { ]]-
Links
[[= join(', ', map { ''.$_->[0].'' } @links) ]]
[[ } ]]-
Rating
[[: $d{vn}{c_votes} ]]
[[ if($prod) { ]]-
Producers
[[ for my $l (@lang) { my %l; $_->{language} eq $l && (%l = ( %l, map { sprintf('%s', $_->{id}, _hchar($_->{name}), _hchar shorten $_->{name}, 30) => 1 } @{$_->{producers}} )) for (@{$d{rel}}); if(keys %l) { ]]-  [[= join(' & ', keys %l) ]]
[[ } } ]]
[[ } ]]-
[[ } ]]- [[ if(@{$d{vn}{categories}}) { my %nolvl = (map {$_=>1} qw| pli pbr gaa gab hfa hfe lea lfa lsp tfu tpa tpr |); ]]-

Categories

[[ for (qw|e s g p h|) { my $c = $_; my @c = map { my $s=$_; my ($cs) = grep { $_->[0] eq $c.$s } @{$d{vn}{categories}}; $cs ? sprintf('%s', $nolvl{$c.$_}?0:$cs->[1], $VNDB::CAT->{$c}[1]{$s}) : () } sort keys %{$VNDB::CAT->{$c}[1]}; if(@c) { ]]-
[[: $VNDB::CAT->{$c}[0] ]]
[[= join(', ', @c) ]]
[[ } } ]] [[ if(grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}}) { ]]-
Place/Time
[[= join ', ', map $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}, sort grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}} ]]
[[ } ]]-
[[ } ]]- [[ if($#{$d{vn}{relations}} >= 0) { ]]-

[[= $d{page} eq 'rg' ? 'Relations' : 'Relations' ]]

[[ my $lrel = -1; my $i=0; for (sort { $a->{relation} <=> $b->{relation} } @{$d{vn}{relations}}) { if($_->{relation} != $lrel) { $lrel=$_->{relation}; if($i) { ]][[ } ]]-
[[: $VNDB::VREL->[$lrel] ]]
[[: $_->{title} ]] [[ } else { ]]
[[: shorten $_->{title}, 40 ]][[ } ++$i;} ]]
[[ } ]]- [[ if(@{$d{vn}{anime}}) { ]]-

Related anime

[[ } ]]-
-[[ my @lnks = ( !$d{page} ? 'description & releases' : 'description & releases', $d{page} eq 'stats' ? 'stats' : 'stats', $d{vn}{rgraph} ? ( $d{page} eq 'rg' ? 'relations' : 'relations', ) : (), ); ]]

- -[[= join(' - ', @lnks) ]]- -

[[ if(!$d{page}) { ]][[+ vnpage_rel ]][[ } ]] [[ if($d{page} eq 'stats') { ]][[+ vnpage_stats ]][[ } ]] [[ if($d{page} eq 'rg') { ]][[+ vnpage_rg ]][[ } ]] [[ if($p{AuthLoggedin}) { ]]- [[ } ]] [[ } ]]