summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-04-29 12:59:28 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-04-29 12:59:28 +0000
commit2e533bd16346ec74216415c01a57c7276d608cf8 (patch)
tree680ac1cb7fe15c65a53c9f0bc6b1e4949481118b /data
parent04c26425699a3e01d0e2abe52ad9f763396cd940 (diff)
...another commit...
git-svn-id: svn://vndb.org/vndb@9 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'data')
-rw-r--r--data/tpl/defs.pl2
-rw-r--r--data/tpl/redit3
-rw-r--r--data/tpl/vnedit8
-rw-r--r--data/tpl/vnpage24
-rw-r--r--data/tpl/vnpage_rel8
5 files changed, 34 insertions, 11 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl
index 6e568c11..c482478a 100644
--- a/data/tpl/defs.pl
+++ b/data/tpl/defs.pl
@@ -180,7 +180,7 @@ sub ttabs { # [vrp], obj, sel
sprintf('<a href="/%%s/hide"%s>%s</a>', $t eq 'v' ? ' id="vhide"' : '', $$o{hidden} ? 'unhide' : 'hide')
) : (),
!$$o{locked} || ($p{Authedit} && $p{Authlock}) ?
- ($s eq 'edit' ? 'edit' : '<a href="/%s/edit" '.($t eq 'v' || $t eq 'r' ? 'class="dropdown" rel="editDD"':'').'>edit</a>') : (),
+ ($s eq 'edit' ? 'edit' : '<a href="/%s/edit" '.($t eq 'v' || $t eq 'r' ? 'class="dropdown" rel="nofollow editDD"':'').'>edit</a>') : (),
$p{Authhist} ?
($s eq 'hist' ? 'history' : '<a href="/%s/hist">history</a>') : (),
diff --git a/data/tpl/redit b/data/tpl/redit
index 0e83b670..9567cce0 100644
--- a/data/tpl/redit
+++ b/data/tpl/redit
@@ -42,8 +42,7 @@
{ type => 'static', raw => 1, text => '<label>Platforms</label><ul class="platforms">'.join('', map { my $p = $_;
'<li><input type="checkbox" name="platforms" value="'.$_.'" id="'.$_.'" '.
(($d{form}{platforms} && grep { $p eq $_ } @{$d{form}{platforms}}) ? 'checked="checked" ':'').'/>'.
- '<acronym class="plat '.$_.'" title="'.$VNDB::PLAT->{$_}.'">'.$_.'</acronym>'.
- '<label for="'.$_.'">'.$VNDB::PLAT->{$_}.'</label></li>'
+ '<label for="'.$_.'"><acronym class="plat '.$_.'" title="'.$VNDB::PLAT->{$_}.'">&nbsp;</acronym>'.$VNDB::PLAT->{$_}.'</label></li>'
} sort { $VNDB::PLAT->{$a} cmp $VNDB::PLAT->{$b} } keys %$VNDB::PLAT).'</ul>' },
{ type => 'static', text => '<br />' },
diff --git a/data/tpl/vnedit b/data/tpl/vnedit
index dde98cb3..0e46ba47 100644
--- a/data/tpl/vnedit
+++ b/data/tpl/vnedit
@@ -47,6 +47,14 @@
{ type => 'input', name => '&nbsp;', short => 'l_vnn', pre => 'http://visual-novels.net/vn/index.php?option=com_content&amp;task=view&amp;id=', class => 'shortopts' },
{ type => 'input', name => '&nbsp;', short => 'l_cisv', pre => 'http://cisvisual.net/title/', class => 'shortopts' },
+ { type => 'static', text => '<br />' },
+ { type => 'input', name => 'Related anime', short => 'anime' },
+ { type => 'static', text => q|
+ Whitespace seperated list of <a href="http://anidb.net/">AniDB</a> anime IDs.
+ E.g. "1015 3348" will add <a href="http://anidb.net/a1015">Shingetsutan Tsukihime</a>
+ and <a href="http://anidb.net/a3348">Fate/stay night</a> as related anime.<br />
+ <b>Note:</b> It can take a few minutes for the anime titles to appear on the VN page.| },
+
{ type => 'sub', title => 'Categories', short => 'cat' },
{ type => 'hidden', short => 'categories' },
{ type => 'static', raw => 1, text => eval {
diff --git a/data/tpl/vnpage b/data/tpl/vnpage
index f602c1e2..1388fd03 100644
--- a/data/tpl/vnpage
+++ b/data/tpl/vnpage
@@ -20,6 +20,7 @@
[ l_wp => 'Wikipedia link', sub { $_[0] ? '<a href="http://en.wikipedia.org/wiki/'.$_[0].'">'.$_[0].'</a>' : 'No link' } ],
[ l_vnn => 'V-N.net link', sub { $_[0] ? '<a href="http://visual-novels.net/vn/index.php?option=com_content&amp;task=view&amp;id='.$_[0].'">'.$_[0].'</a>' : 'No link' } ],
[ l_cisv => 'CISVisual link', sub { $_[0] ? '<a href="http://cisvisual.net/title/'.$_[0].'">'.$_[0].'</a>' : 'No link' } ],
+ [ anime => 'Related anime', sub { join(' ', map qq|<a href="http://anidb.net/a$$_{id}">$$_{id}</a>|, sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ],
[ categories => 'Categories', sub { join(' ', map { $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}.'('.$_->[1].')' } sort { $a->[0] cmp $b->[0] } @{$_[0]}) || 'No categories selected' }, 1 ],
[ relations => 'Relations', sub { join("<br />\n", map { $VNDB::VREL->[$_->{relation}].': '._hchar($_->{title}) } sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ],
[ image => 'Image', sub { $_[0] > 0 ? sprintf '<img src="%s/cv/%02d/%d.jpg" />', $p{st}, $_[0]%100, $_[0] : $_[0] < 0 ? '[processing]' : 'No image'; } ],
@@ -78,14 +79,14 @@ if($d{vn}{length} || $d{vn}{alias} || @links) { ]]
<dt>Length</dt><dd>[[: $VNDB::VNLEN->[$d{vn}{length}][0] ]]- ([[: $VNDB::VNLEN->[$d{vn}{length}][1] ]])</dd>[[ } ]]-
[[ if($d{vn}{alias}) { ]]-
<dt>Aliases</dt><dd>[[: $d{vn}{alias} ]]</dd>[[ } ]]-
- [[ if(@links > 0) { ]]
+ [[ if(@links > 0) { ]]-
<dt>Links</dt><dd>[[= join(', ', map { '<a href="'.sprintf($_->[1],$_->[2]).'">'.$_->[0].'</a>' } @links) ]]</dd>[[ } ]]-
</dl>
[[ } ]]-
[[ if(@{$d{vn}{categories}}) { my %nolvl = (pli=>1,pbr=>1,gaa=>1,gab=>1); ]]-
<h3>Categories</h3>
- <dl class="vncat">
+ <dl>
[[ for (sort keys %$VNDB::CAT) {
my $c = $_;
my @c = map { my $s=$_;
@@ -110,6 +111,25 @@ if($d{vn}{length} || $d{vn}{alias} || @links) { ]]
</dl>
[[ } ]]-
+ [[ if(@{$d{vn}{anime}}) { ]]-
+ <h3>Related anime</h3>
+ <ul class="vnani">
+ [[ for (sort { $a->{year} < 1 ? 1 : $b->{year} < 1 ? -1 : $a->{year} <=> $b->{year} } @{$d{vn}{anime}}) { ]]-
+ <li>
+ -[[ if($_->{lastfetch} < 1) { ]]
+ <b>[[= $_->{lastfetch} < 0 ? '[unknown anidb id: ' : '[no information available at this time: ' ]]<a href="http://anidb.net/a[[= $_->{id} ]]">[[= $_->{id} ]]</a>]</b>
+ [[ } else {
+ my $l = join '-', qq|<a href="http://anidb.net/a$_->{id}" title="AniDB">DB</a>|,
+ $_->{nfo_id} ? qq|<a href="http://animenfo.com/animetitle,$_->{nfo_id},vndb.html" title="AnimeNFO">NFO</a>| : (),
+ $_->{ann_id} ? qq|<a href="http://www.animenewsnetwork.com/encyclopedia/anime.php?id=$_->{ann_id}" title="Anime News Network">ANN</a>| : ();
+ ]]
+ <b>[-[[= $l ]]-]</b> <acronym title="[[: $_->{title_kanji} ]]">[[: shorten $_->{title_romaji}, 40 ]]</acronym> <b>([[: $VNDB::ANITYPE->[$_->{type}][0] ]], -[[= $_->{year} ]])</b>
+ [[ } ]]
+ </li>
+ [[ } ]]
+ </ul>
+ [[ } ]]-
+
[[ if(@lang && grep { @{$_->{producers}} } @{$d{rel}}) { ]]-
<h3>Producers</h3>
<dl>
diff --git a/data/tpl/vnpage_rel b/data/tpl/vnpage_rel
index f2570548..f0edc35d 100644
--- a/data/tpl/vnpage_rel
+++ b/data/tpl/vnpage_rel
@@ -29,14 +29,10 @@
<tr>
<td class="tc1">[[= datestr($_->{released}) ]]</td>
<td class="tc2">[[= $_->{minage}<0 ? '' : $VNDB::VRAGES->{$_->{minage}} ]]</td>
- <td class="tc3">[[= join('', map { $_ ne 'oth' ? '<acronym class="plat '.$_.'" title="'._hchar($VNDB::PLAT->{$_}).'">'.$_.'</acronym>' : () } sort @{$_->{platforms}}) ]]</td>
+ <td class="tc3">[[= join('', map { $_ ne 'oth' ? '<acronym class="plat '.$_.'" title="'._hchar($VNDB::PLAT->{$_}).'">&nbsp;</acronym>' : () } sort @{$_->{platforms}}) ]]</td>
<td class="tc4"><acronym title="[[= $VNDB::RTYP->[$_->{type}] ]]- release">[[= lc substr($VNDB::RTYP->[$_->{type}],0,1) ]]</acronym></td>
<td class="tc5"><a href="/r[[= $_->{id} ]]" title="[[: $_->{original} || $_->{title} ]]">[[: shorten $_->{title},60 ]]</a></td>
-<!-- <td class="tc6">[[=
- join(', ',
- map {
- sprintf('<a href="/p%d" title="%s">%s</a>', $_->{id}, _hchar($_->{name}), _hchar(shorten $_->{name},20)) } @{$_->{producers}}) ]]</td>-->
- <td class="tc7">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]"><acronym class="plat ext" title="WWW">www</acronym></a>[[ } ]]</td>
+ <td class="tc7">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]" class="plat ext" title="WWW">&nbsp;</a>[[ } ]]</td>
</tr>
[[ } ]]-
[[ } ]]-