summaryrefslogtreecommitdiff
path: root/lib/VNDB/Util/CommonHTML.pm
AgeCommit message (Collapse)AuthorFilesLines
2021-01-20v2rw: Rewrite done, time to clean up old v2 codeYorhel1-34/+0
Yay! There are no more request handlers in the VNDB::* namespace and no more Javascript in data/js/. This cleans up a lot of old legacy code that wasn't fun to maintain.
2020-07-21Delete old producer edit form + a few more cleanupsYorhel1-189/+1
2020-04-24v2rw/VN::Page: Remove old and unused codeYorhel1-83/+1
There's a lot of unused code in VNDB::DB::{VN,Release} still, but I'll not fiddle with that for now.
2020-04-01VN::Graph: Also generate VN graphs on-demandYorhel1-24/+1
Same change as with Producers::Graph before. This also adds an option to show/hide unofficial relations. Restructured the code a bit to allow for sharing code between Producers::Graph and VN::Graph.
2019-12-22ulist: Use new lists for VN vote stats & listingYorhel1-8/+12
To my surprise, I actually managed to achieve acceptable performance by just adding two indices. I totally expected I'd have to keep a cache column in ulist_vns whether the row is private or not. The partial index on the users table in fact improves the performance of the vote graph query. A covering index improves that even further, but that requires Postgres 11+, which the Docker image doesn't have yet (and isn't all that crucial anyway). There's a rather annoying potential for confusion regarding the private flag on votes. The user page & list stats only look at whether the 'Voted' label is private, whereas the VN stats use the "proper" approach of checking for any public label. Not entirely sure which of the two is more intuitive.
2019-11-27CSS: Less hacky .maintabsYorhel1-77/+3
Flexbox instead of floats. Apart from that, it's still very hacky. Uses relative positioning in order to overlay 1px over the .mainbox. This should fix the ages-old 'bottom tabs overlay next mainbox' bug and provide more flexibility with adding a top-level <fieldset> or centered buttons.
2019-11-14v2rw: Convert staff pagesYorhel1-1/+0
This is where the ExtLink module comes in handy: generating the revision comparison thing is much easier now. Did find and fix a bunch of issues with the new revision box generator code, but that was to be expected, I hadn't tested that code well yet and this is its first more demanding use. Rest of this is a pretty direct rewrite, nothing too special.
2019-10-16v2rw: Convert staff adding/editing formYorhel1-52/+2
This is the first major editing form to be converted, so I'm expecting a little breakage. A good chunk of this code has been copied from v3. In terms of the UI there has been a small change: aliases that are still referenced do not have the 'remove' link and instead have a flag that shows that they are still referenced. This ought to be a bit friendlier than throwing an error message after the user has submitted the form. Some other things I'd like to improve in this form: - BBCode preview - Pasting in external links and letting the form figure out the Pixiv ID, etc. - Or perhaps even: Integrate AniDB/Wikidata search/autocompletion.
2019-10-14v2rw: Convert user listingYorhel1-16/+1
2019-10-14Delete the user deletion featureYorhel1-6/+0
It's rather much code just to run a single SQL statement that I almost never need. Incidentally, the feature was also broken because the DELETE permission wasn't granted in perms.sql.
2019-10-11Two rewards-related bug fixesYorhel1-2/+2
2019-10-10rewards: Apply supporters badge and unicode name (almost) everywhereYorhel1-2/+2
Only place where this isn't applied (yet?): Sorting user lists still goes by the old username and board names don't use the new unicode names. I have to say, I quite like the sql_user() and user_() pattern. It's not without problems when applied to everything, but it's good enough for several use cases.
2019-10-03SQL: Get rid of the users_prefs table, store preferences in users tableYorhel1-1/+1
This bloats the users table a little bit, but that's fine. The main advantage of this change is that we now have a proper schema for user preferences, rather than the schemaless key-value mess we had before. This commit also splits the 'tags_cat' preference up into tags_cont, tags_ero and tags_tech bools, as that's more compact to store and easier to work with. This commit also changes the 'notify_nodbedit' preference to 'notify_dbedit' with inverted meaning. The reason the value was negated in the first place was because the old schemaless approach did not support positive defaults.
2019-09-27v2rw: Convert history listingsYorhel1-1/+0
And I changed the filter selection into a more form-like thing. It's slightly more powerful, but not sure it's such a huge improvement in terms of UI. Everything should be identical apart from that.
2019-09-25v2rw: Add Elm & db_edit framework + Convert doc page editingYorhel1-17/+1
Most of this is copied from v3. I did improve on a few aspects: - db_edit() and db_entry() use VNDB::Schema rather than dynamically querying the DB. This has the minor advantage of a faster startup. - The Elm code generator now writes to multiple files, this avoids the namespace pollution seen in v3's Lib.Gen and makes the dependency graph a bit more lean (i.e. faster incremental builds). - The Elm code generator doesn't update the timestamp of files that haven't been modified. This also speeds up incremental builds, the elm compiler can now skip rebuilding unmodified files. - The Elm API response generator code now uses plain functions rather than code references and all possible responses are now defined in Elm.pm. Turns out most API responses were used from more than a single place, so it makes sense to have them centrally defined. The doc page preview function is also much nicer; I'd like to apply this to all BBCode textareas as well. (Elm.pm itself is ugly as hell though. And we will prolly need some HTML form generation functions in Elm to make that part less verbose)
2019-09-18v2rw: Convert authentication code to VNWeb::AuthYorhel1-1/+1
More churn! Also converted v3 to use VNWeb::Auth, considering the API is pretty much the same. Converted VNWeb::* to use VNDB::Config directly rather than read from tuwf->{}, converted VNWeb::HTML to use VNWeb::Auth, and updated util/vndb.pl with the new code style. I tested as much as I could, but I'm sure I broke something.
2019-09-14Add "msg user" to revision box + add own ID to boards when PMingYorhel1-1/+5
2019-09-14Remove spoiler warning from character revision pagesYorhel1-9/+0
1. Every revision page may contain spoilers 2. Nobody reads those big red warnings, anyway
2019-07-20Make account deletion a Yorhel-only actionYorhel1-1/+1
Not that I don't trust mods, but there's no accounting on this feature. Limiting it to myself is easier than adding logging.
2019-07-13Uh, let's limit the shortened diffs to doc pagesYorhel1-1/+2
Otherwise character trait listings will also get shortened, which results in broken HTML and doesn't work well.
2019-07-13Reduce context in large diffsYorhel1-1/+11
This is mainly useful for doc changes.
2019-07-12Display hidden users in VN vote listings, but hide their username/idYorhel1-2/+3
https://vndb.org/t950.119 - old request, but better late than never.
2018-02-08Store d+ pages in the DB as versioned entries + use markdownYorhel1-4/+6
This touches a bunch of things: - Adds a new first-class database entry type - Removes the d+.+.+ BBCode link syntax, adds a new d+#+ and d+#+.+ link syntax (references have been updated where possible) - Adds a new dependency on Text::MultiMarkdown
2016-01-20L10N: Intern all VNDB::Util::* stuffYorhel1-69/+88
With some related edits in other parts of the code, mostly due to interface changes to htmlRevision() and htmlFormError(). Trivial replacements were automated by a super awesome script.
2016-01-19Move some VNDB::L10N stuff to VNDB::Func + intern VNDB::FuncYorhel1-1/+1
2015-11-01Remove 'you need to be logged in to edit this page' messageYorhel1-5/+1
While helpful, it's also rather dominant. We're not that desperate for new contributes anymore.
2015-11-01Switch to HTML5 doctype + s/acronym/abbr/ + s/&nbsp;/&#xa0;/eYorhel1-4/+4
I'd have preferred to stick with XHTML 1.0, but unfortunately browsers won't allow you to use modern Javascript APIs with an older doctype. Note that most pages don't actually validate correctly as HTML5, I'm relying on browsers to be lenient. In either case, I'd like VNDB to stay valid XML (XHTML5, then), and luckily that shouldn't be a problem.
2015-10-17SQL: Fix all browsing queries to use the new schemaYorhel1-8/+8
This basically makes VNDB browsable again, but editing entries is still broken. I split off the get-old-revision functionality from the db*Get() methods into db*GetRev(). This split makes sense even with the old SQL schema: db*Get() had to special-case some joins/filters when fetching an older revision, and none of the other filters would work in that case. This split does cause some code duplication in that all db*GetRev() methods look very much alike, and that the columns they fetch is almost identical to the db*Get() methods. Not sure yet how to avoid the duplication elegantly. I didn't do a whole lot of query optimization yet (most issues require extra indices, I'll investigate later which indices will make a big difference), but I did fix some low hanging fruit whenever I encountered something. I don't think I've worsened anything, performance-wise.
2015-01-27staff: Fix various parts to recognize the new staff databasemorkt1-2/+2
2015-01-02staff: Fix deleting of staff + use JSON to pass data + minor fixesmorkt1-0/+1
2014-12-22Initial implementation of a staff/seiyuu databasemorkt1-4/+5
2014-10-16Completely get rid of the old charedit perm flagYorhel1-6/+5
2013-11-25CommonHTML: Made 'copy' tab invisible to users without editsYorhel1-1/+1
2012-07-02Handler::VNPage: Added releases tab + comparison tableSpaceRanger1-0/+6
2012-01-25Do most of the table striping in CSSYorhel1-12/+11
Using CSS3 selectors. This is a more elegant approach, and since browser support for CSS3 selectors isn't as crap as it used to be I can finally make use of them.
2012-01-10Allow one fractional digit for VN votesYorhel1-10/+10
The interface to set a non-integer vote isn't very nice, but at least it works. Or so I hope.
2011-08-30Changed "remove"- and "add"-like words to a single lang.txt entryQCyph1-1/+1
2011-08-24Util/CommonHTML.pm: fixed copy tab and edit message bugs on character pageQCyph1-2/+2
2011-05-01Switched back to Algorithm::Diff::XSYorhel1-3/+6
Algorithm::Diff::Fast suddenly disappeared for some reason...
2011-04-30Cleaned up permissionsYorhel1-3/+3
- Removed 'hist' and 'mod', weren't used at all - Merged 'del' and 'lock' into a single 'dbmod'
2011-04-08Added spoiler warning to character revision pagesYorhel1-1/+10
2011-03-20chardb: Added simple character browser + searchYorhel1-0/+1
2011-03-19chardb: Implemented char entry copyingYorhel1-2/+2
2011-02-16chardb: Added character add/edit form + misc. fixesYorhel1-1/+1
2011-02-15chardb: Added char entry tables and updated the basic revision frameworkYorhel1-8/+11
The Perl code and SQL-revisioning code only handles the name, original, alias and desc fields at the moment. There is a basic /i+ and /i+.+ page for testing, which should have all the functionality required for the revisioning framework.
2011-02-14chardb: Added trait index and searchYorhel1-0/+1
2011-02-13chardb: Added trait add/edit formYorhel1-2/+2
2011-01-27TUWF: Added tag name to several end() callsYorhel1-10/+10
Haven't found any bugs this way, yet. I doubt there'll be any problems, but it's a nice new feature that could help quite a bit. :-D
2011-01-27TUWF: Replaced ugly html() redefine hack with the new html() optionsYorhel1-16/+1
2011-01-25TUWF: Initial convert from YAWF to TUWFYorhel1-8/+9
There may still be some bugs present and I've only converted the points where TUWF is incompatible with YAWF. The new TUWF features are not in use yet, I'll do that later on. Note that, in order to run the new code, TUWF must be installed on your system. The configuration for the TransAdmin plugin has also changed. Other than that there shouldn't be any issues.