summaryrefslogtreecommitdiff
path: root/data
AgeCommit message (Collapse)AuthorFilesLines
2015-10-03Rewrote screenshot uploader to support multiple files + use jsonYorhel3-161/+145
This might have broken the screenshot uploader on some crappy browsers, but it's much cleaner than the old iframe hack. The ability to upload multiple files in one go is also very convenient.
2015-10-01VNEdit: Give error on duplicate alias + improved msg on id/page errorYorhel1-0/+12
2015-09-20formValidate: Add json template and remove json_validate() functionYorhel1-2/+2
This is less convenient than I had expected, because all the form handling code is designed to work with plain strings rather than any scalar. This means the json data has to be encoded again to get into $frm (not doing this means that, if the form didn't validate, the field won't be filled out correctly). And then decoded for validation, and then encoded again for comparison. I suspect the better solution is to fix the form handling code to handle arbitrary data structures: comparison can be done by deep comparison rather than a simple string compare, and the form generator can auto-encode-to-json if it sees a complex object. Another advantage of this solution is that the comparison function can be less strict with respect to number formatting. In the current scheme you have to be very careful that numbers are not automatically coerced into string format, otherwise the comparison will fail. Either way, that's an idea for the future...
2015-09-20formValidate: Created templates for gtin and editsum fieldsYorhel1-12/+24
2015-09-20Update usage kv_validate() to upcoming TUWF 1.0Yorhel1-14/+14
And added new 'page' and 'id' templates for more strict validation.
2015-09-08L10N: Fix typo in board searchYorhel1-1/+1
2015-09-07Implement discussion board search functionYorhel2-1/+117
Inspired by wakaranai's implementation at https://github.com/morkt/vndb/commit/b852c87ad145fdaaa09c79b6378dd819b46f7e87 This version is different in a number of aspects: - Separate search functions for title search and fulltext post search. Perhaps not the most convenient option, but the downside of a combined search is that if the query matches the threads' title, then all of the posts in that thread will show up in the results. This didn't seem very useful. - Sorting is based purely on post date. Rank-based sort is slow without a separate caching column, and in my opinion not all that useful. Implementation differences: - Integrated in the existing DB::Discussions functions, so less code to maintain and more code reuse. - No separate caching column for the tsvector, a functional index is used instead. This is a bit slower (index results need to be re-checked against the actual messages, hence the slowdown), but has the advantage of smaller database dumps and less complexity in updating the cache. Things to fix or look at: - Highlighting of the search query in message contents. - Allow or-style query matching
2015-09-03CSS: Add overflow:hidden to screenshots on homepageYorhel1-1/+1
As suggested at https://vndb.org/t2520.147
2015-09-03JS: Fix argument replacement regexp in mt()Yorhel1-1/+1
This caused every [_#] to be replaced multiple times.
2015-08-18vnstaff.js: Export vnsStaffData for use by vncast.jsYorhel1-4/+5
To fix the cast editor.
2015-08-17spritegen.pl: Add pngcrush/slow options + force png32 + atomic replaceYorhel2-0/+11
A recent version of imagemagick creates 16 bit depth PNG images by default for some reason. This results in an unnecessarily large file size increase and pngcrush doesn't do much to counter it (and its -bit_depth option has been deprecated, too). The atomic replace is quite handy to avoid people seeing any wierd intermediate images while the slow+pngcrush options are being used.
2015-08-17Merge branch 'jscleanup'Yorhel28-3388/+3405
2015-08-17jsgen: Support external command for JS compression (like uglifyjs)Yorhel3-10/+15
Tends to compress a bit better than JavaScript::Minifier::JS. But is also a lot slower, so not really useful when devving. Stats for en.js: raw gzip uglifyjs 68199 19446 JS::Minifier::XS 79862 21624 Uncompressed 107662 28663 On an unrelated note, I like how jQuery boasts about being "Only 32kB minified and gzipped.". That's quite a bit more than all of VNDB's Javascript combined. For a damn library.
2015-08-17js: Clean up misc.jsYorhel2-128/+145
- Individual blocks don't leak variables into the parent scope anymore. Previously some blocks would re-use variables from other blocks, creating (almost invisible) dependencies between te blocks. - More consistent code for ulist-change-dropdowns, and all of them have a ref= argument now. - Use 'hidden' class instead of style.display wherever that makes sense. - Remove dead 'advselect' code. Hasn't been used since the addition of search filters. - lang_select doesn't rely on the position of the language class in className anymore (seriously that stuff is fragile...)
2015-08-17js: Add L10N strings to all relevant varsYorhel3-52/+24
This simplifies the JS code in some places and removes a whole number of L10N strings from the "l10n_str" var, thus shrinking the JS size a bit (uncompressed about 1500 bytes, in fact. 500 bytes after gzip).
2015-08-16js: Clean up charops.js & tagops.jsYorhel2-111/+123
charops.js was already recently (re)written and followed much of the new conventions, so that was easy. tagops.js has been simplified somewhat, and does not rely on the position of the "tagspl#" class anymore.
2015-08-15js: Let jsgen.pl preprocess L10N strings + add L10N strings to some varsYorhel6-53/+29
This simplifies the JS version of mt() a bit and makes the whole internationalization framework a bit more robust. I also changed the VARS.{rlist_status,age_ratings,languages,platforms,char_roles} arrays to include the L10N string. This simplifies the JS code and reduces the JS size. There's a few more of such lists that can be transformed in the same way, I'll get to that later.
2015-08-15js: Wrap included files in anonymous functionYorhel7-460/+435
This removes the need to indent all files and add the anonymous function manually, and it also provides clean and consistent semantics. I already rewrote the library-like files earlier on to add their public interfaces to the window object, so everything should keep working after this change. It's still possible that some files use use a function from another non-library file. Those will break, but I'm sure such cases will be found soon enough, if they exist.
2015-08-15js: Cleanup + improve dropdownsearch.jsYorhel1-131/+165
Same as usual. Some additional changes - Removed parfunc argument to dsInit(), not used anywhere. - The ds_box div is only created when used.
2015-08-14CSS: Add sans-serif as fallback fontYorhel1-4/+4
2015-08-11js: Cleanup dropdown.js + remove http_request globalYorhel3-73/+90
dropdown.js has also been improved a bit to only add the dd_box node to the DOM when it's actually going to be used, and it now only captures document.onmousemove when a box is shown.
2015-08-11js: Cleanup dateselector.jsYorhel2-59/+88
2015-08-11js: Cleanup tabs.jsYorhel1-34/+46
2015-08-10js: Clean up iv.js to use own namespace + better prev/next generationYorhel2-88/+119
2015-08-10js: Move generated variables into global VARS structureYorhel8-36/+37
This removes one source of namespace polution, and makes it more clear which code is using the variables.
2015-08-10Split script.js into multiple smaller filesYorhel25-3381/+3317
First part of a Javascript cleanup.
2015-08-08Char page: Dynamically show/hide trait groups depending on visible traitsYorhel1-7/+9
2015-08-08Hide sexual traits by default + Add profile option to change defaultYorhel1-0/+12
2015-08-08Add sexual trait toggle to character informationYorhel3-27/+67
It's not a preference yet and the sexual traits are still visible by default. I'll fix that later.
2015-07-25L10N: Remove unused translation stringsYorhel1-108/+0
Found with the tooling in the l10nusage branch.
2015-07-21Add profile option for the default spoiler settingYorhel2-18/+22
This fixes the unexpected behaviour that changing the spoiler setting on one page will change it for all pages. All manual spoiler changing options are temporary now.
2015-07-21L10N: Combine spoiler setting stringsYorhel2-146/+40
2015-07-21Add profile option for default visible tag categories on VN pagesYorhel3-4/+15
The name of the profile setting isn't very clear. Not sure what to do with it.
2015-07-21Add profile option to show or summarize tags on VN pages by defaultYorhel2-1/+13
2015-07-20L10N: Support plural forms for charrolesYorhel1-30/+30
Used /v+/chars, other occurrences just use singular.
2015-07-20Revert "js: Change image viewer clicking behaviour"Yorhel2-31/+16
This reverts commit 195a729a3d254c1c0f4b0e374f23aec331baded5. Looks like the new behaviour wasn't welcomed by everyone, https://vndb.org/t6685
2015-07-19js: Change image viewer clicking behaviourYorhel2-16/+31
Clicking on the image will now switch to the next image, or close the viewer if there is no next. Clicking outside of the viewer will close the it.
2015-07-19L10N-DE: Translation updates + whitespace removalMarcel Weyers13-172/+266
2015-07-19Remove reliance on Referer header for /[vr]+/list modificationsYorhel1-1/+1
2015-07-19Remove reliance on Referer header for language switchingYorhel1-1/+1
First step in removing the use of the Referer header for redirects. The Referer header is ugly and not always reliable, it's better to encode the required information in the URL.
2015-07-12L10N-ES: Various old and uncommitted fixesYorhel2-9/+9
2015-07-12L10N-DE: Various old and uncommitted fixesMarcel Weyers2-30/+33
2015-07-12d17: Document the interface translation procedureYorhel10-84/+171
2015-07-01CSS: Minor improvement to credit listing on staff pagesYorhel1-0/+2
Including the fix suggested by wakaranai at https://vndb.org/t6138.263.
2015-06-15d7: Replace "top 5 contributors" with "special users" listingYorhel8-38/+30
Having a proper and up-to-date list of moderators is an often requested feature.
2015-06-10config_example.pl: Add a cookie_defaults.pathYorhel1-0/+1
Looks like login won't always work correctly without.
2015-05-13L10N: Re-add _staff_as textYorhel1-0/+12
I removed it in the previous commit, but it's still used in the diff viewer thingy.
2015-05-13Changed layour of staff pagesYorhel2-23/+6
Not entirely sure if this is an improvement, but it's slightly more consistent with other layouts (combination of user page, release page and character page), and leaves more room for the credit/cast listings.
2015-05-13Add staff statistic to main menuYorhel1-0/+12
2015-05-13I18N: Add cleanup routine to lang.pl + remove English text from tlsYorhel1-468/+468