summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2011-02-06 16:39:58 +0100
committerYorhel <git@yorhel.nl>2011-02-06 16:39:58 +0100
commite59b9670b930b4a16d3c8e512d1d195c81151730 (patch)
treec243fdaa40f665d3f4c3a4bfa2d9ee1dbae9b1ab
parentc96ace5f64c198459213e234d01e2da2ecff2adc (diff)
Added new VN filter: voted on or not
-rw-r--r--ChangeLog2
-rw-r--r--data/lang.txt21
-rw-r--r--data/script.js3
-rw-r--r--lib/VNDB/DB/VN.pm2
-rw-r--r--lib/VNDB/Util/Misc.pm2
5 files changed, 27 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 1c1da18d..16d4fcd8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,7 +3,7 @@
- Group tags on /v+/tagmod by their category
- Added tag visibility options by category on /v+
- Added filter selector to tag pages (excl. tags tab)
- - Added new VN filters: wish/blacklist
+ - Added new VN filters: wish/blacklist, voted
2.17 - 2011-02-04
- Allow moderators to overrule VN tag votes
diff --git a/data/lang.txt b/data/lang.txt
index eede3399..062cd375 100644
--- a/data/lang.txt
+++ b/data/lang.txt
@@ -6016,6 +6016,27 @@ cs*:
hu*:
nl : Op mijn wensenlijst
+:_vnbrowse_ul_voted
+en : Voted
+ru*:
+cs*:
+hu*:
+nl : Gestemd
+
+:_vnbrowse_ul_votedno
+en : Not voted on
+ru*:
+cs*:
+hu*:
+nl : Niet op gestemd
+
+:_vnbrowse_ul_votedyes
+en : Voted on
+ru*:
+cs*:
+hu*:
+nl : Op gestemd
+
# VN add/edit form (/v+/edit)
diff --git a/data/script.js b/data/script.js
index b2ff1400..9de9eb68 100644
--- a/data/script.js
+++ b/data/script.js
@@ -2209,7 +2209,8 @@ function filVN() {
PREF_CODE == '' ? null : [
mt('_vnbrowse_ul'),
filFOptions('ul_notblack', mt('_vnbrowse_ul_notblack'), [[1, mt('_vnbrowse_ul_notblackmsg')]]),
- filFOptions('ul_onwish', mt('_vnbrowse_ul_onwish'), [[0, mt('_vnbrowse_ul_onwishno')],[1, mt('_vnbrowse_ul_onwishyes')]])
+ filFOptions('ul_onwish', mt('_vnbrowse_ul_onwish'), [[0, mt('_vnbrowse_ul_onwishno')],[1, mt('_vnbrowse_ul_onwishyes')]]),
+ filFOptions('ul_voted', mt('_vnbrowse_ul_voted'), [[0, mt('_vnbrowse_ul_votedno')],[1, mt('_vnbrowse_ul_votedyes')]])
],
];
}
diff --git a/lib/VNDB/DB/VN.pm b/lib/VNDB/DB/VN.pm
index 00d1c9a5..bb8611b1 100644
--- a/lib/VNDB/DB/VN.pm
+++ b/lib/VNDB/DB/VN.pm
@@ -61,6 +61,8 @@ sub dbVNGet {
'v.id NOT IN(SELECT vid FROM wlists WHERE uid = ? AND wstat = 3)' => $uid ) : (),
$uid && defined $o{ul_onwish} ? (
'v.id !s IN(SELECT vid FROM wlists WHERE uid = ?)' => [ $o{ul_onwish} ? '' : 'NOT', $uid ] ) : (),
+ $uid && defined $o{ul_voted} ? (
+ 'v.id !s IN(SELECT vid FROM votes WHERE uid = ?)' => [ $o{ul_voted} ? '' : 'NOT', $uid ] ) : (),
# don't fetch hidden items unless we ask for an ID
!$o{id} && !$o{rev} ? (
'v.hidden = FALSE' => 0 ) : (),
diff --git a/lib/VNDB/Util/Misc.pm b/lib/VNDB/Util/Misc.pm
index 1dd97c89..9a056b8a 100644
--- a/lib/VNDB/Util/Misc.pm
+++ b/lib/VNDB/Util/Misc.pm
@@ -11,7 +11,7 @@ our @EXPORT = qw|filFetchDB ieCheck|;
my %filfields = (
- vn => [qw|length hasani tag_inc tag_exc taginc tagexc tagspoil lang olang plat ul_notblack ul_onwish|],
+ vn => [qw|length hasani tag_inc tag_exc taginc tagexc tagspoil lang olang plat ul_notblack ul_onwish ul_voted|],
release => [qw|type patch freeware doujin date_before date_after released minage lang olang resolution plat med voiced ani_story ani_ero|],
);