summaryrefslogtreecommitdiff
path: root/lib/VNDB
AgeCommit message (Collapse)AuthorFilesLines
11 daysv2rw: Convert producers listing & searchYorhel1-58/+0
Now featuring full pagination & flexible columns.
2020-10-13notifications: Add subscribing for (un)applications of traitsYorhel1-0/+1
2020-10-02v2rw: Move redirects + cleanup some moreYorhel3-69/+1
2020-09-30Fix old reference to VNWeb::Tags::*Yorhel1-1/+1
2020-09-30v2rw/Tags::Index: Re-use tag index for trait indexYorhel1-80/+0
This code is pretty easy to re-use.
2020-09-30v2rw/Tags::Index: Rewrite the tag indexYorhel1-79/+0
Nothing new, but I do see more avenues for consolidation with traits.
2020-09-29v2rw/Tag::List: Re-use tag listing to implement trait listingYorhel1-72/+0
Duplicating that code was really too much, the listings are way too similar.
2020-09-29v2rw/TraitEdit: Rewrite trait edit form + cleanup bunch of old codeYorhel5-553/+3
This was the last form in the old v2 code, so this allowed me to get rid of the old form validation and generation abstractions. The form is mostly a duplicate of the tag editing form, as expected. It's really annoying to have to maintain pretty much duplicate code for tags and traits, but there are just enough differences that the complexity of sharing code or creating a new abstraction outweigh the benefits. :(
2020-09-27v2rw/Tags::List: Re-implement & improve the tag listYorhel2-70/+1
Now supports full pagination, displaying & sorting on VN count and displaying & filtering the searchable and applicable flags.
2020-09-27v2rw: Delete old tag edit formYorhel2-221/+1
2020-09-27v2rw/TagEdit: Rewrite tag edit form to elmYorhel1-4/+4
It's still missing a few mod features, will add those later.
2020-09-17Feeds: Move feed generation form Multi to VNWebYorhel1-1/+0
This means the feeds are now generated on demand rather than every 15 minutes. Main reason for originally implementing this into Multi was because RSS feeds tended to get requested a *lot* and I didn't want those requests to impact site performance, but now that RSS is almost dead it doesn't really matter that much anymore. A caching layer can still be added anyway. Be sure to restart Multi and delete www/feeds/ after this change.
2020-09-12v2rw: Add new filter querying framework + rewrite homepageYorhel4-524/+1
The new filter framework hasn't been extensively tested yet, but seems to mostly work. No real changes to the homepage, but I did manage to make a few queries a little bit faster. The most significant source of slowness is the releases listing, but I can't optimize that without adding indices.
2020-09-10v2rw/filters: Add experimental validation + move compat to VNWebYorhel2-17/+4
This is a minor start towards rewriting the filter logic in the new v2rw code. Filters were never validated before (I didn't have a good framework for it - now I do) and invalid filters would result in a 500. The new validation code is not yet applied, but failed validations will be logged so that I can see if it's working correctly. I mean, what better way to test than to throw it in production? I'll write new (and more flexible) SQL generation functions for these filters later, so that v2rw code can get filtered results and I can make a start on rewriting the pages that depend on the functionality. The validation schema can also be used to validate the filters stored in the DB, so I can use it to get rid of the complex handling of stored invalid filters.
2020-09-02BBCode: Consolidate bb2html & bb2text + only convert ids in thread titlesYorhel6-74/+68
Fixing bb2html to only convert ids would complicate options a lot, adding a new formatting function to only convert ids would make sense, but then all formatting functions kind of look alike, so I figured a single bb_format() to support all use cases may be a better approach. Trigger for this was that people do (understandably) put [spoiler] in thread titles, and that should not be interpreted as the spoiler tag.
2020-09-01Handler::Misc: Bring back random VNs, split new reviews and add recent commentsYorhel1-11/+68
2020-08-31Config: Fix extraction of version when there is no commit ID in git describeYorhel1-1/+1
...which happens when I tag a new release. And let's tag this 2.28.
2020-08-31Handler::Misc: Replace "Random VNs" section with "New Reviews"Yorhel1-7/+12
Still need a place to dump "latest review comments". Perhaps merge with "recent posts"? Not sure...
2020-08-31BBCode: Add support for w+ and w+.+ dblinksYorhel1-2/+2
2020-08-24reviews: Get rid of summary field & split mini/full reviewsYorhel2-8/+8
Much to my disappointment, people don't write proper summaries and, as such, summaries are not useful to be considered a "short review" on their own right. This necessitates splitting the reviews onto different pages.
2020-08-07Discussions: Fix handling of user deletionYorhel1-3/+3
Which I broke by removing the DEFAULT clause on threads_posts.uid. That column still used the old uid=0 for deleted users rather than the uid=NULL that I was planning to migrate the entire DB to. So while I'm fixing up the threads schema, may as well update this too. There's still a bunch of columns relying on uid=0, but I can fix that later.
2020-08-06Discussions: Allow discontinuous post numbers + ignore hidden posts in ↵Yorhel2-3/+3
counts/lastpost This solves a few problems: - 'hidden' posts will no longer cause the thread to be bumped to the front page. - Deleting posts will no longer cause other posts to be renumbered (and hence will not break existing links to posts) - Numbers of deleted posts will no longer be re-used (except when they were the last post in the thread - fixing this would require an additional column in 'threads', but it didn't seem worth the trouble)
2020-08-06Discussions: Make /t#.# load the correct page without redirectYorhel1-1/+1
This removes the need for the post_url() function. This is a small step towards supporting non-continuous post numbers.
2020-08-06SQL: Use vndbid for thread identifiersYorhel1-1/+1
Also drop the thread_poll_votes.tid column, as it's not really necessary. And add ON DELETE CASCADEs to threads_posts and threads_boards to simplify thread deletion. Relatively invasive change, prolly broke something.
2020-07-22BBCode: Add support for [b], [i], [s], and [u] formatting codesYorhel1-13/+46
2020-07-21Delete old producer edit form + a few more cleanupsYorhel5-472/+3
2020-07-19Producers::Edit: v2rw rewrite producer add/edit formYorhel1-4/+4
The copy-pasting here is ridiculous. But at the same time, that did allow me to quickly rewrite the form in a single commit. Here's hoping I didn't introduce too many copy-paste errors.
2020-07-19Delete old VN edit form + some other unreferenced codeYorhel3-630/+7
There's a lot more unreferenced code in VNDB::DB::*, but I'll not spend too much effort cleaning that up right now. All of it can be deleted in bulk at some point.
2020-07-12DB::VN: Exclude deleted VNs in random screenshot selectionYorhel1-0/+1
Deleted VNs could only be selected in the rare scenario where the screenshots from the deleted entry have also been assigned to another (non-deleted) entry. Fully deleted screenshots would already have been excluded with the c_weight check. Fixes https://vndb.org/t2520.457
2020-07-10DB::VN: Use image flagging status for random screenshots with filterYorhel1-4/+5
Instead of the old NSFW flag.
2020-06-29VN::Edit: Start rewrite of the VN edit formYorhel1-4/+4
This is mostly a copy-paste of the Char::Edit form.
2020-06-15Releases: Allow custom resolutions to be enteredYorhel4-40/+8
The resolution field now works much like the engine field.
2020-06-12v2rw: Convert producer pages & consolidate release row HTMLYorhel1-164/+1
The release listing on producer pages now uses the same HTML as on VN pages, so it comes with the same information & features. Unfortunately, it also comes with the same messiness... The page is kind of large and slow for producers with lots of releases, not sure what to do with that.
2020-06-08ExtLinks: Recognize additional DLSite & DL.Getchu link formatsYorhel1-3/+3
From https://vndb.org/t14142
2020-06-07DB::VN: Fetch random homepage screenshots using TABLESAMPLEYorhel1-14/+20
For some reason the old query has gotten really slow (>300ms) in production after 50b9a5b7a59e896ed4a1f65141a31b8e64c33b55. It still ran in like 30ms on my dev setup, Postgres somehow found it necessary to switch to a different query plan. This new query also uses the new image flagging votes to determine which screenshots should be visible. Just happened to be easier and faster to implement.
2020-06-04Delete old character edit formYorhel3-277/+1
Not used anymore.
2020-05-29JS: Split v2rw.js into plain.js and elm.js, only include JS files when necessaryYorhel1-1/+0
The trace_log showed that the vast majority of pageviews do not need any Elm modules at all, so we can save a lot by not loading them on the page. Some pages (most notably: VN pages for not-logged-in visitors) do need JS but don't load any Elm modules. I've added a 'js' flag to HTML::framework_() to indicate that and ensure that plain.js is still loaded.
2020-05-28Drop ReleaseExtLinks.elm in favor of pure CSS solutionYorhel2-31/+1
It's the only Elm module used on VN pages for not-logged-in visitors, so doing this in CSS makes it possible to not load an Elm bundle on those pages (when I get to splitting up the JS files). This solution also simplifies code reuse with the producer pages, but a v2rw migration of that page would have taken care of that as well.
2020-05-28Add sampling-based trace loggingYorhel1-0/+1
This is intended to get some stats about resource usage (which pages/modules are requested often, how much time do they take, etc) to reduce server load and find pages to optimize, and to track usage of Elm modules in order to see how many pageviews actually need them so that I can (hopefully) create smaller JS bundles for most pages. The logging *should* not include any personally identifiable information, but paths and query strings could still reveal more information than necessary. Trace logging is intended to only be enabled for short periods of time or with low sample rates in order to avoid slowing down the server with too much logging. I also don't intend to keep the data around for longer than necessary. I'm not providing SQL migration scripts for these, this feature is going to require custom querying anyway.
2020-05-25Chars::Edit: Character creation + copyingYorhel1-1/+1
This removes the 'Add character' link from the main menu, need some data to see if it's used.
2020-05-12Char::Edit: Initial rewrite of the character edit form, general info firstYorhel1-1/+1
2020-04-24v2rw/VN::Page: Remove old and unused codeYorhel5-954/+3
There's a lot of unused code in VNDB::DB::{VN,Release} still, but I'll not fiddle with that for now.
2020-04-20v2rw/VN::Page: Add releases listingYorhel2-14/+14
Biggest visible change here is that external links now require a click to show the dropdown box. I hadn't implemented a hover-style dropdown in Elm yet. I'm not sure yet which solution I like better.
2020-04-17v2rw/VN::Page: Start conversion of VN pagesYorhel1-1/+1
Currently implemented: - Revision diff - Info box & tags (already implemented from /v+/chars page) - Stats There's a few annoying TODO's left, this conversion will take some effort.
2020-04-15SQL: Split "perm" column into multiple booleansYorhel2-2/+2
This simplifies several actions and makes permission checks more obvious. This is also yack shaving for another feature I've been planning to add: boardmods should be able to set other users' "board" permission, tagmods for tags, etc. So that partial user bans don't need the full "usermod" permission.
2020-04-13UList.VNPage: Allow setting notes from the VN pageYorhel1-1/+2
2020-04-11v2rw: Convert VN char pages (/v+/chars)Yorhel3-193/+14
This also reimplements the VN infobox part of the page - a good first step into converting the main VN pages to v2rw. The new '?view=' parameter is used for spoiler and sexual hiding. Also fixes a bug on character pages where release-specific roles weren't displayed correctly.
2020-04-09Stop keeping track of users/threads/posts count cacheYorhel1-11/+1
Those stats havent been displayed on the site for ages, anyway. The API will now report '0' for these stats.
2020-04-06Delete old relation graph generating and caching machineryYorhel3-14/+7
2020-04-06DB::VN: Fix 500 by randomly generating a "sf0" vndbidYorhel1-1/+1