Age | Commit message (Collapse) | Author | Files | Lines |
|
The new database schema doesn't allow an alias to be removed when it is
still linked to a VN.
|
|
|
|
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.
|
|
|
|
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...
|
|
|
|
And added new 'page' and 'id' templates for more strict validation.
|
|
|
|
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
|
|
As suggested at https://vndb.org/t2520.147
|
|
This caused every [_#] to be replaced multiple times.
|
|
To fix the cast editor.
|
|
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.
|
|
|
|
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.
|
|
- 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...)
|
|
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).
|
|
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.
|
|
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.
|
|
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.
|
|
Same as usual. Some additional changes
- Removed parfunc argument to dsInit(), not used anywhere.
- The ds_box div is only created when used.
|
|
|
|
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.
|
|
|
|
|
|
|
|
This removes one source of namespace polution, and makes it more clear
which code is using the variables.
|
|
First part of a Javascript cleanup.
|
|
|
|
|
|
It's not a preference yet and the sexual traits are still visible by
default. I'll fix that later.
|
|
Found with the tooling in the l10nusage branch.
|
|
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.
|
|
|
|
The name of the profile setting isn't very clear. Not sure what to do
with it.
|
|
|
|
Used /v+/chars, other occurrences just use singular.
|
|
This reverts commit 195a729a3d254c1c0f4b0e374f23aec331baded5.
Looks like the new behaviour wasn't welcomed by everyone,
https://vndb.org/t6685
|
|
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.
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Including the fix suggested by wakaranai at https://vndb.org/t6138.263.
|
|
Having a proper and up-to-date list of moderators is an often requested
feature.
|
|
Looks like login won't always work correctly without.
|
|
I removed it in the previous commit, but it's still used in the diff
viewer thingy.
|
|
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.
|