summaryrefslogtreecommitdiff
path: root/data/tpl
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2008-10-26 13:23:15 +0100
committerYorhel <git@yorhel.nl>2008-10-26 13:23:15 +0100
commit45802c119b3f3a36ffae3296b37d51dd3a454f29 (patch)
treedde77096c1d248596c0c1d9b25f546db881ffd11 /data/tpl
parent3fb8a1ca280184cbe9b9873b2c736cab446414ac (diff)
Removing all files we're not going to use with the rewrite
...this is basically everything we're going to rewrite
Diffstat (limited to 'data/tpl')
-rw-r--r--data/tpl/defs.pl562
-rw-r--r--data/tpl/docs4
-rw-r--r--data/tpl/error10
-rw-r--r--data/tpl/hist102
-rw-r--r--data/tpl/home66
-rw-r--r--data/tpl/main161
-rw-r--r--data/tpl/pbrowse45
-rw-r--r--data/tpl/pedit44
-rw-r--r--data/tpl/ppage55
-rw-r--r--data/tpl/redit69
-rw-r--r--data/tpl/rlist90
-rw-r--r--data/tpl/rpage68
-rw-r--r--data/tpl/tedit33
-rw-r--r--data/tpl/tindex49
-rw-r--r--data/tpl/ttag60
-rw-r--r--data/tpl/tthread81
-rw-r--r--data/tpl/useredit36
-rw-r--r--data/tpl/userlist50
-rw-r--r--data/tpl/userlogin14
-rw-r--r--data/tpl/userpage13
-rw-r--r--data/tpl/userpass21
-rw-r--r--data/tpl/userreg38
-rw-r--r--data/tpl/vnbrowse108
-rw-r--r--data/tpl/vnedit120
-rw-r--r--data/tpl/vnlist63
-rw-r--r--data/tpl/vnpage204
-rw-r--r--data/tpl/vnpage_rel59
-rw-r--r--data/tpl/vnpage_rg11
-rw-r--r--data/tpl/vnpage_scr37
-rw-r--r--data/tpl/vnpage_stats39
-rw-r--r--data/tpl/wlist55
31 files changed, 0 insertions, 2367 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl
deleted file mode 100644
index 9135adb1..00000000
--- a/data/tpl/defs.pl
+++ /dev/null
@@ -1,562 +0,0 @@
-[[!
-
-use Time::CTime ();
-use Algorithm::Diff 'sdiff';
-use POSIX ('ceil', 'floor');
-
-my %p; # $X->{page} global page data
-my %d; # $X->{page}->{$p} local page data
-
-# redefine _hchar - usually a bad idea, but who cares
-sub _hchar {local$_=shift||return'';s/&/&amp;/g;s/</&lt;/g;s/>/&gt;/g;s/"/&quot;/g;s/\r?\n/ <br \/>\n/g;return$_;}
-
-sub formatdate {return _hchar(Time::CTime::strftime($_[0],gmtime($_[1]||0)))||'';}
-sub txt {local$_=shift||return'';s/&/&amp;/g;s/</&lt;/g;s/>/&gt;/g;return$_;}
-sub art2str {my$r='';$r.=($r?' & ':'').$_->{name}foreach (@{$_[0]->{artists}});return $_[1]?$r:_hchar($r);}
-sub calctime {my$r=shift;return'0:00:00'if!$r;my$x=sprintf'%d:%02d:%02d',int($r/3600),int(($r%3600)/60),($r%3600)%60;return $x;}
-sub shorten {local$_=shift||return'';return length>$_[0]?substr($_,0,$_[0]-3).'...':$_};
-
-# Date string format: yyyy-mm-dd
-# y = 0 -> Unknown
-# y = 9999 -> TBA (To Be Announced)
-# m = 99 -> Month + day unknown, year known
-# d = 99 -> Day unknown, month + year known
-sub datestr {
- my $d = sprintf '%08d', $_[0]||0;
- my $b = $d > Time::CTime::strftime("%Y%m%d", gmtime());
- my @d = map int, $1, $2, $3 if $d =~ /^([0-9]{4})([0-9]{2})([0-9]{2})$/;
- return 'unknown' if $d[0] == 0;
- my $r = sprintf $d[1] == 99 ? '%04d' : $d[2] == 99 ? '%04d-%02d' : '%04d-%02d-%02d', @d;
- $r = 'TBA' if $d[0] == 9999;
- $r =~ s/^[0-9]{4}-// if $_[1];
- return ($b&&!$_[1]?'<b class="future">':'').$r.($b?'</b>':'');
-}
-sub mediastr {
- return join(', ', map {
- $_->{medium} =~ /^(cd|dvd|gdr|blr)$/
- ? sprintf('%d %s%s', $_->{qty}, $VNDB::MED->{$_->{medium}}, $_->{qty}>1?'s':'')
- : $VNDB::MED->{$_->{medium}}
- } @{$_[0]});
-}
-sub sortbut { # url, col
- my $r=' '; my $u = _hchar($_[0]);
- $u .= $u =~ /\?/ ? ';' : '?';
- for ('a', 'd') {
- my $chr = $_ eq 'd' ? "\x{25BE}" : "\x{25B4}";
- $r .= $d{order}[0] eq $_[1] && $d{order}[1] eq $_ ? $chr :
- sprintf '<a href="%ss=%s;o=%s">%s</a>', $u, $_[1], $_, $chr;
- }
- return $r;
-}
-sub pagebut { # url
- my @br; my $ng = $_[0] =~ /\?/ ? ';' : '?';
- push @br, sprintf '<a href="%s">&lt;- previous</a>', $_[0].($d{page}-2 ? $ng.'p='.($d{page}-1) : '') if $d{page} > 1;
- push @br, sprintf '<a href="%s">next -&gt;</a>', $_[0].$ng.'p='.($d{page}+1) if $d{npage};
- return $#br >= 0 ? ('<p class="browse">( '.join(' | ', @br).' )</p>') : '';
-}
-sub wraplong { # text, margin
- local $_ = $_[0];
- my $m = $_[1]/2;
- s/([^\s\r\n]{$m})([^\s\r\n])/$1 $2/g;
- return $_;
-}
-sub age {
- my $a = time-$_[0];
- return sprintf '%d %s%s',
- $a > 60*60*24*365*2 ? ( $a/60/60/24/365, 'years' ) :
- $a > 60*60*24*(365/12)*2 ? ( $a/60/60/24/(365/12), 'months' ) :
- $a > 60*60*24*7*2 ? ( $a/60/60/24/7, 'weeks' ) :
- $a > 60*60*24*2 ? ( $a/60/60/24, 'days' ) :
- $a > 60*60*2 ? ( $a/60/60, 'hours' ) :
- $a > 60*2 ? ( $a/60, 'min' ) :
- ( $a, 'sec' ),
- $_[1]?'':' ago';
-}
-sub userstr { # [ uid, username ] or a hashref containing those keys
- my($id,$n) = ref($_[0])eq'HASH'?($_[0]{uid}||$_[0]{requester}, $_[0]{username}):@_;
- return !$id ? '[deleted]' : '<a href="/u'.$id.'">'.$n.'</a>';
-}
-
-
-sub wordsplit { # split a string into an array of words, but make sure to not split HTML tags
-# return [ split //, $_[0] ];
- my @a;
- my $in='';
- for (split /\s+/, $_[0]) {
- my $gt = () = />/g;
- my $lt = () = /</g;
- if($in && $gt > $lt) {
- push @a, $in.$_;
- $in='';
- } elsif($lt > $gt || $in) {
- $in .= $_.' ';
- } else {
- push @a, $_;
- };
- }
- push @a, $in if $in;
- return \@a;
-}
-
-sub cdiff { # obj1, obj2, @items->[ short, name, serialise, diff, [parsed_x, parsed_y] ]
- my($x, $y, @items, @c) = @_;
- # serialise = 0 -> integer, 1 -> string, CODEref -> code
-
- my $type = defined $$y{minage} ? 'r' : defined $$y{length} ? 'v' : 'p';
- my $pre = '<div id="revbrowse">'.
- ($$y{next} ? qq|<a href="/$type$$y{id}.$$y{next}" id="revnext">later revision -&gt;</a>| : '').
- ($x ? qq|<a href="/$type$$y{id}.$$x{rev}" id="revprev">&lt;- earlier revision</a>| : '').
- qq|<a href="/$type$$y{id}" id="revmain">$type$$y{id}</a>&nbsp;</div>|;
-
- if(!$x) { # just show info about the revision if there is no previous edit
- return $pre.qq|<div id="tmc"><b>Revision $$y{rev}</b> (<a href="/$type$$y{id}/edit?rev=$$y{rev}">edit</a>)<br />By |.userstr($y).q| on |.
- formatdate('%Y-%m-%d at %R', $$y{added}).'<br /><b>Edit summary:</b><br /><br />'.
- summary($$y{comments}, 0, '[no summary]').'</div>';
- }
- for (@items) {
- $_->[4] = !$_->[2] ? $x->{$_->[0]}||'0' : !ref($_->[2]) ? _hchar(wraplong($x->{$_->[0]}||'[empty]',60)) : &{$_->[2]}($x->{$_->[0]})||'[empty]';
- $_->[5] = !$_->[2] ? $y->{$_->[0]}||'0' : !ref($_->[2]) ? _hchar(wraplong($y->{$_->[0]}||'[empty]',60)) : &{$_->[2]}($y->{$_->[0]})||'[empty]';
- push(@c, $_) if $_->[4] ne $_->[5];
- if($_->[3] && $_->[4] ne $_->[5]) {
- my($rx,$ry,$ch) = ('','','u');
- for (sdiff(wordsplit($_->[4]), wordsplit($_->[5]))) {
- if($ch ne $_->[0]) {
- if($ch ne 'u') {
- $rx .= '</b>';
- $ry .= '</b>';
- }
- $rx .= '<b class="diff_del">' if $_->[0] eq '-' || $_->[0] eq 'c';
- $ry .= '<b class="diff_add">' if $_->[0] eq '+' || $_->[0] eq 'c';
- }
- $ch = $_->[0];
- $rx .= $_->[1].' ' if $ch ne '+';
- $ry .= $_->[2].' ' if $ch ne '-';
- }
- $_->[4] = $rx;
- $_->[5] = $ry;
- }
- }
- return $pre.'<table id="tmc"><thead><tr><td class="tc1">&nbsp;</td>'.
- qq|<td class="tc2"><b>Revision $$x{rev}</b> (<a href="/$type$$y{id}/edit?rev=$$x{rev}">edit</a>)<br />By |.userstr($x).' on '.formatdate('%Y-%m-%d at %R', $$x{added}).'</td>'.
- qq|<td class="tc3"><b>Revision $$y{rev}</b> (<a href="/$type$$y{id}/edit?rev=$$y{rev}">edit</a>)<br />By |.userstr($y).' on '.formatdate('%Y-%m-%d at %R', $$y{added}).'</td>'.
- '</tr><tr></tr><tr><td>&nbsp;</td><td colspan="2"><b>Edit summary of revision '.$$y{rev}.'</b><br /><br />'.summary($$y{comments}, 0, '[no summary]').'<br /><br /></td></tr></thead>'.
- join('',map{
- '<tr><td class="tc1">'.$_->[1].'</td><td class="tc2">'.$_->[4].'</td><td class="tc3">'.$_->[5].'</td></tr>'
- } @c).'</table>';
-}
-
-
-sub summary { # cmd, len, def
- return $_[2]||'' if !$_[0];
- my $res = '';
- my $len = 0;
- my $as = 0;
- my $raw = 0;
- (my $txt = $_[0]) =~ s/\r?\n/\n /g;
- for (split / /, $txt) {
- next if !defined $_ || $_ eq '';
- my $l = length;
- s/\&/&amp;/g;
- s/>/&gt;/g;
- s/</&lt;/g;
- if(!$raw && s/^\[raw\]//) {
- $l -= 5;
- $raw++;
- }
- if(!$raw) {
- $l -= 9 while(s/\[spoiler\]/<b class="spoiler">/i);
- $l -= 10 while(s/\[\/spoiler\]/<\/b>/i);
- while(s/\[url=((https?:\/\/|\/)[^\]>]+)\]/<a href="$1" rel="nofollow">/i) {
- $l -= length($1)+6;
- $as++;
- }
- if(!$as && s/(http|https):\/\/(.+[0-9a-zA-Z=\/])/<a href="$1:\/\/$2" rel="nofollow">link<\/a>/) {
- $l = 4;
- } elsif(!$as) {
- s/^(.*[^\w]|)([tdvpr][1-9][0-9]*)\.([1-9][0-9]*)([^\w].*|)$/$1<a href="\/$2.$3">$2.$3<\/a>$4/ ||
- s/^(.*[^\w]|)([tduvpr][1-9][0-9]*)([^\w].*|)$/$1<a href="\/$2">$2<\/a>$3/;
- }
- while(s/\[\/url\]/<\/a>/i) {
- $l -= 6;
- $as--;
- }
- }
- if(s/\[\/raw\]//) {
- $l -= 6;
- $raw=0;
- }
- $len += $l + 1;
- last if $_[1] && $len > $_[1];
- $res .= "$_ ";
- }
- $res =~ y/\n/ / if $_[1];
- $res =~ s/\n/<br \/>/g if !$_[1];
- $res =~ s/ +$//;
- $res .= '</a>' x $as if $as;
- $res .= '...' if $_[1] && $len > $_[1];
- return $res;
-}
-
-
-sub ttabs { # [vrpu], obj, sel
- my($t, $o, $s) = @_;
- $s||='';
- my @act = (
- !$s?'%s':'<a href="/%s">%1$s</a>',
- $$o{locked} ?
- '<b>locked for editing</b>' : (),
- $p{Authlock} && $t ne 'u' ?
- sprintf('<a href="/%%s/lock">%s</a>', $$o{locked} ? 'unlock' : 'lock') : (),
- $p{Authdel} && $t ne 'u' ? (
- sprintf('<a href="/%%s/hide"%s>%s</a>', $t eq 'v' ? ' id="vhide"' : '', $$o{hidden} ? 'unhide' : 'hide') ) : (),
- $t eq 'u' && $p{Authusermod} ? (
- '<a href="/%s/del" id="userdel">del</a>' ) : (),
- ($t eq 'u' && $p{Authusermod}) || ($t ne 'u' && (!$$o{locked} && !$$o{hidden}) || ($p{Authedit} && $p{Authlock})) ?
- ($s eq 'edit' ? 'edit' : '<a href="'.($p{Authedit}?'/%s/edit':'/u/register?n=1').'" '.($t eq 'v' || $t eq 'r' ? 'class="dropdown" rel="nofollow editDD"':'').'>edit</a>') : (),
-
- $t eq 'u' ? (
- $o->{flags} & $VNDB::UFLAGS->{list} ? ( $s eq 'list' ? 'list' : '<a href="/%s/list">list</a>', ) : (),
- $o->{flags} & $VNDB::UFLAGS->{list} ? ( $s eq 'wish' ? 'wishlist' : '<a href="/%s/wish">wishlist</a>', ) : (),
- ) : (),
-
- $t ne 'r' ? (
- $s eq 'disc' ? 'discussions' : '<a href="/t/%s">discussions</a>', ) : (),
-
- $p{Authhist} ?
- ($s eq 'hist' ? 'history' : '<a href="/%s/hist">history</a>') : (),
- );
- return '<p class="mod">&lt; '.join(' - ', map { sprintf $_, $t.$$o{id} } @act).' &gt;</p>'.(
- !$p{Authedit} ? qq|
-<div id="editDD" class="dropdown">
- <ul>
- <li><b>Not logged in</b></li>
- <li><a href="/u/login">Login</a></li>
- <li><a href="/u/register">Register</a></li>
- </ul>
-</div>
- | : $t eq 'v' ? qq|
-<div id="editDD" class="dropdown">
- <ul>
- <li><a href="/v$$o{id}/edit" rel="nofollow">Edit all</a></li>
- <li><a href="/v$$o{id}/edit?fh=info" rel="nofollow">General info</a></li>
- <li><a href="/v$$o{id}/edit?fh=cat" rel="nofollow">Categories</a></li>
- <li><a href="/v$$o{id}/edit?fh=rel" rel="nofollow">Relations</a></li>
- <li><a href="/v$$o{id}/edit?fh=img" rel="nofollow">Image</a></li>
- <li><a href="/v$$o{id}/edit?fh=scr" rel="nofollow">Screenshots</a></li>
- <li><a href="/v$$o{id}/add" rel="nofollow">Add release</a></li>
- </ul>
-</div>| : $t eq 'r' ? qq|
-<div id="editDD" class="dropdown">
- <ul>
- <li><a href="/r$$o{id}/edit" rel="nofollow">Edit all</a></li>
- <li><a href="/r$$o{id}/edit?fh=info" rel="nofollow">General info</a></li>
- <li><a href="/r$$o{id}/edit?fh=pnm" rel="nofollow">Platforms &amp; media</a></li>
- <li><a href="/r$$o{id}/edit?fh=prod" rel="nofollow">Producers</a></li>
- <li><a href="/r$$o{id}/edit?fh=rel" rel="nofollow">Relations</a></li>
- </ul>
-</div>| : ''
- );
-}
-
-
-# Uwaaaa~ ugly function!
-sub rlist_dd {
- my $r = shift;
- return
- qq|<div class="dropdown rlistdd" id="rlistDD$$r{id}"><ul><li><b>Release status</b></li>|.
- join('', map {
- $r->{rlist} && $_ == $r->{rlist}{rstat} ? qq|<li><b><acronym class="uicons r$_">&nbsp;</acronym>&nbsp;$$VNDB::RSTAT[$_]</b></li>|
- : qq|<li><a href="/r$$r{id}/list?r=$_"><acronym class="uicons r$_">&nbsp;</acronym>&nbsp;$$VNDB::RSTAT[$_]</a></li>|
- } 0..$#$VNDB::RSTAT).
- qq|</ul><ul><li><b>Play status</b></li>|.
- join('', map {
- $r->{rlist} && $_ == $r->{rlist}{vstat} ? qq|<li><b><acronym class="uicons v$_">&nbsp;</acronym>&nbsp;$$VNDB::VSTAT[$_]</b></li>|
- : qq|<li><a href="/r$$r{id}/list?v=$_"><acronym class="uicons v$_">&nbsp;</acronym>&nbsp;$$VNDB::VSTAT[$_]</a></li>|
- } 0..$#$VNDB::VSTAT).
- qq|</ul><ul class="full">|.
- ($r->{rlist} ? qq|<li class="center"><a href="/r$$r{id}/list?d=1">remove from my list</a></li>|
- : qq|<li class="center"><b>not in your list</b></li>|).
- qq|</ul></div>|;
-}
-
-
-my %pagetitles = (
- faq => 'Frequently Asked Questions',
- userlogin => 'Login',
- userreg => 'Register a new account',
- userpass => 'Forgot your password?',
- home => 'Visual Novel Database',
- pbrowse => 'Browse producers',
- userlist => 'Browse users',
- tindex => 'Discussion board index',
- ttag => sub {
- return ($p{ttag}{obj} ? 'Related discussions for ' : '').$p{ttag}{title} },
- tthread => sub {
- return $p{tthread}{t}{title} },
- tedit => sub {
- return $p{tedit}{p} ? 'Edit post' :
- $p{tedit}{t} ? 'Reply to thread' : 'Start a new thread' },
- userpage => sub {
- return 'User: '.$p{userpage}{user}{username} },
- vnlist => 'My visual novel list (old)',
- wlist => sub {
- return $p{wlist}{user}{username} eq $p{AuthUsername} ? 'My wishlist' : ($p{wlist}{user}{username}.'\'s wishlist'); },
- rlist => sub {
- return $p{rlist}{user}{username} eq $p{AuthUsername} ? 'My visual novel list' : ($p{rlist}{user}{username}.'\'s visual novel list'); },
- useredit => sub {
- return !$p{useredit}{adm} ? 'My account' : 'Edit '.$p{useredit}{form}{username}.'\'s account'; },
- ppage => sub {
- return $p{ppage}{prod}{name} },
- pedit => sub {
- return $p{pedit}{id} ? sprintf('Edit %s', $p{pedit}{form}{name}) : 'Add a new producer'; },
- vnedit => sub {
- return $p{vnedit}{id} ? sprintf('Edit %s', $p{vnedit}{form}{title}) : 'Add a new visual novel'; },
- redit => sub {
- return $p{redit}{id} ? sprintf('Edit %s', $p{redit}{rel}{title}) : sprintf('Add release to %s', $p{redit}{vn}{title}); },
- vnpage => sub { return $p{vnpage}{vn}{title}; },
- vnrg => sub { return 'Relations for '.$p{vnrg}{vn}{title} },
- vnstats => sub { return 'User statistics for '.$p{vnstats}{vn}{title} },
- vnbrowse => sub {
- return $p{vnbrowse}{chr} eq 'search' ? 'Visual novel search' :
- $p{vnbrowse}{chr} eq 'mod' ? 'Visual Novels awaiting moderation' :
- $p{vnbrowse}{chr} eq 'all' ? 'Browse all visual novels' :
- $p{vnbrowse}{chr} eq '0' ? 'Browse by char: Other' :
- sprintf 'Browse by char: %s', uc $p{vnbrowse}{chr}; },
- rpage => sub {
- return $p{rpage}{rel}{romaji} || $p{rpage}{rel}{title} },
- hist => sub {
- return !$p{hist}{id} || !$p{hist}{type} ? 'Recent changes' :
- $p{hist}{type} eq 'u' ? 'Recent changes by '.$p{hist}{title} : 'Edit history of '.$p{hist}{title}; },
- docs => sub { $p{docs}{title} },
- error => sub {
- $p{error}{err} eq 'notfound' ? '404 Page Not Found' : 'Error Parsing Form' },
-);
-sub gettitle{$p{$_}&&($p{PageTitle}=ref($pagetitles{$_}) eq 'CODE' ? &{$pagetitles{$_}} : $pagetitles{$_}) for (keys%pagetitles);}
-
-
-#
-# F O R M E R R O R H A N D L I N G
-#
-my %formerr_names = (
- # this list is rather incomplete...
- mail => 'Email',
- username => 'Username',
- userpass => 'Password',
- pass1 => 'Password',
- pass2 => 'Password (second)',
- title => 'Title',
- desc => 'Description',
- rel => 'Relation',
- romaji => 'Romanized title',
- lang => 'Language',
- web => 'Website',
- released => 'Release date',
- platforms => 'Platforms',
- media => 'Media',
- name => 'Name',
- vn => 'Visual novel relations',
- l_vnn => 'Visual-novels.net link',
- comm => 'Edit summary',
- msg => 'Message',
-);
-my @formerr_msgs = (
- sub { return sprintf 'Field "%s" is required.', @_ },
- sub { return sprintf '%s should have at least %d characters.', @_ },
- sub { return sprintf '%s is too large! Only %d characters allowed.', @_ },
- sub { return
- $_[1] eq 'mail' ? 'Invalid email address' :
- $_[1] eq 'url' ? 'Invalid URL' :
- $_[1] eq 'pname' ? sprintf('%s can only contain alfanumeric characters!', $_[0]) :
- $_[1] eq 'asciiprint' ? sprintf('Only ASCII characters are allowed at %s', $_[0]) :
- $_[1] eq 'int' ? sprintf('%s should be a number!', $_[0]) :
- $_[1] eq 'gtin' ? 'Not a valid JAN, UPC or EAN code!' : '';
- },
- sub { return sprintf '%s: invalid item selected', @_ },
- sub { return 'Invalid unicode, are you sure your browser works fine?' },
-);
-my %formerr_exeptions = (
- loginerr => 'Invalid username or password',
- badpass => 'Passwords do not match',
- usrexists => 'Username already exists, please choose an other one',
- mailexists => 'There already is a user with that email address, please request a new password if you forgot it',
- nomail => 'No user found with that email address',
- nojpeg => 'Image is not in JPEG or PNG format!',
- toolarge => 'Image is too large (in filesize), try to compress it a little',
- wrongtag => 'Wrong tag selected!',
-);
-sub formerr {
- my @err = ref $_[0] eq 'ARRAY' ? @{$_[0]} : ();
- return '' if $#err < 0;
- my @msgs;
- my $ret = '<span class="warning">
- Error:<ul>';
- $ret .= sprintf " <li>%s</li>\n",
- /^([a-z0-9_]+)-([0-9]+)(?:-(.+))?$/ ? &{$formerr_msgs[$2-1]}($formerr_names{$1}||$1, $3||'') : $formerr_exeptions{$_}
- foreach (@err);
- $ret .= "</ul>\n</span>\n";
-}
-
-#
-# F O R M C R E A T I N G
-#
-
-# args = [
-# {
-# type => $type,
-# %options
-# }, ...
-# ], $formobj
-#
-# $type $formobj %options ( required, [ optional ] )
-# error X ( )
-# startform ( action, [ upload ] )
-# endform ( )
-# input X ( short, name, [ class, default ] )
-# pass ( short, name )
-# upload ( short, name, [ class ] )
-# hidden X ( short, [ value ] )
-# textarea X ( short, name, [ rows, cols, class ] )
-# select X ( short, name, options, [ class ] ) # options = arrayref of hashes with keys: short, name
-# as X ( name )
-# trans X ( )
-# submit ( [ text, short ] )
-# sub ( title )
-# check X ( short, name, [ value ] )
-# static ( text, raw [ name, class ] )
-# date X ( short, name )
-#
-sub cform {
- my $obj = shift;
- my $frm = shift;
- my $ret = '';
- my $csub = '';
- for (@$obj) {
- $_->{class} ||= '';
- $_->{class} .= ' sf_'.$csub if $csub && $_->{class} !~ /nohid/;
- $_->{class} .= ' formhid' if $csub && $frm->{_hid} && !$frm->{_hid}{$csub} && $_->{class} !~ /nohid/;
- $_->{name} = '<i>*</i> '.$_->{name} if $_->{r};
-
- # error
- if($_->{type} eq 'error') {
- $ret .= formerr($frm->{_err});
- # startform
- } elsif($_->{type} eq 'startform') {
- $ret .= sprintf qq|<form action="/nospam?%s" method="post" accept-charset="utf-8"%s>\n|,
- $_->{action}, $_->{upload} ? ' enctype="multipart/form-data"' : '';
- $ret .= sprintf qq| <input type="hidden" class="hidden" name="fh" id="_hid" value="%s" />\n|,
- $frm->{_hid} ? _hchar(join(',', keys %{$frm->{_hid}})) : '' if $_->{fh};
- $ret .= qq|<p class="formnotice">Items denoted by a red asterisk (<i>*</i>) are required.</p>\n|
- if scalar grep { $_->{r} } @$obj;
- $ret .= "<ul>\n";
- # endform
- } elsif($_->{type} eq 'endform') {
- $ret .= qq|</ul></form>\n|;
- # input
- } elsif($_->{type} eq 'input') {
- $ret .= sprintf qq|<li%s>\n <label for="%s">%s</label>\n %s<input type="text" class="text" name="%2\$s" id="%2\$s" value="%s" />%s\n</li>\n|,
- $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{short}, $_->{name}, $_->{pre} ? '<i>'.$_->{pre}.'</i>' : '',
- _hchar($frm->{$_->{short}}?$frm->{$_->{short}}:$_->{default}), $_->{post} ? '<i>'.$_->{post}.'</i>' : '';
- # pass
- } elsif($_->{type} eq 'pass') {
- $ret .= sprintf qq|<li%s>\n <label for="%s">%s</label>\n <input type="password" class="text" name="%2\$s" id="%2\$s" />\n</li>\n|,
- $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{short}, $_->{name};
- # upload
- } elsif($_->{type} eq 'upload') {
- $ret .= sprintf qq|<li%s>\n <label for="%s">%s</label>\n <input type="file" class="text" name="%2\$s" id="%2\$s" />\n</li>\n|,
- $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{short}, $_->{name};
- # hidden
- } elsif($_->{type} eq 'hidden') {
- $ret .= sprintf qq| <input type="hidden" class="hidden" name="%s" id="%1\$s" value="%s" />\n|,
- $_->{short}, _hchar($_->{value} || $frm->{$_->{short}});
- # textarea
- } elsif($_->{type} eq 'textarea') {
- $ret .= sprintf qq|<li%s>\n <label for="%s">%s</label>\n <textarea name="%2\$s" id="%2\$s" rows="%s" cols="%s">%s</textarea>\n</li>\n|,
- $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{short}, $_->{name}, $_->{rows}||15, $_->{cols}||70, txt($frm->{$_->{short}});
- # select
- } elsif($_->{type} eq 'select') {
- $ret .= sprintf qq|<li%s>\n <label for="%s">%s</label>\n <select name="%2\$s" id="%2\$s">\n%s</select>\n</li>\n|,
- $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{short}, $_->{name}, eval {
- my $r='';
- for my $s (@{$_->{options}}) {
- $r .= sprintf qq| <option value="%s"%s>%s</option>\n|,
- $s->{short}, defined $frm->{$_->{short}} && $frm->{$_->{short}} eq $s->{short} ? ' selected="selected"' : '', $s->{name};
- }
- return $r;
- };
- # jssel
- } elsif($_->{type} eq 'jssel') {
- (my $oname = $_->{name}) =~ s/^<i>\*<\/i>//;
- $ret .= sprintf
- qq|<li%s>\n|
- .qq| <label for="%s_select">%s</label>\n|
- .qq| <select name="%s_select" id="%s_select" multiple="multiple" size="5" class="multiple">\n|
- .qq| <option value="0_new" style="font-style: italic">Add %s...</option>\n|
- .qq| </select>\n|
- .qq| <div id="%s_conts">\n|
- .qq| Loading...\n|
- .qq| </div>\n|
- .qq| <input type="hidden" name="%s" id="%s" class="hidden" value="%s" />\n|
- .qq|</li>\n|,
- $_->{class} ? ' class="'.$_->{class}.'"' : '',
- $_->{sh}, $_->{name}, $_->{sh}, $_->{sh}, $oname, $_->{sh}, $_->{short}, $_->{short}, _hchar($frm->{$_->{short}});
- # submit
- } elsif($_->{type} eq 'submit') {
- $ret .= sprintf qq|<li class="nolabel">\n <br /><input type="submit" class="submit" value="%s"%s />\n </li>\n|,
- $_->{text} || 'Verstuur', $_->{short} ? sprintf(' name="%s" id="%1$s"', $_->{short}) : '';
- # sub
- } elsif($_->{type} eq 'sub') {
- $ret .= sprintf qq|<li class="subform">\n <a href="#" class="s_%s">%s %s</a>\n</li>\n|,
- $_->{short}, $frm->{_hid} && !$frm->{_hid}{$_->{short}} ? '&#9656;' : '&#9662;', $_->{title};
- $csub = $_->{short};
- # check
- } elsif($_->{type} eq 'check') {
- $ret .= sprintf qq|<li class="nolabel%s">\n <input type="checkbox" name="%s" id="%2\$s" value="%s"%s />\n <label for="%2\$s" class="checkbox">%s</label>\n</li>\n|,
- $_->{class} ? ' '.$_->{class} : '',
- $_->{short}, $_->{value} || 'true', $frm->{$_->{short}} ? ' checked="checked"' : '', $_->{name};
- # static
- } elsif($_->{type} eq 'static') {
- $ret .= $_->{name}
- ? sprintf qq|<li%s>\n <label>%s</label>\n <p>%s</p>\n</li>|, $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{name}, $_->{text}
- : $_->{raw}
- ? sprintf qq|<li%s>\n %s\n</li>|, $_->{class} ? ' class="'.$_->{class}.'"' : '', $_->{text}
- : sprintf qq|<li class="nolabel%s">\n %s\n</li>|, $_->{class} ? ' '.$_->{class} : '', $_->{text};
- # date
- } elsif($_->{type} eq 'date') {
- $ret .= sprintf qq|<li class="date%s">\n <label for="%s">%s</label>\n|,
- $_->{class} ? ' '.$_->{class} : '', $_->{short}, $_->{name};
- $ret .= sprintf qq| <select name="%s" id="%s">\n%s</select>\n|,
- $_->{short}, $_->{short}, eval {
- my $r='';
- for my $s (0, 1980..((localtime())[5]+1905), 9999) {
- $r .= sprintf qq| <option value="%s"%s>%s</option>\n|,
- $s, $frm->{$_->{short}} && ($frm->{$_->{short}}[0]||0) == $s ? ' selected="selected"' : '',
- !$s ? '-year-' : $s < 9999 ? $s : 'TBA';
- }
- return $r;
- };
- $ret .= sprintf qq| <select name="%s" id="%s_m">\n%s</select>\n|,
- $_->{short}, $_->{short}, eval {
- my $r='';
- for my $s (0..12) {
- $r .= sprintf qq| <option value="%s"%s>%s</option>\n|,
- $s, $frm->{$_->{short}} && ($frm->{$_->{short}}[1]||0) == $s ? ' selected="selected"' : '',
- $s ? $Time::CTime::MonthOfYear[$s-1] : '-month-';
- }
- return $r;
- };
- $ret .= sprintf qq| <select name="%s" id="%s_d">\n%s</select>\n</li>\n|,
- $_->{short}, $_->{short}, eval {
- my $r='';
- for my $s (0..31) {
- $r .= sprintf qq| <option value="%s"%s>%s</option>\n|,
- $s, $frm->{$_->{short}} && ($frm->{$_->{short}}[2]||0) == $s ? ' selected="selected"' : '',
- $s ? $s : '-day-';
- }
- return $r;
- };
- }
- }
- return $ret;
-}
-
-]]
diff --git a/data/tpl/docs b/data/tpl/docs
deleted file mode 100644
index 6aeefe81..00000000
--- a/data/tpl/docs
+++ /dev/null
@@ -1,4 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-<div id="dpage">
-[[= $d{content} ]]
-</div>
diff --git a/data/tpl/error b/data/tpl/error
deleted file mode 100644
index 995293d1..00000000
--- a/data/tpl/error
+++ /dev/null
@@ -1,10 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-[[ if($d{err} eq 'notfound') { ]]
- The page you were looking for could not be found!
-
-[[ } elsif($d{err} eq 'formerr') { ]]
-<span class="warning">
- <b>Error:</b> The form could not be sent, please make sure you have Javascript
- enabled in your browser!
-</span>
-[[ } ]]
diff --git a/data/tpl/hist b/data/tpl/hist
deleted file mode 100644
index fd8863b4..00000000
--- a/data/tpl/hist
+++ /dev/null
@@ -1,102 +0,0 @@
-[[= $d{type} ? ttabs($d{type}, $d{obj}, 'hist') : '' ]]-
-<h2 class="rss">[[: $p{PageTitle} ]]</h2>
-[[ if($d{type} eq 'u' && $#{$d{hist}} < 0) { ]]
-<p>
- You haven't made any changes yet.
-</p>
-[[ } ]]
-<br /><br />
-
-[[
- my $url = !$d{type} ? '/hist' : '/'.$d{type}.$d{id}.'/hist';
- my $furl = $url.'?e='.$d{sele}.';t=';
- my $eurl = $url.'?t='.$d{selt}.';e=';
- my $purl = !$d{type}?$eurl.$d{sele}:$d{type} eq 'v' && $d{seli} ? $url.'?i=1' : $url;
- my $rurl = $url.'/rss.xml'.(!$d{type}?'?t='.$d{selt}.';e='.$d{sele}:$d{type} eq 'v' && $d{seli} ? '?i=1' : '');
- local $_ = $d{selt};
- my @fil = (
- /a/ ? 'all items' : '<a href="%sa">all items</a>',
- /v/ ? 'visual novels' : '<a href="%sv">visual novels</a>',
- /r/ ? 'releases' : '<a href="%sr">releases</a>',
- /p/ ? 'producers' : '<a href="%sp">producers</a>',
- );
- local $_ = $d{sele};
- my @edi = (
- /0/ ? 'all changes' : '<a href="%s0">all changes</a>',
- /2/ ? 'edits only' : '<a href="%s2">edits only</a>',
- /1/ ? 'newly created pages only' : '<a href="%s1">newly created pages only</a>',
- );
- local $_ = $d{seli};
- my @inc = (
- /0/ ? 'exclude' : '<a href="'.$url.'">exclude</a>',
- /1/ ? 'include' : '<a href="'.$url.'?i=1">include</a>',
- );
-]]
-
-[[ if(!$d{type}) { ]]-
-<p class="browse">
- [[= join(' | ', map { sprintf $_, $furl } @fil) ]]<br />
- [[= join(' | ', map { sprintf $_, $eurl } @edi) ]]<br /><br /><br />
-</p>
-[[ } if($d{type} eq 'v') { ]]-
-<p class="browse">
- ([[= join(' | ', @inc) ]]) edits of releases.
-</p>
-[[ } ]]
-
-[[ if($d{act} eq 'r') { ]]
-<span class="msg">
- Performed the mass-revert, please see the following list for details.
-</span>
-[[ } elsif($d{act} eq 'd') { ]]
-<span class="msg">
- The following edits have been completely deleted.
-</span>
-[[ } ]]-
-
-
-<a class="rss" href="[[= $rurl ]]">RSS</a>
-[[= pagebut($purl) ]]
-[[ if(0 and $p{Authmod} || $p{Authdel}) { ]]
-<form method="post" action="[[= $purl ]]" class="tblf">
-[[ } ]]
-<table id="thi">
- <thead><tr>
- <td class="tc1" colspan="2">Rev.</td>
- <td class="tc2">Date</td>
- [[ if($d{type} ne 'u' || $d{act}) { ]]-
- <td class="tc3">User</td>[[ } ]]-
- [[ if(!$d{type} || $d{type} eq 'u' || $d{act}) { ]]-
- <td class="tc4">Page</td>[[ } ]]-
- [[ if($d{type} && !$d{act}) { ]]-
- <td class="tc5">Summary</td>[[ } ]]-
- [[ if($d{act} eq 'r') { ]]-
- <td class="tc5">Action</td>[[ } ]]-
- [[ if(0 and $p{Authmod}) { ]]-
- <td class="tc6"><input type="checkbox" id="checkall" name="sel" value="all" /></td>[[ } ]]-
- </tr></thead>
-
- [[ for (@{$d{hist}}) { my $t = (qw|v r p|)[$_->{type}]; ]]-
- <tr>
- <td class="tc1_1"><a href="/[[= $t.$_->{iid}.'.'.$_->{rev} ]]">[[= $_->{rev} == 1 ? "<b>$t$_->{iid}</b>" : $t.$_->{iid} ]]</a></td>
- <td class="tc1_2"><a href="/[[= $t.$_->{iid}.'.'.$_->{rev} ]]">.[[= $_->{rev} == 1 ? '<b>'.$_->{rev}.'</b>' : $_->{rev} ]]</a></td>
- <td class="tc2">[[= formatdate('%Y-%m-%d %R', $_->{added}, 'dh') ]]</td>
- [[ if($d{type} ne 'u' || $d{act}) { ]]-
- <td class="tc3">[[= userstr $_ ]]</td>[[ } ]]-
- [[ if(!$d{type} || $d{type} eq 'u' || $d{act}) { ]]-
- <td class="tc4"><a href="/[[= $t.$_->{iid} ]].[[= $_->{rev} ]]" title="[[: $_->{ioriginal}||$_->{ititle} ]]">[[: shorten $_->{ititle}, 30 ]]</a></td>[[ } ]]-
- [[ if($d{type} && !$d{act}) { ]]-
- <td class="tc5">[[= summary($_->{comments}, $d{type} eq 'u' ? 40 : 60)||'[empty]' ]]</td>[[ } ]]-
- [[ if($d{act} eq 'r') { ]]-
- <td class="tc5">[[: $_->{_status} ]]</td>[[ } ]]-
- [[ if(0 and $p{Authmod} && !$d{act}) { ]]-
- <td class="tc6"><input type="checkbox" name="sel" value="[[= $_->{id} ]]" /></td>[[ } ]]-
- </tr>
- [[ } ]]
-
-</table>
-[[ if(0 and $p{Authmod}) { ]]<input type="submit" class="right" name="post" value="Mass revert" />[[ } ]]
-[[ if(0 and $p{Authdel}) { ]]<input type="submit" class="right" name="post" value="Mass delete" id="massdel" />[[ } ]]
-[[ if(0 and $p{Authmod} || $p{Authdel}) { ]]</form>[[ } ]]
-[[= pagebut($purl) ]]
-
diff --git a/data/tpl/home b/data/tpl/home
deleted file mode 100644
index 3b36246d..00000000
--- a/data/tpl/home
+++ /dev/null
@@ -1,66 +0,0 @@
-<h2>Welcome to VNDB - The Visual Novel Database!</h2>
-<p class="desc">
- <br />
- VNDB.org strives to be a comprehensive database for information about visual novels and
- eroge.<br />
- This website is built as a wiki, meaning that anyone can freely add and contribute information
- to the database, allowing us to create the largest, most accurate and most up-to-date visual novel
- database on the web.<br />
- Registered users are also able to keep track of a personal list of games they want to play or have finished
- and they can vote on all visual novels.<br /><br />
-
- Feel free to <a href="/v">browse around</a>, <a href="/u/register">register an account</a>
- or to participate in the discussions about visual novels or VNDB on our <a href="/t">discussion board</a>.
-</p>
-
-[[ if($d{an}{title}) { ]]-
-<h3 class="home">[[: $d{an}{title} ]]-
- <p class="actions">[[= age $d{anpost}{date} ]]</p></h3>
-<p class="desc">
- [[= summary $d{anpost}{msg}, 200 ]]
- <br />
- <a href="/t[[= $d{an}{id} ]]">Read more...</a> - <a href="/t/an">news archive</a>.
-</p>
-[[ } ]]-
-
-<ul class="home">
- <li><b>Recent changes</b></li>
- [[ for (@{$d{recentedits}}) { my $t = (qw|v r p|)[$_->{type}]; ]]-
- <li>[[= $t ]]:<a href="/[[= $t.$_->{iid}.'.'.$_->{rev} ]]" title="[[: $_->{ioriginal}||$_->{ititle} ]]">[[: shorten $_->{ititle}, 30 ]]</a></li>
- [[ } ]]-
-</ul>
-
-<ul class="home">
- <li><b>Recent posts</b></li>
- [[ for (@{$d{recentposts}}) { ]]-
- <li><a href="/t[[= $_->{id}.'.'.$_->{count} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 25 ]]</a> <i>[[= age $_->{ldate}, 1 ]]</i></li>
- [[ } ]]-
-</ul>
-
-<ul class="home">
- <li><b>Upcoming releases</b></li>
- [[ for (@{$d{upcomingrel}}) { ]]-
- <li>[[= datestr $_->{released}, 1 ]]- <a href="/r[[= $_->{id} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 25 ]]</a></i></li>
- [[ } ]]-
-</ul>
-
-<ul class="home break">
- <li><b>Recently added visual novels</b></li>
- [[ for (@{$d{recentvns}}) { ]]-
- <li><a href="/v[[= $_->{iid} ]]" title="[[: $_->{ioriginal}||$_->{ititle} ]]">[[: shorten $_->{ititle}, 30 ]]</a></li>
- [[ } ]]-
-</ul>
-
-<ul class="home">
- <li><b>Random visual novels</b></li>
- [[ for (@{$d{randomvns}}) { ]]-
- <li><a href="/v[[= $_->{id} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 30 ]]</a></li>
-[[ } ]]-
-</ul>
-
-<ul class="home">
- <li><b>Just released</b></li>
- [[ for (@{$d{justrel}}) { ]]-
- <li>[[= datestr $_->{released}, 1 ]]- <a href="/r[[= $_->{id} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 25 ]]</a></i></li>
- [[ } ]]-
-</ul>
diff --git a/data/tpl/main b/data/tpl/main
deleted file mode 100644
index a9c4a69d..00000000
--- a/data/tpl/main
+++ /dev/null
@@ -1,161 +0,0 @@
-[[+ defs.pl ]]
-[[ %p = %{$X->{page}}; gettitle(); ]]
-
-<!DOCTYPE html
- PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
-
-<head>
- <title>[[: $p{PageTitle} ]]- :: VNDB</title>
- <link href="[[: $p{st} ]]/files/style.css?[[= $VNDB::VERSION ]]" rel="stylesheet" type="text/css" media="screen" />
- <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
-[[ if($p{redit} || $p{vnedit}) { ]]-
- <script src="[[: $p{st} ]]/files/dyna.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script>
-[[ } ]]-
- <script src="[[: $p{st} ]]/files/def.js?[[= $VNDB::VERSION ]]" type="text/javascript"></script>
-[[ if(0 && $p{devshit}) { ]]-
- <link rel="icon" href="/favicon.gif" type="image/gif" />
- <meta name="robots" content="noindex, nofollow" />
-[[ } elsif(
- grep($p{$_}, qw| userlist userpage userlogin userreg userpass vnlist rlist wlist hist |)
- || ($p{ttag} && $p{ttag}{iid})
- || ($p{vnpage} && $p{vnpage}{page} eq 'stats')
- || grep { $p{$_} && $p{$_}{change} } qw|vnpage ppage rpage|
- ) { ]]-
- <meta name="robots" content="noindex, follow" />
-[[ }]]-
-
-[[if($p{hist}){ ]]
- <link rel="alternate" type="application/rss+xml" title="Recent changes" href="
- [[= (!$p{hist}{type}?'/hist':'/'.$p{hist}{type}.$p{hist}{id}.'/hist').'/rss.xml'.(!$p{hist}{type}?'?t='.$p{hist}{selt}.';e='.$p{hist}{sele}:$p{hist}{type} eq 'v' && $p{hist}{seli} ? '?i=1':'') ]]" />
-[[ } ]]-
-</head>
-
-<body>
-<div id="header">
- <form id="search" method="get" action="/v/search">
- <fieldset>
- <legend>Search</legend>
- <input id="searchfield" type="text" name="sq" value="search" style="color: #999" />
- <input id="searchsubmit" type="submit" value="Search" />
- </fieldset>
- </form>
- <h1><a href="http://vndb.org/">vndb.org</a> / #vndb @ irc.synirc.net <a href="/">
- [[ if($p{devshit}) { ]]<b style="color: red">The VNDB.org Testing Grounds</b>[[ } else { ]]<b>The Visual Novel Database</b>[[ } ]]</a></h1>
-</div>
-
-
-<div id="page">
-
-<div id="content">
-[[ # = noindex-tag (see above) ]]
-[[ if($p{home}) { %d = %{$p{home}}; ]] [[+ home ]][[ } ]]
-[[ if($p{userlogin}) { %d = %{$p{userlogin}}; ]] [[+ userlogin ]][[ } ]]
-[[ if($p{userreg}) { %d = %{$p{userreg}}; ]] [[+ userreg ]][[ } ]]
-[[ if($p{userpass}) { %d = %{$p{userpass}}; ]] [[+ userpass ]][[ } ]]
-[[ if($p{useredit}) { %d = %{$p{useredit}}; ]] [[+ useredit ]][[ } ]]
-[[ if($p{userlist}) { %d = %{$p{userlist}}; ]] [[+ userlist ]][[ }# ]]
-[[ if($p{userpage}) { %d = %{$p{userpage}}; ]] [[+ userpage ]][[ }# ]]
-[[ if($p{vnpage}) { %d = %{$p{vnpage}}; ]] [[+ vnpage ]][[ } ]]
-[[ if($p{vnedit}) { %d = %{$p{vnedit}}; ]] [[+ vnedit ]][[ } ]]
-[[ if($p{redit}) { %d = %{$p{redit}}; ]] [[+ redit ]][[ } ]]
-[[ if($p{vnbrowse}) { %d = %{$p{vnbrowse}}; ]] [[+ vnbrowse ]][[ } ]]
-[[ if($p{pbrowse}) { %d = %{$p{pbrowse}}; ]] [[+ pbrowse ]][[ } ]]
-[[ if($p{pedit}) { %d = %{$p{pedit}}; ]] [[+ pedit ]][[ } ]]
-[[ if($p{ppage}) { %d = %{$p{ppage}}; ]] [[+ ppage ]][[ } ]]
-[[ if($p{vnlist}) { %d = %{$p{vnlist}}; ]] [[+ vnlist ]][[ }# ]]
-[[ if($p{rlist}) { %d = %{$p{rlist}}; ]] [[+ rlist ]][[ }# ]]
-[[ if($p{wlist}) { %d = %{$p{wlist}}; ]] [[+ wlist ]][[ }# ]]
-[[ if($p{hist}) { %d = %{$p{hist}}; ]] [[+ hist ]][[ }# ]]
-[[ if($p{rpage}) { %d = %{$p{rpage}}; ]] [[+ rpage ]][[ } ]]
-[[ if($p{docs}) { %d = %{$p{docs}}; ]] [[+ docs ]][[ } ]]
-[[ if($p{tindex}) { %d = %{$p{tindex}}; ]] [[+ tindex ]][[ } ]]
-[[ if($p{ttag}) { %d = %{$p{ttag}}; ]] [[+ ttag ]][[ }# ]]
-[[ if($p{tthread}) { %d = %{$p{tthread}}; ]] [[+ tthread ]][[ } ]]
-[[ if($p{tedit}) { %d = %{$p{tedit}}; ]] [[+ tedit ]][[ } ]]
-[[ if($p{error}) { %d = %{$p{error}}; ]] [[+ error ]][[ } ]]
-</div>
-
-
-<div id="side"><div><div>
-
- <h2>Menu</h2>
- <ul>
- <li><a href="/">Home</a></li>
- <li><a href="/v">Browse</a> | <a href="/v/search">Search</a></li>
- <li><a href="/p">Producers</a></li>
- <li><a href="/u/list">Users</a></li>
- <li><a href="/hist">Recent changes</a></li>
- <li><a href="/t">Discussion board</a></li>
- <li><a href="/d6">FAQ</a></li>
- </ul>
-
--[[ if(!$p{AuthLoggedin}) { ]]-
- <h2>Login</h2>
- <form method="post" action="/nospam?/u/login" id="loginform">
- <fieldset>
- <legend>Login</legend>
- <input type="text" id="usrname" name="username" />
- <input type="password" id="usrpass" name="userpass" />
- <input type="submit" value="Login" />
- </fieldset>
- </form>
- <p>
- <a href="/u/register">register</a> or <a href="/u/newpass">forgot password?</a>
- </p>
-[[ } else { ]]-
- <h2>User menu</h2>
- <ul>
- <li><a href="/u[[= $p{AuthId} ]]">[[: $p{AuthUsername} ]]</a> ([[: $p{AuthRankname} ]])</li>
- <li><a href="/u[[= $p{AuthId} ]]/edit">My profile</a></li>
- <li><a href="/u[[= $p{AuthId} ]]/list">My visual novel list</a></li>
- [[ if($p{AuthOldList}) { ]]-
- <li><a href="/u[[= $p{AuthId} ]]/vlist">My visual novel list (old)</a></li>[[ } ]]-
- <li><a href="/u[[= $p{AuthId} ]]/wish">My wishlist</a></li>
- <li><a href="/t/u[[= $p{AuthId} ]]">My messages</a></li>
- <li><a href="/u[[= $p{AuthId} ]]/hist">My recent changes</a></li>
- [[ if($p{Authedit}) { ]]-
- <li>&nbsp;</li>
- <li><a href="/v/new">Add visual novel</a></li>
- <li><a href="/p/add">Add producer</a></li>
- [[ } ]]
- <li>&nbsp;</li>
- <li><a href="/u/logout">Logout</a></li>
- </ul>
-[[ } ]]-
-
--[[ #</div></div><div><div> ]]
- <h2>Statistics</h2>
- <ul>
- <li><b>[[= $p{Statvn}||0 ]]</b> visual novels</li>
- <li><b>[[= $p{Statproducers}||0 ]]</b> producers</li>
- <li><b>[[= $p{Statreleases}||0 ]]</b> releases</li>
- <li><b>[[= $p{Statusers}||0 ]]</b> users</li>
- </ul>
-[[ if(0) { ]] <h2>Most popular</h2>
- <ul>[[ for (@{$p{popular}}) { ]]-
- <li><a href="/v[[: $_->{id} ]]" title="[[: $_->{title} ]]">[[: length($_->{title})>30 ? (substr($_->{title}, 0, 27).'...') : $_->{title} ]]</a></li>[[ } ]]-
- <li class="more"><a href="/v/all?s=votes&amp;o=d">More...</a></li>
- </ul>[[ } ]]-
-</div></div></div>
-
-</div>
-
-<div id="footer">
- <p>
- vndb v[[: $VNDB::VERSION ]]- |
- <a href="/d7">about us</a> |
- <a href="mailto:contact@vndb.org">contact@vndb.org</a> (english only) |
- designed by <a href="http://www.freecsstemplates.org/">free css templates</a>.
- </p>
-</div>
-
--[[ if(0 && $p{devshit}) { ]]-
- <pre id="debug">SQL Queries used:<br />
-[[= $p{devshit} ]]
-</pre>
-[[ } ]]-
-
-</body>
-</html>
diff --git a/data/tpl/pbrowse b/data/tpl/pbrowse
deleted file mode 100644
index 8d2604c3..00000000
--- a/data/tpl/pbrowse
+++ /dev/null
@@ -1,45 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-<p class="chr">
- -[[= $d{chr} ne 'all' ? '<a href="/p/all">all</a>' : 'all' ]]- |
- [[ for('a'..'z', 0) { ]]-
- -[[ if($d{chr} eq $_) { ]][[= $_?$_:'#' ]][[ } else { ]]<a href="/p/[[= $_ ]]">[[= $_?$_:'#' ]]</a>[[ } ]]
- [[ } ]]-
- <form id="psearch" method="get" action="/p" accept-charset="UTF-8">
- <fieldset>
- <input type="text" name="q" id="q" value="[[: $d{query} ]]" class="text"
- /><input type="submit" value="Search!" />
- </fieldset>
- </form>
-</p>
-
--[[ if($#{$d{prods}} < 0) { ]]
-<p>
- No results again, life sucks... :'(
-</p>
-[[ } else {
- my $url = sprintf '/p/%s', $d{chr};
- $url .= '?q='.$d{query} if $d{query};
-]]
-[[= pagebut($url) ]]
-<table id="tpd">
- <thead><tr>
- <td class="tc1">Name</td>
- <td class="tc2">Type</td>
- <td class="tc3">Website</td>
- </tr></thead>
-[[ for (@{$d{prods}}) { ]]-
- <tr>
- <td class="tc1">
- <acronym class="icons lang -[[= $_->{lang} ]]" title="[[: $VNDB::LANG->{$_->{lang}} ]]">&nbsp;</acronym><a
- href="/p[[= $_->{id} ]]" title="[[: $_->{original}||$_->{name} ]]">[[: $_->{name} ]]</a></td>
- <td class="tc2">[[: $VNDB::PROT->{$_->{type}} ]]</td>
- <td class="tc3">
- [[ if($_->{website}) { ]]
- <a href="[[: $_->{website} ]]">[[: shorten $_->{website}, 50 ]]
- [[ } else { ]]---[[ } ]]
- </td>
- </tr>
-[[ } ]]-
-</table>
-[[= pagebut($url) ]]
-[[ } ]]
diff --git a/data/tpl/pedit b/data/tpl/pedit
deleted file mode 100644
index 56c06b92..00000000
--- a/data/tpl/pedit
+++ /dev/null
@@ -1,44 +0,0 @@
-[[= $d{id} ? ttabs('p', $d{prod}, 'edit') : '' ]]
-<h2>[[: $p{PageTitle} ]]</h2>
--[[ if(!$d{id}) { ]]
- <span class="msg">
- Please search the database before adding a new producer in order to prevent duplicate entries.
- </span>
-[[ } else { ]]
- <span class="msg">
- Please check the <a href="/t/p[[= $d{id} ]]">discussion board</a> <b>before</b> making
- any changes!
- </span>
-[[ } if($d{id} && $d{prod}{cid} != $d{prod}{latest}) { ]]
- <span class="warning">
- You are editing an old revision of this producer. If you save it, all changes made after
- -[[= formatdate('%Y-%m-%d %R', $d{prod}{added}) ]]- will be removed!
- </span>
-[[ } ]]
-
--[[= cform([
- { type => 'error' },
- { type => 'startform', action => $d{id} ? '/p'.$d{id}.'/edit' : '/p/add' },
-
- { type => 'sub', title => 'General info', short => 'info' },
- { type => 'select', name => 'Type', short => 'type', r=>1, options => [ map {
- { short => $_, name => $VNDB::PROT->{$_} } } sort keys %$VNDB::PROT ] },
- { type => 'input', name => 'Name (romaji)', short => 'name', r=>1 },
- { type => 'input', name => 'Original name', short => 'original' },
- { type => 'static', text => q|
- The original name of the producer, leave blank if it is already in the Latin alphabet.<br /><br />| },
-
- { type => 'select', name => 'Primary language', short => 'lang', r=>1, options => [ map {
- ({ short => $_, name => sprintf '%s (%s)', $_, $VNDB::LANG->{$_} }) } sort keys %{$VNDB::LANG} ] },
-
- { type => 'input', name => 'Website', short => 'website' },
- { type => 'textarea', name => 'Description', short => 'desc', rows => 7, cols => 60 },
-
- { type => 'sub', title => 'Edit summary', short => 'com' },
- { type => 'textarea', name => 'Edit summary', short => 'comm', rows => 3, cols => 60 },
- { type => 'static', text => 'Please explain your modifications and cite all sources.' },
-
- { type => 'submit', text => $d{id} ? 'Edit' : 'Add' },
- { type => 'endform' },
-
-], $d{form}) ]]
diff --git a/data/tpl/ppage b/data/tpl/ppage
deleted file mode 100644
index e0a1fa08..00000000
--- a/data/tpl/ppage
+++ /dev/null
@@ -1,55 +0,0 @@
-[[= ttabs('p', $d{prod}) ]]
-<h2>[[: $p{PageTitle} ]]</h2>
-[[ if($d{prod}{original}) { ]]<h3 class="alttitle">[[: $d{prod}{original} ]]</h3>[[ } ]]
-
-[[ if($d{prod}{hidden}) { ]]-
- <span class="warning">
- This item has been deleted from the database. File a request on the
- <a href="/t/p[[= $d{prod}{id} ]]">discussion board</a> to undelete this page.
- </span>
-[[ } ]]
-[[ if(!$d{prod}{hidden} || $p{Authdel}) { ]]-
-
-
-
-[[ if($d{change}) { ]]
-[[= cdiff($d{prev}, $d{prod},
- [ type => 'Type', sub { $VNDB::PROT->{$_[0]} } ],
- [ name => 'Name (romaji)', 1 ],
- [ original => 'Original name', 1 ],
- [ lang => 'Language', sub { $VNDB::LANG->{$_[0]} } ],
- [ website => 'Website', 1 ],
- [ desc => 'Description', 1, 1 ],
- ) ]]
-[[ } ]]
-
-<dl>
- <dt>Type</dt><dd>[[: $VNDB::PROT->{$d{prod}{type}} ]]</dd>
- <dt>Primary lang.</dt><dd>[[: $VNDB::LANG->{$d{prod}{lang}} ]]</dd>
-[[ if($d{prod}{website}) { ]]-
- <dt>Links</dt><dd><a href="[[: $d{prod}{website} ]]">Official homepage</a></dd>[[ } ]]-
-</dl>
-
--[[ if($d{prod}{desc}) { ]]
-<p>[[= summary($d{prod}{desc}) ]]<br /><br /></p>
-[[ } ]]
-
-
-<h3>Visual novel relations</h3>
-[[ if($#{$d{vn}} < 0) { ]]-
-<p>
- We have currently no visual novels related to this producer.
-</p>
-[[ } else { ]]-
-<ul>
- [[ for (@{$d{vn}}) { ]]-
- <li><a href="/v[[= $_->{id} ]]">[[: $_->{title} ]]</a>
- [[ if($_->{date} ne "0000-00-00") { ]]- ([[= datestr($_->{date}) ]])[[ } ]]
- </li>
- [[ } ]]-
-</ul>
-[[ } ]]
-
-
-
-[[ } ]]
diff --git a/data/tpl/redit b/data/tpl/redit
deleted file mode 100644
index 32d618e3..00000000
--- a/data/tpl/redit
+++ /dev/null
@@ -1,69 +0,0 @@
-[[= $d{id} ? ttabs('r', $d{rel}, 'edit') : ttabs('v', $d{vn}, 'edit') ]]-
-<h2>[[: $p{PageTitle} ]]</h2>
-
-[[ if($d{id}) { ]]
- <span class="msg">
- Please check the <a href="/t/v[[= $d{rel}{vn}[0]{vid} ]]">discussion board</a> <b>before</b> making
- any changes!
- </span>
-[[ } if($d{id} && $d{rel}{cid} != $d{rel}{latest}) { ]]
- <span class="warning">
- You are editing an old revision of this producer. If you save it, all changes made after
- -[[= formatdate('%Y-%m-%d %R', $d{rel}{added}) ]]- will be removed!
- </span>
-[[ } ]]
-
-[[= cform( [
- { type => 'error' },
- { type => 'startform', action => $d{id} ? sprintf('/r%d/edit', $d{rel}{id}) : '/v'.$d{vn}{id}.'/add', fh => 1 },
-
- { type => 'sub', title => 'General info', short => 'info' },
- { type => 'select', name => 'Type', short => 'type', r=>1, options => [ map {
- ({ short => $_, name => $VNDB::RTYP->[$_] }) } 0..$#{$VNDB::RTYP} ] },
-
- { type => 'input', name => 'Title (romaji)', short => 'title', r=>1 },
- { type => 'input', name => 'Original title', short => 'original' },
- { type => 'static', text => q|
- The original title of this release, leave blank if it already is in the Latin alphabet.<br /><br />| },
-
- { type => 'select', name => 'Language', short => 'language', r=>1, options => [ map {
- ({ short => $_, name => sprintf '%s (%s)', $_, $VNDB::LANG->{$_} }) } sort keys %{$VNDB::LANG} ] },
-
- { type => 'input', name => 'JAN/UPC/EAN', short => 'gtin' },
- { type => 'input', name => 'Official website', short => 'website' },
- { type => 'date', name => 'Release date', short => 'released' },
- { type => 'static', text => 'Leave month or day blank if they are unknown<br /><br />' },
- { type => 'select', name => 'Age rating', short => 'minage', options => [ map
- { { name => $VNDB::VRAGES->{$_}, short => $_ } } sort { $a <=> $b } keys %$VNDB::VRAGES ] },
- { type => 'textarea', name => 'Notes', short => 'notes', rows => 3, cols => 50 },
- { type => 'static', text => 'Miscellaneous notes/comments, information that does not fit in the above fields. E.g.: Censored/uncensored or for which releases this patch applies. Max. 250 characters.' },
-
- { type => 'sub', title => 'Platforms & Media', short => 'pnm' },
- { 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" ':'').'/>'.
- '<label for="'.$_.'"><acronym class="icons '.$_.'" 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 />' },
- { type => 'jssel', name => 'Media', sh => 'md', short => 'media' },
-
- { type => 'sub', title => 'Producers', short => 'prod' },
- { type => 'jssel', name => 'Producers', sh => 'pd', short => 'producers' },
-
- { type => 'sub', title => 'Visual novel relations', short => 'rel'},
- { type => 'jssel', name => 'Relations', sh => 'vn', short => 'vn', r=>1 },
- { type => 'static', text => q|
- Although a release usually contains only one visual novel, it is also possible
- for one release to include several games. Use this field to specify which
- visual novels are included in this release.| },
-
-
- { type => 'sub', title => 'Edit summary', short => 'com' },
- { type => 'textarea', name => 'Edit summary', short => 'comm', rows => 3, cols => 60 },
- { type => 'static', text => 'Please explain your modifications and cite all sources.' },
-
- { type => 'submit', text => $d{id} ? 'Edit' : 'Add' },
- { type => 'endform' },
-
-], $d{form}) ]]
diff --git a/data/tpl/rlist b/data/tpl/rlist
deleted file mode 100644
index f76eb65d..00000000
--- a/data/tpl/rlist
+++ /dev/null
@@ -1,90 +0,0 @@
-[[= ttabs('u', $d{user}, 'list') ]]
-<h2>[[: $p{PageTitle} ]]</h2>
-
-[[
- my $url = '/u'.$d{user}{id}.'/list';
- my $surl = sprintf '%s?s=%s;o=%s', $url, $d{order}[0], $d{order}[1]; # main URL + order
- my $purl = "$surl;c=$d{char}"; # full URL - page
- my $sourl = "$url?c=$d{char}"; # full URL - page & order
- my $curl = $surl; # full URL - character & page
- my $furl = "$surl;c=$d{char};p=$d{page}"; # full URL
-
- my $i=0;my $j=0;
-
-]]-
-
-<p class="chr">
- -[[= $d{char} ne 'all' ? '<a href="'.$curl.';c=all">all</a>' : 'all' ]]- |
- [[ for('a'..'z', 0) { ]]-
- -[[ if($d{char} eq $_) { ]][[= $_?$_:'#' ]][[ } else { ]]<a href="[[= $curl.';c='.$_ ]]">[[= $_?$_:'#' ]]</a>[[ } ]]
- [[ } ]]-
- <br /><br />
-</p>
-
-
--[[ if(@{$d{list}}) { ]]
-[[= pagebut($surl) ]]
-[[ if($d{user}{username} eq $p{AuthUsername}) { ]]
-<form method="post" action="[[= $furl ]]" class="tblf">
-[[ } ]]-
-<table id="rli">
- <thead><tr>
- <td colspan="3" class="tc1">Title -[[= sortbut($sourl, 'title') ]]</td>
- <td class="tc2" id="relhidpar"><b id="relhidparb">&#9656;</b>Releases*</td>
- <td class="tc3">Vote -[[= sortbut($sourl, 'vote') ]]</td>
- </tr></thead>
-[[ for (@{$d{list}}) { $j=0; my $c = ' style="background-color: #'.($i++%2?'fff':'f5f5f5').'"'; ]]-
- <tr[[=$c]]>
- <td colspan="3" class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{original}||$_->{title} ]]">[[= shorten $_->{title}, 50 ]]</a></td>
- <td class="tc2[[= @{$_->{rels}} ? ' relhid" id="rh'.$_->{vid}.'"' : ' relnone"' ]]><b[[= @{$_->{rels}} ? ' id="rhd'.$_->{vid}.'"' : '' ]]>&#9656;</b>
- [[= grep $_->{rstat}==2, @{$_->{rels}} ]]/[[= grep $_->{vstat}==2, @{$_->{rels}} ]]/[[= @{$_->{rels}} ]]
- </td>
- <td class="tc3">[[= $_->{vote} || '-' ]]</td>
- </tr>
- [[ for (@{$_->{rels}}) { ]]-
- <tr class="relhid" id="rr[[= $_->{vid}.'-'.++$j ]]">
- <td class="tc1_1">[[= datestr $_->{released} ]]</td>
- <td class="tc1_2">
- <acronym class="icons lang -[[= $_->{language} ]]" title="[[: $$VNDB::LANG{$_->{language}} ]]">&nbsp;</acronym><acronym
- title="[[= $VNDB::RTYP->[$_->{type}] ]]- release" class="icons -[[= lc substr($VNDB::RTYP->[$_->{type}],0,3) ]]">&nbsp;</acronym>
- </td>
- <td class="tc1_3"><a href="/r[[= $_->{rid} ]]" title="[[: $_->{original}||$_->{title} ]]">[[= shorten $_->{title}, 60 ]]</a></td>
- <td class="tc1_4">
- <acronym title="[[: $VNDB::RSTAT->[$_->{rstat}] ]]" class="uicons r[[= $_->{rstat} ]]">&nbsp;</acronym><acronym
- title="[[: $VNDB::VSTAT->[$_->{vstat}] ]]" class="uicons v[[= $_->{vstat} ]]">&nbsp;</acronym>
- </td>
- <td class="tc1_5">[[ if($d{user}{username} eq $p{AuthUsername}) { ]]<input type="checkbox" name="rsel" value="[[= $_->{rid} ]]" />[[ } else { ]]&nbsp;[[ } ]]</td>
- </tr>
- [[ } ]]
-[[ } ]]-
-</table>
-[[ if($d{user}{username} eq $p{AuthUsername}) { ]]
-<select id="vnlistchange" name="vnlistchange" class="right">
- <option value="n">- with selected -</option>
- <option value="d">Delete</option>
- <optgroup label="Update release status:">
- [[ for (0..$#$VNDB::RSTAT) { ]]-
- <option value="r[[= $_ ]]">[[: $VNDB::RSTAT->[$_] ]]</option>
- [[ } ]]
- </optgroup>
- <optgroup label="Update play status:">
- [[ for (0..$#$VNDB::VSTAT) { ]]-
- <option value="v[[= $_ ]]">[[: $VNDB::VSTAT->[$_] ]]</option>
- [[ } ]]
- </optgroup>
-</select>
-</form>
-[[ } ]]
-[[= pagebut($surl) ]]
-<p>
- <br />
- <b>*</b> Obtained/finished/total.
-</p>
-
-
-
-[[ } else { ]]-
-<p>
- No results found.
-</p>
-[[ } ]]
diff --git a/data/tpl/rpage b/data/tpl/rpage
deleted file mode 100644
index d31ffe24..00000000
--- a/data/tpl/rpage
+++ /dev/null
@@ -1,68 +0,0 @@
-[[= ttabs('r', $d{rel}) ]]
-<h2>[[: $p{PageTitle} ]]</h2>
-[[ if($d{rel}{original}) { ]]<h3 class="alttitle">[[: $d{rel}{original} ]]</h3>[[ } ]]
-
-[[ if($d{rel}{hidden}) { ]]-
- <span class="warning">
- This item has been deleted from the database. File a request on the
- <a href="/t/v[[= $d{rel}{vn}[0]{vid} ]]">discussion board</a> to undelete this page.
- </span>
-[[ } ]]
-[[ if(!$d{rel}{hidden} || $p{Authdel}) { ]]-
-
--[[ if($p{AuthLoggedin}) { ]]
-<p class="mod">&lt;
-<a href="/u[[= $p{AuthId} ]]/list" rel="rlistDD[[= $d{rel}{id} ]]" class="dropdown">
-[[= !$d{rel}{rlist} ? 'not in your list' : "$$VNDB::RSTAT[$d{rel}{rlist}{rstat}] / $$VNDB::VSTAT[$d{rel}{rlist}{vstat}]" ]]
-</a> &gt;</p>
-[[= rlist_dd($d{rel}) ]]
-[[ } ]]-
-
-
--[[ if($d{change}) { ]]
-[[= cdiff($d{prev}, $d{rel},
- [ vn => 'Relations', sub { join("<br />\n", map { $_->{title} } @{$_[0]}) } ],
- [ type => 'Type', sub { $VNDB::RTYP->[$_[0] ] } ],
- [ title => 'Title', 1 ],
- [ original => 'Orig. title', 1 ],
- [ gtin => 'JAN/UPC/EAN', 1 ],
- [ language => 'Language', sub { $VNDB::LANG->{$_[0]} } ],
- [ website => 'Website', \&summary ],
- [ released => 'Release date', \&datestr ],
- [ minage => 'Age rating', sub { $VNDB::VRAGES->{$_[0]} } ],
- [ notes => 'Notes', 1, 1 ],
- [ platforms => 'Platforms', sub { join(', ', sort @{$_[0]}) } ],
- [ media => 'Media', \&mediastr ],
- [ producers => 'Producers', sub { join(', ', map { _hchar($_->{name}) } sort { $a->{name} cmp $b->{name} } @{$_[0]}) } ],
- ) ]]
-[[ } ]]
-
-<dl>
- <dt>Relation</dt><dd>[[= join('<br />', map { '<a href="/v'.$_->{vid}.'" title="'._hchar($_->{original}||$_->{title}).'">'._hchar($_->{title}).'</a>' } @{$d{rel}{vn}}) ]]</dd>
- <dt>Type</dt><dd>[[: $VNDB::RTYP->[$d{rel}{type}] ]]</dd>
- <dt>Language</dt><dd>[[: $VNDB::LANG->{$d{rel}{language}} ]]</dd>
- <dt>Release date</dt><dd>[[= datestr($d{rel}{released}) ]]</dd>
-[[ if($d{rel}{gtin}) { ]]-
- <dt>[[: VNDB::GTINType($d{rel}{gtin}) ]]- code</dt><dd>[[= $d{rel}{gtin} ]]</dd>[[ } ]]-
-[[ if($d{rel}{minage} >= 0) { ]]-
- <dt>Age rating</dt><dd>[[: $VNDB::VRAGES->{$d{rel}{minage}} ]]</dd>[[ } ]]-
-[[ if($#{$d{rel}{producers}} >= 0) { ]]-
- <dt>Producer[[: $#{$d{rel}{producers}} > 0 ? 's' : '' ]]</dt><dd>[[= join(', ', map {
- sprintf('<a href="/p%d" title="'._hchar($_->{original}||$_->{name}).'">%s</a>', $_->{id}, _hchar($_->{name})) } @{$d{rel}{producers}})
- ]]</dd>[[ } ]]-
-[[ if($#{$d{rel}{platforms}} >= 0) { ]]-
- <dt>Platform[[: $#{$d{rel}{platforms}} > 0 ? 's' : '' ]]</dt><dd>[[: join(', ', map {
- $VNDB::PLAT->{$_} } @{$d{rel}{platforms}}) ]]</dd>[[ } ]]-
-[[ if($#{$d{rel}{media}} >= 0) { ]]-
- <dt>Medi[[: $#{$d{rel}{media}} > 0 ? 'a' : 'um' ]]</dt><dd>[[: mediastr($d{rel}{media}) ]]</dd>[[ } ]]-
-[[ if($d{rel}{website}) { ]]-
- <dt>Links</dt><dd><a href="[[: $d{rel}{website} ]]">Official website</a></dd>[[ } ]]-
-</dl>
-
-[[ if($d{rel}{notes}) { ]]-
-<p>[[= summary($d{rel}{notes}) ]]<br /><br /></p>
-[[ } ]]-
-
-
-
-[[ } ]]
diff --git a/data/tpl/tedit b/data/tpl/tedit
deleted file mode 100644
index 5953ead0..00000000
--- a/data/tpl/tedit
+++ /dev/null
@@ -1,33 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-[[ if($d{tag}) { my($type, $iid) = ($1, $2||0) if $d{tag} =~ /^([a-z]{1,2})([0-9]*)$/; ]]-
-<p>
- <a href="/t">Discussion board</a>
- &gt; <a href="/t/[[= $type ]]">[[: $VNDB::DTAGS->{$type} ]]</a>
- [[ if($iid) { ]]-
- &gt; <a href="/t/[[= $d{tag} ]]">[[: $d{tag} ]]</a>[[ } ]]-
-</p>
-[[ } ]]
-
--[[= cform( [
- { type => 'error' },
- { type => 'startform', action => $d{p} ? '/t'.$d{t}{id}.'.'.$d{p}{num}.'/edit' : $d{t} ? '/t'.$d{t}{id}.'/reply' : '/t/'.$d{tag}.'/new' },
- { type => 'static', name => 'Username', text => '<a href="/u'.($d{p}?$d{p}{uid}:$p{AuthId}).'">'.($d{p}?$d{p}{username}:$p{AuthUsername}).'</a>' },
- $d{t} && !($d{p} && $d{p}{num} == 1) ? (
- { type => 'static', name => 'Topic', text => '<a href="/t'.$d{t}{id}.'">'.$d{t}{title}.'</a>.' }
- ) : (
- { type => 'input', short => 'title', name => 'Thread title' },
- { type => 'input', short => 'tags', name => 'Tags' },
- { type => 'static', text => 'Read <a href="/d9.2">d9.2</a> for information about how to use tags' },
- $p{Authboardmod} ? (
- { type => 'check', short => 'lock', name => 'Locked' },
- ) : (),
- ),
- $p{Authboardmod} ? (
- { type => 'check', short => 'hide', name => 'Hidden' },
- ) : (),
- { type => 'textarea', short => 'msg', name => 'Message', rows => 10, cols => 60 },
- { type => 'static', text => 'It is possible to include formatting and ID codes, see <a href="/d9.3">d9.3</a> for more information.' },
- { type => 'submit', text => 'Submit' },
- { type => 'endform' },
-], $d{form}) ]]-
-
diff --git a/data/tpl/tindex b/data/tpl/tindex
deleted file mode 100644
index cb9cd154..00000000
--- a/data/tpl/tindex
+++ /dev/null
@@ -1,49 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-
-[[
- my %desc = (
- an => 'Yorhel\'s place to make useless announcements...',
- db => 'General discussions about VNDB.org. This is the place to be for feature requests and bug reports.',
- v => 'Discussions about the visual novels in the database',
- p => '...Producers',
- r => '...Releases',
- u => 'Messages to or discussions about other users on this site.'
- );
-]]
-
-
-[[ for my $tag (qw|an db v p u|) { ]]-
-
-<br />
-<h3>[[: $VNDB::DTAGS->{$tag} ]]</h3>
-[[ if(@{$d{$tag}}) { ]]-
-<table id="tin">
-[[ for (@{$d{$tag}}) { ]]-
- <tr>
- <td class="tc1">
- <a href="/t[[= $_->{id} ]]" title="[[= join ', ', sort map $$_[1]?$$_[0].$$_[1]:$$_[0], @{$_->{tags}} ]]">[[: $_->{title} ]]</a>
- [[ if($_->{locked}) { ]]- <b>[locked]</b>[[ } ]]
- </td>
- <td class="tc2">[[= $_->{count}-1 ]]</td>
- <td class="tc3">[[= userstr $_ ]]</td>
- <td class="tc4">[[= userstr $_->{luid}, $_->{lusername} ]]- @
- <a href="/t[[= $_->{id}.($_->{count}>$d{ppp}?'/'.ceil($_->{count}/$d{ppp}):'').'#'.$_->{count} ]]">
- [[= age $_->{ldate} ]]</a></td>
- </tr>
-[[ } ]]
-</table>
-<a class="right" href="/t/[[= $tag ]]">more...</a>
-[[ if($tag eq 'db') { ]]-
- <a class="right" href="/t/[[= $tag ]]/new" style="padding-right: 10px">start new thread</a>
-[[ } ]]
-
-[[ } else { ]]-
- <p>No threads yet.
- -[[ if($tag eq 'db') { ]]
- <a href="/t/[[= $tag ]]/new">Start a new thread.</a>
- [[ } ]]
- </p>
-[[ } ]]
-<br />
-
-[[ } ]]
diff --git a/data/tpl/ttag b/data/tpl/ttag
deleted file mode 100644
index 0d46ddf1..00000000
--- a/data/tpl/ttag
+++ /dev/null
@@ -1,60 +0,0 @@
-[[= $d{obj} ? ttabs($d{type}, $d{obj}, 'disc') : '' ]]-
-<h2>[[: $p{PageTitle} ]]</h2>
-<p>
- <a href="/t">Discussion board</a>
- &gt; <a href="/t/[[= $d{type} ]]">[[: $VNDB::DTAGS->{$d{type}} ]]</a>
- [[ if($d{obj}) { ]]-
- &gt; <b>[[= $d{tag} ]]</b>:<a href="/t/[[= $d{tag} ]]" title="[[: $d{original}||$d{title} ]]">[[: $d{title} ]]</a>[[ } ]]-
-</p>
-
-[[ if(@{$d{t}}) { ]]-
-
-[[ if(!$d{obj} && $d{tag} !~ /(an|db)/) {
- my @tags = grep $$_[0] eq $d{type}, map @{$_->{tags}}, @{$d{t}}; my %tags; my $i=0; ]]-
-<dl>
- <dt>Recent tags</dt>
- <dd>
- [[ for (@tags) { next if $tags{$$_[1]}++; last if $i++ == 5; ]]-
- <b>[[= $$_[0].$$_[1] ]]</b>:<a href="/t/[[= $$_[0].$$_[1] ]]">[[: $$_[2] ]]</a><br />[[ } ]]
- </dd>
-</dl>
-[[ } else { ]]
-<br />
-[[ } ]]
-
-
-[[= pagebut('/t/'.$d{tag}) ]]
-<table id="tin">
- <thead><tr>
- <td class="tc1">Topic</td>
- <td class="tc2">#</td>
- <td class="tc3">Starter</td>
- <td class="tc4">Last post</td>
- </tr></thead>
-[[ for (@{$d{t}}) { ]]-
- <tr>
- <td class="tc1">
- <a href="/t[[= $_->{id} ]]" title="[[= join ', ', sort map $$_[1]?$$_[0].$$_[1]:$$_[0], @{$_->{tags}} ]]">[[: $_->{title} ]]</a>
- [[ if($_->{locked}) { ]]- <b>[locked]</b>[[ } ]]
- </td>
- <td class="tc2">[[= $_->{count}-1 ]]</td>
- <td class="tc3">[[= userstr $_ ]]</td>
- <td class="tc4">[[= userstr $_->{luid}, $_->{lusername} ]]- @
- <a href="/t[[= $_->{id}.($_->{count}>$d{ppp}?'/'.ceil($_->{count}/$d{ppp}):'').'#'.$_->{count} ]]">
- [[= age $_->{ldate} ]]</a></td>
- </tr>
-[[ } ]]
-</table>
-[[= pagebut('/t/'.$d{tag}) ]]
-
-[[ } else { ]]
-<p><br />
- <b>No related threads found.</b>
-</p>
-[[ } ]]-
-
--[[ if($p{Authboard} && $d{tag} =~ /^(?:db|[vpru][0-9]+)$/) { ]]-
-<br />
-<a class="right" href="/t/[[= $d{tag} ]]/new">create a new thread</a>
-[[ } ]]
-
diff --git a/data/tpl/tthread b/data/tpl/tthread
deleted file mode 100644
index 0b67345c..00000000
--- a/data/tpl/tthread
+++ /dev/null
@@ -1,81 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-[[ if($d{t}{hidden}) { ]]
-<span class="warning">This thread has been deleted!</span>
-[[ } ]]
-
-<dl>
- <dt>Posted in</dt>
- <dd>
- [[ for (sort { $$a[0].$$a[1] cmp $$b[0].$$b[1] } @{$d{t}{tags}}) { ]]-
- <a href="/t/[[= $$_[0] ]]">[[: $VNDB::DTAGS->{$$_[0]} ]]</a>
- [[ if($$_[1]) { ]]-
- &gt; <b>[[= $$_[0].$$_[1] ]]</b>:<a href="/t/[[= $$_[0].$$_[1] ]]" title="[[: $$_[3]||$$_[2] ]]">[[: $$_[2] ]]</a>[[ } ]]-
- <br />
- [[ } ]]
- </dd>
-</dl>
-
-<br />
-
-[[
- my $pages='';
- my $lp = ceil($d{t}{count}/$d{ppp});
- if($d{t}{count} > $d{ppp}) {
- my @pages = (
- $d{page} == 1 ? '&lt;&lt;' : '<a href="/t%d">&lt;&lt;</a>',
- $lp > 2 ? (map
- $d{page} == $_ ? $_ : '<a href="/t%d/'.$_.'">'.$_.'</a>',
- 2..($lp-1) ) : (),
- $d{page} == $lp ? '&gt;&gt;' : '<a href="/t%d/'.$lp.'">&gt;&gt;</a>'
- );
- $pages = '<p class="browse">'.join(' &nbsp;', map sprintf($_,$d{t}{id}), @pages).'</p>';
- }
-]]
-
-[[= $pages ]]
-<table id="tth">
- [[ for (@{$d{p}}) { ]]-
- <tr>
- <td class="tc1">
- <a href="/t[[= $d{t}{id} ]].[[= $_->{num} ]]" name="[[= $_->{num} ]]">#[[= $_->{num} ]]</a>
- [[ if(!$_->{hidden}) { ]]-
- by -[[= userstr $_ ]]<br />
- <i>[[= formatdate('%Y-%m-%d %R', $_->{date}) ]]</i>
- [[ } ]]
- </td>
- <td class="tc2">
- [[ if($p{AuthId} == $_->{uid} && !$_->{hidden} || $p{Authboardmod}) { ]]-
- <p class="mod">&lt; <a href="/t[[= $d{t}{id}.'.'.$_->{num} ]]/edit">edit</a> &gt;</p>
- [[ } ]]
- [[ if(!$_->{hidden}) { ]]-
- [[= summary $_->{msg} ]]
- [[ if($_->{edited}) { ]]<br />
- <i>last modified -[[= formatdate('%Y-%m-%d %R', $_->{edited}) ]]</i>
- [[ } ]]
- [[ } else { ]]
- <b class="hidden">Post deleted.</b>
- [[ } ]]
- </td>
- </tr>
- [[ } ]]-
-</table>
-[[= $pages ]]
-
-<br />
-[[ if($lp == $d{page}) { ]]
- [[ if($d{t}{locked}) { ]]-
- <p>
- This thread has been locked, you can't reply anymore.
- </p>
- [[ } elsif(!$p{AuthLoggedin}) { ]]-
- <p>
- You need to be <a href="/u/login">logged in</a> to reply to this thread.
- </p>
- [[ } elsif($p{Authboard} && $lp == $d{page}) { ]]-
- <form action="/nospam?/t[[= $d{t}{id} ]]/reply" method="post" accept-charset="utf-8" id="qreply">
- <h3>Quick reply</h3>
- <textarea name="msg" id="msg" rows="5" cols="70"></textarea>
- <input type="submit" value="Post reply" />
- </form>
- [[ } ]]
-[[ } ]]
diff --git a/data/tpl/useredit b/data/tpl/useredit
deleted file mode 100644
index e6243fb5..00000000
--- a/data/tpl/useredit
+++ /dev/null
@@ -1,36 +0,0 @@
-[[= ttabs('u', $d{u}, 'edit') ]]
-<h2>[[: $p{PageTitle} ]]</h2>
-
--[[ if($d{done}) { ]]
-<span class="msg">
- Settings succesfully saved.
-</span>
-[[ } ]]
--[[= cform( [
- { type => 'error' },
- { type => 'startform', action => '/u'.$d{user}.'/edit' },
-
- { type => 'sub', title => 'General info', short => 'info' },
- { type => 'static', name => 'Username', text => _hchar($d{form}{username}) },
- { type => 'input', name => 'Email', short => 'mail' },
-
- { type => 'sub', title => 'Change password', short => 'pass' },
- { type => 'static', text => 'Leave blank to keep your current password.' },
- { type => 'pass', name => 'Password', short => 'pass1' },
- { type => 'pass', name => 'Confirm', short => 'pass2' },
-
- { type => 'sub', title => 'Miscellaneous options', short => 'misc' },
- { type => 'check', short => 'plist', name => sprintf
- 'Allow other people to see my visual novel list (<a href="/u%d/list">/u%1$d/list</a>) and wishlist (<a href="/u%1$d/wish">/u%1$d/wish</a>)', $d{user} },
- { type => 'check', short => 'pign_nsfw', name => 'Disable warnings for images that are not safe for work.' },
-
- $d{adm} ? (
- { type => 'sub', title => 'Admin', short => 'adm' },
- { type => 'input', name => 'Username', short => 'username' },
- { type => 'select', name => 'Rank', short => 'rank', options => [
- map { { name => $VNDB::VNDBopts{ranks}[0][0][$_], short => $_ } } 1..($#{$VNDB::VNDBopts{ranks}}-1) ] },
- ) : (),
-
- { type => 'submit', text => 'Save' },
- { type => 'endform' },
-], $d{form}) ]]
diff --git a/data/tpl/userlist b/data/tpl/userlist
deleted file mode 100644
index 578d320e..00000000
--- a/data/tpl/userlist
+++ /dev/null
@@ -1,50 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-<p class="chr">
- -[[= $d{chr} ne 'all' ? '<a href="/u/list/all">all</a>' : 'all' ]]- |
- [[ for('a'..'z', 0) { ]]-
- -[[ if($d{chr} eq $_) { ]][[= $_?$_:'#' ]][[ } else { ]]<a href="/u/list/[[= $_ ]]">[[= $_?$_:'#' ]]</a>[[ } ]]
- [[ } ]]-
- <br /><br />
-</p>
-
-[[ if($#{$d{users}} < 0) { ]]-
-<p>
- No users found...
-</p>
-[[ } else {
- my $url = sprintf '/u/list/%s', $d{chr};
- my $surl = sprintf '%s?s=%s&amp;o=%s', $url, $d{order}[0], $d{order}[1];
-]]
-[[= pagebut($surl) ]]-
-<table id="tul">
- <thead><tr>
- <td class="tc1">Username [[= sortbut($url, 'username') ]]</td>
-[[ if($p{Authusermod}) { ]]-
- <td class="tc2">Mail [[= sortbut($url, 'mail') ]]</td>
- <td class="tc3">Rank [[= sortbut($url, 'rank') ]]</td>[[ } ]]-
- <td class="tc4">Registered [[= sortbut($url, 'registered') ]]</td>
- <td class="tc6">Votes</td>
- <td class="tc7">Changes</td>
-[[ if($p{Authusermod}) { ]]-
- <td class="tc8">&nbsp;</td>[[ } ]]-
- </tr></thead>
- [[ for (@{$d{users}}) { ]]-
- <tr>
- <td class="tc1"><a href="/u[[= $_->{id} ]]">[[: $_->{username} ]]</a></td>
-[[ if($p{Authusermod}) { ]]-
- <td class="tc2">[[: $_->{mail} ]]</td>
- <td class="tc3">[[: $VNDB::VNDBopts{ranks}[0][0][$_->{rank}] ]]</td>[[ } ]]-
- <td class="tc4">[[= formatdate('%Y-%m-%d', $_->{registered}, 'wd') ]]</td>
- <td class="tc6">[[ if($_->{flags} & $VNDB::UFLAGS->{list} && $_->{votes}) { ]]
- <a href="/u[[= $_->{id} ]]/list" title="[[: $_->{username} ]]'s votes">[[= $_->{votes} ]]</a>
- [[ } else { ]][[= $_->{flags} & $VNDB::UFLAGS->{list} ? 0 : '-' ]][[ } ]]</td>
- <td class="tc7">[[ if($_->{changes}) { ]]
- <a href="/u[[= $_->{id} ]]/hist" title="Recent changes by -[[: $_->{username} ]]">[[= $_->{changes} ]]</a>
- [[ } else { ]]0[[ } ]]</td>
-[[ if($p{Authusermod}) { ]]-
- <td class="tc8">( <a href="/u[[= $_->{id} ]]/edit">edit</a> )</td>[[ } ]]-
- </tr>
- [[ } ]]-
-</table>
--[[= pagebut($surl) ]]-
-[[ } ]]
diff --git a/data/tpl/userlogin b/data/tpl/userlogin
deleted file mode 100644
index b4af29d2..00000000
--- a/data/tpl/userlogin
+++ /dev/null
@@ -1,14 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
--[[= cform( [
- { type => 'error' },
- { type => 'startform', action => '/u/login' },
- { type => 'input', short => 'username', name => 'Username' },
- { type => 'pass', short => 'userpass', name => 'Password' },
- { type => 'submit', text => 'Login!' },
- { type => 'endform' },
-], $d{log}) ]]-
-
-<p>
- <br /><br />
- <a href="/u/register">No account yet</a>, or <a href="/u/newpass">forgot your username or password?</a>
-</p>
diff --git a/data/tpl/userpage b/data/tpl/userpage
deleted file mode 100644
index aa02062e..00000000
--- a/data/tpl/userpage
+++ /dev/null
@@ -1,13 +0,0 @@
-[[= ttabs('u', $d{user}) ]]
-[[
- $d{pl} = $d{user}{flags} & $VNDB::UFLAGS->{list};
-]]
-<h2>[[: $p{PageTitle} ]]</h2>
-<dl>
- <dt>Username</dt><dd>[[: $d{user}{username} ]]- (<a href="/u[[= $d{user}{id} ]]">u[[= $d{user}{id} ]]</a>)</dd>
- <dt>Registered</dt><dd>[[= formatdate('%Y-%m-%d', $d{user}{registered}) ]]</dd>
- <dt>Votes</dt><dd>[[= $d{pl} ? $d{user}{votes}.' (<a href="/u'.$d{user}{id}.'/list">view all</a>)' : '(hidden)' ]]</dd>
- <dt>Changes</dt><dd>[[= $d{user}{changes}.($d{user}{changes}>0?' (<a href="/u'.$d{user}{id}.'/hist">recent changes</a>)':'') ]]</dd>
-</dl>
-
-[[= T_vnpage_stats($X) ]]
diff --git a/data/tpl/userpass b/data/tpl/userpass
deleted file mode 100644
index c3b04840..00000000
--- a/data/tpl/userpass
+++ /dev/null
@@ -1,21 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-<p>
- You're lucky that vndb has a very advanced password recovery tool! Just
- type your email address (the same one you used for your account), and
- wait for an email!
-</p>
-
--[[ if(!$d{done}) { ]]
-[[= cform( [
- { type => 'error', },
- { type => 'startform', action => '/u/newpass' },
- { type => 'input', short => 'mail', name => 'Email' },
- { type => 'submit', text => 'Gimme my password!' },
- { type => 'endform' },
-], $d{pas} ) ]]
-
-[[ } else { ]]
-<span class="msg">
- Your password succesfully been reset. Check your mail for instructions.
-</span>
-[[ } ]]
diff --git a/data/tpl/userreg b/data/tpl/userreg
deleted file mode 100644
index 31b2b622..00000000
--- a/data/tpl/userreg
+++ /dev/null
@@ -1,38 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-
--[[ if($d{denied}) { ]]
-[[ } ]]-
-
-<br /><br />
-<h3>Why should I register?</h3>
-<p>
- Registered users have access to special features on this site:
-</p>
-<ul>
- <li>You can keep track of the visual novels you'd like to play or have
- finished playing,</li>
- <li>Vote on visual novels,</li>
- <li>And more importantly: you can add and edit all information on the
- website!</li>
-</ul>
-<p>
- <br />
- And of course, registering an account is (and will always remain)
- completely free!
- <br /><br />
-</p>
-
--[[= cform( [
- { type => 'error' },
- { type => 'startform', action => '/u/register' },
- { type => 'input', short => 'username', name => 'Username' },
- { type => 'input', short => 'mail', name => 'Email' },
- { type => 'static', text => q|
- Your email address will only be used in case you lose your password, at least for now.
- We will never send spam or newsletters unless you explicitly ask us for it.
- | },
- { type => 'pass', short => 'pass1', name => 'Password' },
- { type => 'pass', short => 'pass2', name => 'Confirm pass.' },
- { type => 'submit', text => 'Register!' },
- { type => 'endform' },
-], $d{reg}) ]]
diff --git a/data/tpl/vnbrowse b/data/tpl/vnbrowse
deleted file mode 100644
index fa4ba1ac..00000000
--- a/data/tpl/vnbrowse
+++ /dev/null
@@ -1,108 +0,0 @@
-<h2>[[: $p{PageTitle} ]]</h2>
-
-
-[[ if($d{chr} eq 'search') { ]]
- <form id="vsearch" method="get" action="/v/search" accept-charset="UTF-8">
- <fieldset>
- <input type="text" name="q" id="q" value="[[: $p{searchquery} ]]" class="text"
- /><input type="submit" value="Search!" />
- <br />
- <b id="adsearchclick">[[= !$p{searchquery} ? '&#9662;' : '&#9656;' ]]- advanced options</b>
- </fieldset>
- </form>
-
- <div id="adsearch" [[= !$p{searchquery} ? '' : ' style="display: none"' ]]>
- <b>Categories</b> (boolean and, selecting more gives less results. The categories are explained on <a href="/d1">this page</a>)
- <ul id="cat">
- [[ for my $c (qw| e g t p h l s |) { ]]-
- -[[= $c !~ /[thl]/ ? '<li>' : '<br />' ]][[: $VNDB::CAT->{$c}[0] ]]-
- <ul>
- [[ for (sort keys %{$VNDB::CAT->{$c}[1]}) { my $ca = $c.$_; ]]-
- <li id="cat_[[= $ca ]]">
- [[: $VNDB::CAT->{$c}[1]{$_} ]]- ([[= $d{cat}{$ca} || 0 ]])</li>
- [[ } ]]
- </ul>[[= $c !~ /[gph]/ ? '</li>' : '' ]]-
- [[ } ]]-
- </ul>
- <br style="clear: both" />
- <br />
-
- <b>Languages</b> (boolean or, selecting more gives more results)<br />
- <ul class="filter" id="lfilter">
- [[ for (sort keys %{$d{langc}}) { next if !$d{langc}{$_}; my $l=$_; ]]-
- <li><input type="checkbox" name="lang_[[= $l ]]" id="lang_[[= $l ]]" value="[[: $VNDB::LANG->{$l} ]]" />
- <label for="lang_[[= $l ]]"><acronym class="icons lang -[[= $l ]]" title="[[: $VNDB::LANG->{$l} ]]">&nbsp;</acronym>([[= $d{langc}{$l} ]])</label></li>
- [[ } ]]-
- </ul>
- <br style="clear: both" />
- <br />
-
- <b>Platforms</b> (boolean or, selecting more gives more results)<br />
- <ul class="filter" id="pfilter">
- [[ for (sort keys %$VNDB::PLAT) { next if /oth/; my $l=$_; ]]-
- <li><input type="checkbox" name="plat_[[= $l ]]" id="plat_[[= $l ]]" value="[[: $VNDB::PLAT->{$l} ]]" />
- <label for="plat_[[= $l ]]"><acronym class="icons -[[= $l ]]" title="[[: $VNDB::PLAT->{$l} ]]">&nbsp;</acronym></label></li>
- [[ } ]]-
- </ul>
- <br style="clear: both" />
- <input type="button" class="right" id="vsearch_sub" name="vsearch_sub" value="Search!" />
- <br style="clear: left" />
- <br /><br />
- </div>
-
-[[ } else { ]]-
-<p class="chr">
- -[[= $d{chr} ne 'all' ? '<a href="/v/all">all</a>' : 'all' ]]- |
- [[ for('a'..'z', 0) { ]]-
- -[[ if($d{chr} eq $_) { ]][[= $_?$_:'#' ]][[ } else { ]]<a href="/v/[[= $_ ]]">[[= $_?$_:'#' ]]</a>[[ } ]]
- [[ } ]]-
- <br /><br />
-</p>
-[[ } ]]-
-
-
--[[ if($#{$d{vn}} < 0) { ]]
- -[[ if($d{chr} eq 'search' && $p{searchquery} || $d{chr} ne 'search') { ]]
-<p>
- No results again, life sucks... :'(
-</p>
- [[ } ]]
-[[ } else {
- my %url = (
- $p{searchquery} ? ( q => $p{searchquery} ) : (),
- );
- my %urls = ( %url,
- $d{order}[0] ne 'title' ? ( s => $d{order}[0] ) : (),
- $d{order}[1] ne 'a' ? ( o => $d{order}[1] ) : (),
- );
- my $url = sprintf '/v/%s', $d{chr};
- my $urls = $url;
- $urls .= '?'.join(';', map { $_.'='.$urls{$_} } keys %urls) if keys %urls;
- $url .= '?'.join(';', map { $_.'='.$url{$_} } keys %url) if keys %url;
-]]
-
-[[= pagebut($urls) ]]
-<table id="tbv">
- <thead><tr>
- <td class="tc1">Title [[= sortbut($url, 'title') ]]</td>
- <td class="tc2">&nbsp;</td>
- <td class="tc3">&nbsp;</td>
- <td class="tc4">Released [[= sortbut($url, 'released') ]]</td>
- </tr></thead>
- [[ for (@{$d{vn}}) {
- $_->{c_released} =~ s#^([0-9]{4})([0-9]{2}).+#$1==0?'N/A':$1==9999?'TBA':(($2&&$2<13?($Time::CTime::MoY[$2-1].' '):'').$1)#e;
- $_->{c_platforms} = join '', map {
- $_ ne 'oth' ? '<acronym class="icons '.$_.'" title="'._hchar($VNDB::PLAT->{$_}).'">&nbsp;</acronym>' : ()
- } split /\//, $_->{c_platforms};
- $_->{c_languages} = join '', map qq|<acronym class="icons lang $_" title="$$VNDB::LANG{$_}">&nbsp;</acronym>|, reverse sort split /\//, $_->{c_languages};
- ]]-
- <tr>
- <td class="tc1"><a href="/v[[= $_->{id} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 50 ]]</a></td>
- <td class="tc2">[[= $_->{c_platforms} ]]</td>
- <td class="tc3">[[= $_->{c_languages} ]]</td>
- <td class="tc4">[[: $_->{c_released} ]]</td>
- </tr>
- [[ } ]]-
-</table>
-[[= pagebut($urls) ]]
-[[ } ]]
diff --git a/data/tpl/vnedit b/data/tpl/vnedit
deleted file mode 100644
index a9801674..00000000
--- a/data/tpl/vnedit
+++ /dev/null
@@ -1,120 +0,0 @@
-[[= $d{id} ? ttabs('v', $d{vn}, 'edit') : '' ]]-
-<h2>[[: $p{PageTitle} ]]</h2>
-
-[[ if(!$d{id}) { ]]
- <span class="msg">Please search the database before adding a new visual novel
- in order to prevent duplicate entries.</span>
-[[ } else { ]]
- <span class="msg">
- Please check the <a href="/t/v[[= $d{id} ]]">discussion board</a> <b>before</b> making
- any changes!
- </span>
-[[ } if($d{id} && $d{vn}{cid} != $d{vn}{latest}) { ]]
- <span class="warning">
- You are editing an old revision of this visual novel. If you save it, all changes made after
- -[[= formatdate('%Y-%m-%d %R', $d{vn}{added}) ]]- will be removed!
- </span>
-[[ } ]]
-
-
--[[= cform([
- { type => 'error' },
- { type => 'startform', action => $d{id} ?( '/v'.$d{id}.'/edit') : '/v/new', upload => 1, fh => 1 },
-
- { type => 'sub', title => 'General info', short => 'info' },
- { type => 'input', name => 'Title (romaji)', short => 'title', r=>1 },
- { type => 'input', name => 'Original title', short => 'original' },
- { type => 'static', text => q|
- The original title of this visual novel, leave blank if it already is in the Latin alphabet.<br /><br />| },
-
- { type => 'textarea', name => 'Aliases', short => 'alias', rows => 2, cols => 60 },
- { type => 'static', text => q|
- Comma seperated list of alternative titles or abbreviations. Can include both official
- (japanese/english) titles and unofficial titles used around net. <b>Titles that are listed in the releases do not have to be added here.</b><br /><br />| },
-
- { type => 'textarea', name => 'Description', short => 'desc', rows => 7, cols => 70, r=>1 },
- { type => 'static', text => q|
- Short description of the main story. Please do not include spoilers, and don't forget to list the source
- in case you didn't write the description yourself. ([url] BBCode tag is allowed)<br /><br />| },
-
- { type => 'select', name => 'Length', short => 'length', class => 'longopts', options => [ map {
- { short => $_,
- name => !$_?$VNDB::VNLEN->[$_][0]:($VNDB::VNLEN->[$_][0].', '.$VNDB::VNLEN->[$_][1].' ('.$VNDB::VNLEN->[$_][2].')') } } 0..$#$VNDB::VNLEN
- ] },
- { type => 'static', text => '<br />' },
- { type => 'input', name => 'External links', short => 'l_wp', pre => 'http://en.wikipedia.org/wiki/' },
- { type => 'input', name => '&nbsp;', short => 'l_encubed', pre => 'http://novelnews.net/tag/', post => '/' },
- { type => 'input', name => '&nbsp;', short => 'l_renai', pre => 'http://renai.us/game/', post => '.shtml' },
- { 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 => '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 {
- my $r = 'Please read the <a href="/d1">category descriptions</a> before modifying categories!<br /><br />'
- .'<ul id="cat">';
- for my $c (qw| e g t p h l s |) {
- $r .= ($c !~ /[thl]/ ? '<li>' : '<br />').$VNDB::CAT->{$c}[0].'<a href="/d1#'.$VNDB::CAT->{$c}[2].'" class="help">?</a><ul>';
- for (sort keys %{$VNDB::CAT->{$c}[1]}) {
- $r .= sprintf '<li><a href="#" id="cat_%1$s"><b id="b_%1$s">-</b> %2$s</a></li>',
- $c.$_, $VNDB::CAT->{$c}[1]{$_};
- }
- $r .= '</ul>'.($c !~ /[gph]/ ? '</li>' : '');
- }
- $r.'</ul>';
- } },
-
- { type => 'sub', title => 'Image', short => 'img' },
- $d{id} ? (
- { type => 'static', text => $d{vn}{image} > 0 ?
- sprintf '<img src="%s/cv/%02d/%d.jpg" style="float: right" />', $p{st}, $d{vn}{image}%100, $d{vn}{image} :
- $d{vn}{image} < 0 ? '[processing]' : 'No image uploaded yet...' },
- ) : (),
- { type => 'upload', name => $d{vn}{image} ? 'Change' : 'Upload', short => 'img' },
- { type => 'static', text => q|
- Preferably the cover of the CD/DVD/package. Image must be in JPEG or PNG format and at most 500kB. Images larger than 256x400 will automatically be resized.<br /><br />| },
- { type => 'check', short => 'img_nsfw', name => '<b>NSFW.</b> Please check this option if the image contains nudity, gore, or is otherwise not safe in a work-friendly environment.' },
-
- { type => 'sub', title => 'Visual novel relations', short => 'rel' },
- { type => 'jssel', name => 'Relations', short => 'relations', sh => 'rl' },
- { type => 'static', text => q|
- <b>Direct relations:</b> Please only add direct relations. E.g. the sequel of a sequel does not have to be listed
- here because it's already listed on an other visual novel that is in turn listed here. VNDB will handle these
- relations automatically.<br />
- <b>Reverse relations:</b> If you add a relation with an other visual novel here, the same (or "reverse") relation
- will automatically be added to the other visual novel. For example: if you add Tsukihime as a prequel of Kagetsu Tohya,
- Kagetsu Tohya will automatically be added as a sequel for Tsukihime.
- |},
-
- { type => 'sub', title => 'Screenshots', short => 'scr' },
- { type => 'hidden', short => 'screenshots' },
- { type => 'static', raw => 1, text => qq|
- <span class="warning">
- <b style="float: none; display: inline; font-weight: bold">Please keep the following in mind when uploading screenshots:</b><br />
- * Screenshots have to be in the native resolution of the game,<br />
- * Remove any window borders and make sure the image is unmarked,<br />
- * Don't only upload event CGs.<br />
- Please read the <a href="/d2#6">guidelines</a> for more information.<br />
- <b style="float: none; display: inline; font-weight: bold">Make sure to submit the form after the upload has finished!</b>
- </span><br />
- <div id="scrfrm" class="$p{st}">...make sure to enable Javascript...</div>
- <script type="text/javascript">
- var scrRel = [|.join(', ', map { ($$_{title} = _hchar($$_{title})) =~ s/\\/\\\\/g; $$_{title}=~s/'/\\'/g; "[ $$_{id}, '$$_{language}', '$$_{title}' ]" } @{$d{rel}}).q|];
- </script>
- |},
-
- { type => 'sub', title => 'Edit summary', short => 'com' },
- { type => 'textarea', name => 'Edit summary', short => 'comm', rows => 3, cols => 60 },
- { type => 'static', text => 'Please explain your modifications and cite all sources.' },
-
- { type => 'submit', text => $d{id} ? 'Edit' : 'Add' },
- { type => 'endform' },
-
-], $d{form}) ]]
diff --git a/data/tpl/vnlist b/data/tpl/vnlist
deleted file mode 100644
index d2763b39..00000000
--- a/data/tpl/vnlist
+++ /dev/null
@@ -1,63 +0,0 @@
-[[= ttabs('u', $d{user}) ]]
-<h2>[[: $p{PageTitle} ]]</h2>
-[[
- my $url = sprintf '/u%d/vlist', $d{user}{id};
- my $surl = sprintf '%s?s=%s;o=%s', $url, $d{order}[0], $d{order}[1];
- my $purl = $surl . ';t='.$d{status};
- my $sourl = $url . '?t='.$d{status};
- my $furl = $purl . ';p='.$d{page};
-]]
-
-<span class="warning">
- This visual novel list is read-only, only visible to you, and may be
- deleted in future versions of the site. You are highly encouraged to
- move everything in this list to the new <a href="/u[[= $d{user}{id} ]]/list">visual novel list</a>.
-</span>
-
-<p class="chr">
- status: -[[ for (-1..$#$VNDB::LSTAT) { if($_ >= 0) { ]]- | -[[ }
- if($d{status} == $_) { ]]<b>[[= $_ eq -1 ? 'all' : lc $VNDB::LSTAT->[$_] ]]</b>[[ }
- else { ]]<a href="[[= $surl ]]&amp;t=[[= $_ ]]">[[= $_ eq -1 ? 'all' : lc $VNDB::LSTAT->[$_] ]]</a>[[ } } ]]
- <br /><br />
-</p>
-
-
-[[ if($#{$d{list}} < 0) { ]]-
-<p>
-[[ if($d{status} >= 0) { ]]
- No results found...
-[[ } elsif($d{user}{username} eq $p{AuthUsername}) { ]]
- Your visual novel list is empty. You can keep track of all the visual novels
- you'd like to play, you're currently playing, or you've finished. Just go to
- a visual novel page and add it to your VN list!
-[[ } else { ]]
- [[: $d{user}{username} ]]'s visual novel list is empty...
-[[ } ]]
-</p>
-
-[[ } else { ]]
-[[= pagebut($purl) ]]-
-<form method="post" action="[[= $furl ]]" class="tblf">
-<table id="tvl">
- <thead><tr>
- <td class="tc1">Title [[= sortbut($sourl, 'title') ]]</td>
- <td class="tc2">Status</td>
- <td class="tc3">Added [[= sortbut($sourl, 'date') ]]</td>
- <td class="tc4">Personal note</td>
- <td class="tc5">&nbsp;</td>
- </tr></thead>
- [[ for (@{$d{list}}) { ]]-
- <tr>
- <td class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{title} ]]">[[: length($_->{title})>40 ? substr($_->{title},0, 37).'...' : $_->{title} ]]</a></td>
- <td class="tc2">[[= $VNDB::LSTAT->[$_->{status}] ]]</td>
- <td class="tc3">[[= formatdate('%Y-%m-%d', $_->{date}, 'dh') ]]</td>
- <td class="tc4">[[: $_->{comments}||'-' ]]</td>
- <td class="tc5"><input type="checkbox" name="sel" value="[[= $_->{vid} ]]" /></td>
- </tr>
- [[ } ]]-
-</table>
-<input type="submit" value="Delete selected items" class="right" />
-</form>
--[[= pagebut($purl) ]]
-[[ } ]]-
-
diff --git a/data/tpl/vnpage b/data/tpl/vnpage
deleted file mode 100644
index bca1bf35..00000000
--- a/data/tpl/vnpage
+++ /dev/null
@@ -1,204 +0,0 @@
-[[= ttabs('v', $d{vn}) ]]
-
-<h2>[[: $d{vn}{title} ]]</h2>
-[[ if($d{vn}{original}) { ]]<h3 class="alttitle">[[: $d{vn}{original} ]]</h3>[[ } ]]
-
-
-[[ if($d{vn}{hidden}) { ]]-
- <span class="warning">
- This item has been deleted from the database. File a request on the
- <a href="/t/v[[= $d{vn}{id} ]]">discussion board</a> to undelete this page.
- </span>
-[[ } ]]
-[[ if(!$d{vn}{hidden} || $p{Authdel}) { ]]-
-
--[[ if($p{AuthLoggedin}) { ]]
-<p class="mod">&lt;
- user options -
- <a href="/u[[= $p{AuthId} ]]/list" rel="voteDD" class="dropdown">[[= $d{vote}{vid} ? 'your vote: '.$d{vote}{vote} : 'vote' ]]</a>
- - <a href="/u[[= $p{AuthId} ]]/wish" rel="wishDD" class="dropdown">[[= $d{wlist}{vid} ? 'wishlist: '.lc($$VNDB::WSTAT[$d{wlist}{wstat}]) : 'wishlist' ]]</a>
-&gt;</p>
-[[ } ]]-
-
-
-
-[[ if($d{change}) { ]]
-[[= cdiff($d{prev}, $d{vn},
- [ title => 'Title (romaji)', 1 ],
- [ original => 'Original title', 1 ],
- [ alias => 'Alias', 1, 1 ],
- [ desc => 'Description', 1, 1 ],
- [ length => 'Length', sub { $VNDB::VNLEN->[$_[0] ][0] } ],
- [ l_wp => 'Wikipedia link', sub { $_[0] ? '<a href="http://en.wikipedia.org/wiki/'.$_[0].'">'.$_[0].'</a>' : 'No link' } ],
- [ l_encubed => 'Encubed tag', sub { $_[0] ? '<a href="http://novelnews.net/tag/'._huri($_[0]).'/">'.$_[0].'</a>' : 'No link' } ],
- [ l_renai => 'Renai.us link', sub { $_[0] ? '<a href="http://renai.us/game/'._huri($_[0]).'.shtml">'.$_[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' } ],
- [ 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 { 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("<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'; } ],
- [ screenshots => 'Screenshots', sub { join "<br />\n", map sprintf('[%s] <a href="%s/sf/%02d/%d.jpg">%4$d</a> (%s)',$$_{rid}?qq|<a href="/r$$_{rid}">r$$_{rid}</a>|:'no release',$p{st},$$_{id}%100,$$_{id},$$_{nsfw}?'NSFW':'Safe'), @{$_[0]} } ],
- [ 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;
- }
-
-]]
-
-
-<div id="vnheader">
-<div>
-[[ if($d{vn}{image} > 0) { ]]
- [[ if($d{vn}{img_nsfw} && !$p{AuthNsfw}) { ]]
- <img src="[[: $p{st} ]]/cv/nsfw.png" id="nsfw" class="[[: $p{st} ]]/cv/[[= sprintf '%02d/%d', $d{vn}{image}%100, $d{vn}{image} ]].jpg" />
- [[ } else { ]]
- <img src="[[: $p{st} ]]/cv/[[= sprintf '%02d/%d', $d{vn}{image}%100, $d{vn}{image} ]].jpg" alt="[[: $p{PageTitle} ]]" />
- [[ if($d{vn}{img_nsfw}) { ]]
- <p class="nsfw">[ flagged as NSFW ]</p>
- [[ } ]]
- [[ } ]]
-[[ } elsif($d{vn}{image} < 0) { ]]-
- [processing image, please return in a few minutes]
-[[ } else { ]]-
- No image uploaded yet...
-[[ } ]]-
-</div>
-
--[[
- 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&amp;task=view&amp;id=%d', $d{vn}{l_vnn} ] : (),
- );
-
- my $prod = @lang && grep { @{$_->{producers}} } @{$d{rel}};
-
-if($d{vn}{length} || $d{vn}{alias} || @links || $prod) { ]]
- <h3>General info</h3>
- <dl>
- [[ if($d{vn}{length}) { ]]-
- <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) { ]]-
- <dt>Links</dt><dd>[[= join(', ', map { '<a href="'.sprintf($_->[1],$_->[2]).'">'.$_->[0].'</a>' } @links) ]]</dd>[[ } ]]-
- [[ if($prod) { ]]-
- <dt>Producers</dt><dd>
- [[ for my $l (@lang) { my %l;
- $_->{language} eq $l && (%l = ( %l, map {
- sprintf('<a href="/p%d" title="%s">%s</a>',
- $_->{id}, _hchar($_->{original}||$_->{name}), _hchar shorten $_->{name}, 30) => 1
- } @{$_->{producers}} )) for (@{$d{rel}});
- if(keys %l) { ]]-
- <acronym class="icons lang -[[= $l ]]" title="[[: $VNDB::LANG->{$l} ]]">&nbsp;</acronym>[[= join(' &amp; ', keys %l) ]]<br />
- [[ } } ]]
- </dd>[[ } ]]-
- </dl>
-[[ } ]]-
-
- [[ if(@{$d{vn}{categories}}) { my %nolvl = (map {$_=>1} qw| pli pbr gaa gab hfa hfe lea lfa lsp tfu tpa tpr |); ]]-
- <h3>Categories</h3>
- <dl class="vnrel">
- [[ 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('<i class="crgn%d">%s</i>', $nolvl{$c.$_}?0:$cs->[1], $VNDB::CAT->{$c}[1]{$s})
- : ()
- } sort keys %{$VNDB::CAT->{$c}[1]};
- if(@c) { ]]-
- <dt>[[: $VNDB::CAT->{$c}[0] ]]</dt><dd>[[= join(', ', @c) ]]</dd>
- [[ } } ]]
- [[ if(grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}}) { ]]-
- <dt>Place/Time</dt><dd>[[= join ', ', map $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)},
- sort { $a->[0] cmp $b->[0] } grep $_->[0] =~ /^[tl]/, @{$d{vn}{categories}} ]]</dd>
- [[ } ]]-
- </dl>
- [[ } ]]-
-
- [[ if($#{$d{vn}{relations}} >= 0) { ]]-
- <h3>[[= $d{page} eq 'rg' ? 'Relations' : '<a href="/v'.$d{vn}{id}.'/rg">Relations</a>' ]]</h3>
- <dl class="vnrel">
- [[ my $lrel = -1; my $i=0; for (sort { $a->{relation} <=> $b->{relation} } @{$d{vn}{relations}}) {
- if($_->{relation} != $lrel) { $lrel=$_->{relation}; if($i) { ]]</dd>[[ } ]]-
- <dt>[[: $VNDB::VREL->[$lrel] ]]</dt><dd>[[ } else { ]]<br />[[ } ]]
- <a href="/v[[= $_->{id} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 40 ]]</a>
- [[ ++$i;} ]]</dd>
- </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] eq 'unknown' ? '' : $VNDB::ANITYPE->[$_->{type}][0].', ' ]][[= $_->{year} ]])</b>
- [[ } ]]
- </li>
- [[ } ]]
- </ul>
- [[ } ]]-
-</div>
-
--[[
- my @lnks = (
- !$d{page} ? '<b>description &amp; releases</b>' : '<a href="/v'.$d{vn}{id}.'">description &amp; releases</a>',
- $d{page} eq 'stats' ? '<b>stats</b>' : '<a href="/v'.$d{vn}{id}.'/stats">stats</a>',
- @{$d{vn}{screenshots}} ? (
- $d{page} eq 'scr' ? '<b>screenshots</b>' : '<a href="/v'.$d{vn}{id}.'/scr">screenshots</a>',
- ) : (),
- @{$d{vn}{relations}} ? (
- $d{page} eq 'rg' ? '<b>relations</b>' : '<a href="/v'.$d{vn}{id}.'/rg">relations</a>',
- ) : (),
- );
-]]
-<p class="opts">- -[[= join(' - ', @lnks) ]]- -</p>
-
-[[ if(!$d{page}) { ]][[+ vnpage_rel ]][[ } ]]
-[[ if($d{page} eq 'stats') { ]][[+ vnpage_stats ]][[ } ]]
-[[ if($d{page} eq 'rg') { ]][[+ vnpage_rg ]][[ } ]]
-[[ if($d{page} eq 'scr') { ]][[+ vnpage_scr ]][[ } ]]
-
-[[ if($p{AuthLoggedin}) { ]]-
-<div class="dropdown" id="voteDD">
- <ul>
- [[ if($d{vote}{vid}) { ]]-
- <li><a href="/v[[= $d{vn}{id} ]]/vote?v=-1">revoke</a></li>
- [[ } for (reverse 1..10) { ]]-
- <li class="center"><a href="/v[[= $d{vn}{id} ]]/vote?v=[[= $_ ]]" id="dovote_[[= $_ ]]">[[= $_ ]]</a></li>
- [[ } ]]
- </ul>
-</div>
-
-<div class="dropdown" id="wishDD">
- <ul>
- [[ for (0..$#$VNDB::WSTAT) {
- if($d{wlist}{vid} && $d{wlist}{wstat} == $_) { ]]-
- <li><b>[[: $$VNDB::WSTAT[$_] ]]</b></li>
- [[ } else { ]]-
- <li><a href="/v[[= $d{vn}{id} ]]/wish?w=[[= $_ ]]">[[: $$VNDB::WSTAT[$_] ]]</a></li>
- [[ } } if($d{wlist}{vid}) { ]]-
- <li><a href="/v[[= $d{vn}{id} ]]/wish?w=-1">remove</a></li>
- [[ } ]]
- </ul>
-</div>
-[[ } ]]
-
-
-[[ } ]]
diff --git a/data/tpl/vnpage_rel b/data/tpl/vnpage_rel
deleted file mode 100644
index 4e5d29b2..00000000
--- a/data/tpl/vnpage_rel
+++ /dev/null
@@ -1,59 +0,0 @@
-<h3>Description</h3>
-<p class="desc">
- [[= summary($d{vn}{desc}) ]]
- <br /><br /><br />
-</p>
-
-
-
-[[
- my @lang;
- for (@{$d{rel}}) {
- my $l = $_->{language};
- next if grep { $_ eq $l } @lang;
- push @lang, $l;
- }
-
-]]
-
-
-<h3>Releases
-[[ if((!$d{vn}{locked} && $p{Authedit}) || $p{Authlock}) { ]]- <p class="actions">(<a href="/v[[= $d{vn}{id} ]]/add">add release</a>)</p>[[ } ]]</h3>
-[[ if(@{$d{rel}}) { ]]-
-<table id="tre">
-[[ for(@lang) { my $l = $_; ]]-
-<tr class="lang">
- <td colspan="6">[[: $VNDB::LANG->{$l} ]]</td>
-</tr>
-[[ for (@{$d{rel}}) { next if $l ne $_->{language}; ]]-
- <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="icons '.$_.'" title="'._hchar($VNDB::PLAT->{$_}).'">&nbsp;</acronym>' : () } sort @{$_->{platforms}}) ]]
- <acronym title="[[= $VNDB::RTYP->[$_->{type}] ]]- release" class="icons -[[= lc substr($VNDB::RTYP->[$_->{type}],0,3) ]]">&nbsp;</acronym>
- </td>
- <td class="tc4"><a href="/r[[= $_->{id} ]]" title="[[: $_->{original} || $_->{title} ]]">[[: shorten $_->{title},60 ]]</a></td>
- <td class="tc5">[[ if($p{AuthId}) { ]]
- [[= sprintf '<a href="/r%d" class="dropdown above" rel="rlistDD%1$d">%s</a>', $_->{id}, $_->{rlist} ?
- ('<acronym title="'.$VNDB::RSTAT->[$_->{rlist}{rstat}].'" class="uicons r'.$_->{rlist}{rstat}.'">&nbsp;</acronym>'.
- '<acronym title="'.$VNDB::VSTAT->[$_->{rlist}{vstat}].'" class="uicons v'.$_->{rlist}{vstat}.'">&nbsp;</acronym>')
- : '<acronym title="Add to your visual novel list" class="uicons no">&nbsp;</acronym>' ]]
- [[ } else { ]]&nbsp;[[ } ]]</td>
- <td class="tc6">[[ if($_->{website}) { ]]<a href="[[: $_->{website} ]]" class="icons ext" title="WWW">&nbsp;</a>[[ } ]]</td>
- </tr>
-[[ } ]]-
-[[ } ]]-
-</table>
-[[ } else { ]]-
-<p>
- This game has either not been released yet, or we just don't have information about
- any releases.
-</p>
-[[ } ]]
-
-
-[[ if($p{AuthId}) { ]]
-[[ for my $r (@{$d{rel}}) { ]]-
--[[= rlist_dd($r) ]]
-[[ } } ]]
diff --git a/data/tpl/vnpage_rg b/data/tpl/vnpage_rg
deleted file mode 100644
index deae6124..00000000
--- a/data/tpl/vnpage_rg
+++ /dev/null
@@ -1,11 +0,0 @@
-<h3>Relations</h3>
-[[ if(!$d{vn}{rgraph}) { ]]
- <p>
- Relation graph has not been generated yet...
- </p>
-[[ } else { ]]
- [[= $d{vn}{cmap} ]]
- <p id="relations">
- <img src="[[= sprintf "%s/rg/%02d/%d.png", $p{st}, $d{vn}{rgraph}%100, $d{vn}{rgraph} ]]" usemap="#rgraph" alt="Relation graph for -[[: $d{vn}{title} ]]" />
- </p>
-[[ } ]]
diff --git a/data/tpl/vnpage_scr b/data/tpl/vnpage_scr
deleted file mode 100644
index f0c4ae9f..00000000
--- a/data/tpl/vnpage_scr
+++ /dev/null
@@ -1,37 +0,0 @@
-<h3>Screenshots
-[[ if((!$d{vn}{locked} && $p{Authedit}) || $p{Authlock}) { ]]- <p class="actions">(<a href="/v[[= $d{vn}{id} ]]/edit?fh=scr">manage screenshots</a>)</p>[[ } ]]</h3>
-
-[[ if(@{$d{vn}{screenshots}}) {
- my $tot = @{$d{vn}{screenshots}};
- my $nsfw = grep $$_{nsfw}, @{$d{vn}{screenshots}};
-]]-
-
-<div id="screenshots">
-[[ for my $r (undef, @{$d{rel}}) {
- my @s = grep { !$r && !$_->{rid} || $r && $_->{rid} && $_->{rid} == $r->{id} } @{$d{vn}{screenshots}};
- next if !@s;
-]]-
-[[ if($r) { ]]
-<b><acronym class="icons lang -[[= $r->{language} ]]" title="[[: $VNDB::LANG->{$r->{language}} ]]">&nbsp;</acronym>
-[[: $r->{title} ]]</b>
-[[ } ]]
-[[ for(@s) { ]]
- <a href="[[= sprintf '%s/sf/%02d/%d.jpg', $p{st}, $$_{id}%100, $$_{id} ]]"
- class="shot [[= $$_{nsfw} ? ' scr_nsfw':'' ]]" [[= !$p{AuthNsfw}&&$$_{nsfw}?' style="display: none"':'' ]]-
- rel="[[= $$_{width}.'x'.$$_{height} ]]"><img src="[[= sprintf '%s/st/%02d/%d.jpg', $p{st}, $$_{id}%100, $$_{id} ]]"
- /><b>[[= $$_{nsfw} ? 'x' : '&nbsp;' ]]</b></a>
-[[ } ]]-
-<br style="clear: left" /><br />
-[[ } ]]
-
-</div>
-[[ if($nsfw) { ]]-
-<p id="scrNsfwHid">&nbsp;</p>
-<i style="font-size: 10px;">Items marked with a red X are flagged as NSFW.</i>
-[[ } ]]-
-
-[[ } else { ]]-
-<p>
- No screenshots have been uploaded yet for this visual novel.
-</p>
-[[ } ]]
diff --git a/data/tpl/vnpage_stats b/data/tpl/vnpage_stats
deleted file mode 100644
index ab159f14..00000000
--- a/data/tpl/vnpage_stats
+++ /dev/null
@@ -1,39 +0,0 @@
-<ul id="stats">
-
-[[
- my $max = 1; my $total = 0; my $sum = 0;
- for (0..$#{$d{votes}{graph}}) {
- $total += $d{votes}{graph}[$_];
- $max = $d{votes}{graph}[$_] if $d{votes}{graph}[$_] > $max;
- $sum += ($_+1) * $d{votes}{graph}[$_];
- }
-]]
-[[ if(!$d{user} || ($d{pl} && $d{user}{votes})) { ]]-
-<li><h3>Vote graph <p class="actions">[[= $total ]]- vote[[= $total==1?'':'s' ]]- total
- [[= $total && $d{user} ? sprintf(', average: %.1f.', $sum/$total) : '' ]]</p></h3>
-<table id="tvg">
-[[ for (reverse 0..$#{$d{votes}{graph}}) { ]]-
- <tr>
- <td class="tc1">[[= $_+1 ]]</td>
- <td class="tc2"><div style="width: -[[= ($d{votes}{graph}[$_]/$max)*270 + 5 ]]px">&nbsp;</div>[[= $d{votes}{graph}[$_] ]]</td>
- </tr>
-[[ } ]]-
-</table></li>
-
-[[ if($#{$d{votes}{latest}} >= 0) { ]]
-<li><h3>Recent votes</h3>
-<table id="tvr">
-[[ for (@{$d{votes}{latest}}) { ]]-
- <tr>
- [[ if(!$d{user}) { ]]-
- <td class="tc1">[[= userstr $_ ]]</td>
- [[ } else { ]]-
- <td class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 30 ]]</a></td>
- [[ } ]]-
- <td class="tc2">[[= $_->{vote} ]]</td>
- <td class="tc3">[[= formatdate('%Y-%m-%d %R', $_->{date}, 'dh') ]]</td>
- </tr>
-[[ } ]]-
-</table></li>
-[[ } } ]]-
-</ul>
diff --git a/data/tpl/wlist b/data/tpl/wlist
deleted file mode 100644
index 049d28ca..00000000
--- a/data/tpl/wlist
+++ /dev/null
@@ -1,55 +0,0 @@
-[[= ttabs('u', $d{user}, 'wish') ]]
-<h2>[[: $p{PageTitle} ]]</h2>
-[[
- my $url = sprintf '/u%d/wish', $d{user}{id};
- my $surl = sprintf '%s?s=%s;o=%s', $url, $d{order}[0], $d{order}[1];
- my $furl = $surl . ';p='.$d{page};
-]]
-
-
-[[ if($#{$d{list}} < 0) { ]]-
-<p>
-[[ if($d{user}{username} eq $p{AuthUsername}) { ]]
- Your wishlist is empty. You can keep track of all the visual novels
- you'd like to play. Just go to a visual novel page and add it to your wishlist!
-[[ } else { ]]
- [[: $d{user}{username} ]]'s wishlist is empty...
-[[ } ]]
-</p>
-
-[[ } else { ]]
-[[= pagebut($surl) ]]-
-[[ if($d{user}{username} eq $p{AuthUsername}) { ]]
-<form method="post" action="[[= $furl ]]" class="tblf">
-[[ } ]]
-<table id="twl">
- <thead><tr>
- <td class="tc1">Title [[= sortbut($url, 'title') ]]</td>
- <td class="tc2">Priority [[= sortbut($url, 'wstat') ]]</td>
- <td class="tc3">Added [[= sortbut($url, 'added') ]]</td>
- <td class="tc4">&nbsp;</td>
- </tr></thead>
- [[ for (@{$d{list}}) { ]]-
- <tr>
- <td class="tc1"><a href="/v[[= $_->{vid} ]]" title="[[: $_->{original}||$_->{title} ]]">[[: shorten $_->{title}, 40 ]]</a></td>
- <td class="tc2">[[= $VNDB::WSTAT->[$_->{wstat}] ]]</td>
- <td class="tc3">[[= formatdate('%Y-%m-%d', $_->{added}) ]]</td>
- <td class="tc4">[[ if($d{user}{username} eq $p{AuthUsername}) { ]]<input type="checkbox" name="sel" value="[[= $_->{vid} ]]" />[[ } else { ]]&nbsp;[[ } ]]</td>
- </tr>
- [[ } ]]-
-</table>
-[[ if($d{user}{username} eq $p{AuthUsername}) { ]]
-<select id="vnlistchange" name="vnlistchange" class="right">
- <option value="n">- with selected -</option>
- <option value="d">Delete</option>
- <optgroup label="Update priority:">
- [[ for (0..$#$VNDB::WSTAT) { ]]-
- <option value="[[= $_ ]]">[[: $VNDB::WSTAT->[$_] ]]</option>
- [[ } ]]
- </optgroup>
-</select>
-</form>
-[[ } ]]
--[[= pagebut($surl) ]]
-[[ } ]]-
-