summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authoryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-15 07:37:37 +0000
committeryorhel <yorhel@1fe2e327-d9db-4752-bcf7-ef0cb4a1748b>2008-06-15 07:37:37 +0000
commitdfcfb4a402dcfbc1b1873c5ead08584c3e71a5c6 (patch)
tree816ed80e180bc818d245be54ea90111f59d7ab86 /data
parentf8b467a1a6cff156a55770642e34a1d5c0142079 (diff)
Permenantly removed the CISV link, added links to renai.us and encubed, and small bugfix in the VNDBID pattern matching
git-svn-id: svn://vndb.org/vndb@28 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
Diffstat (limited to 'data')
-rw-r--r--data/tpl/defs.pl8
-rw-r--r--data/tpl/vnedit3
-rw-r--r--data/tpl/vnpage10
3 files changed, 12 insertions, 9 deletions
diff --git a/data/tpl/defs.pl b/data/tpl/defs.pl
index 3982028e..1f2056a7 100644
--- a/data/tpl/defs.pl
+++ b/data/tpl/defs.pl
@@ -147,8 +147,8 @@ sub summary { # cmd, len, def
}
if(!$as && s/(http|https):\/\/(.+[0-9a-zA-Z=\/])/<a href="$1:\/\/$2" rel="nofollow">link<\/a>/) {
$l = 4;
- } elsif($as) {
- s/^([duvpr][0-9]+)[^\w]*$/<a href="\/$1">$1<\/a>/;
+ } elsif(!$as) {
+ s/^(.*[^\w]|)([duvpr][0-9]+)([^\w].*|)$/$1<a href="\/$2">$2<\/a>$3/;
}
while(s/\[\/url\]/<\/a>/i) {
$l -= 6;
@@ -381,9 +381,9 @@ sub cform {
$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" />\n</li>\n|,
+ $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});
+ _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|,
diff --git a/data/tpl/vnedit b/data/tpl/vnedit
index f1137fc2..0b5299e8 100644
--- a/data/tpl/vnedit
+++ b/data/tpl/vnedit
@@ -44,8 +44,9 @@
] },
{ 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://www.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 => 'input', name => '&nbsp;', short => 'l_cisv', pre => 'http://cisvisual.net/title/', class => 'shortopts' },
{ type => 'static', text => '<br />' },
{ type => 'input', name => 'Related anime', short => 'anime' },
diff --git a/data/tpl/vnpage b/data/tpl/vnpage
index d65de024..e8b19dde 100644
--- a/data/tpl/vnpage
+++ b/data/tpl/vnpage
@@ -18,8 +18,9 @@
[ 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://www.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' } ],
- [ l_cisv => 'CISVisual link', sub { $_[0] ? '<a href="http://cisvisual.net/title/'.$_[0].'">'.$_[0].'</a>' : 'No link' } ],
[ anime => 'Related anime', sub { join(' ', map qq|<a href="http://anidb.net/a$$_{id}">$$_{id}</a>|, sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ],
[ categories => 'Categories', sub { join(' ', map { $VNDB::CAT->{substr($_->[0],0,1)}[1]{substr($_->[0],1,2)}.'('.$_->[1].')' } sort { $a->[0] cmp $b->[0] } @{$_[0]}) || 'No categories selected' }, 1 ],
[ relations => 'Relations', sub { join("<br />\n", map { $VNDB::VREL->[$_->{relation}].': '._hchar($_->{title}) } sort { $a->{id} <=> $b->{id} } @{$_[0]}) } ],
@@ -67,9 +68,10 @@
$1 == 0 ? sprintf 'N/A (%d vote%s)', $2, $2>1?'s':'' : sprintf '%.2f (%d vote%s)', $1, $2, $2>1?'s':''#e;
my @links = (
- $d{vn}{l_wp} ? [ 'Wikipedia', 'http://en.wikipedia.org/wiki/%s', $d{vn}{l_wp} ] : (),
- $d{vn}{l_vnn} ? [ 'V-N.net', 'http://visual-novels.net/vn/index.php?option=com_content&amp;task=view&amp;id=%d', $d{vn}{l_vnn} ] : (),
-# $d{vn}{l_cisv} ? [ 'CISVisual', 'http://cisvisual.net/title/%d', $d{vn}{l_cisv} ] : (),
+ $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://www.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}};