summaryrefslogtreecommitdiff
path: root/lib/VNDB/DB/Tags.pm
AgeCommit message (Collapse)AuthorFilesLines
2021-01-20v2rw: Rewrite done, time to clean up old v2 codeYorhel1-162/+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-09-27v2rw: Delete old tag edit formYorhel1-54/+1
2020-02-21SQL: Allow tags_vn.uid to be NULL for deleted usersYorhel1-42/+1
This fixes the issue of tag votes getting deleted when a user account is deleted, despite these votes being part of the kept "database contributions" mentioned in the privacy policy.
2020-01-28v2rw: Convert the VN tagmod interfaceYorhel1-33/+1
This also changes the voting interface a little bit: - Spoiler options are a bit more concise - Mouse-over a button indicates what it does - The -1 and -2 options are not available anymore - Downvoted tags are hidden by default - Moderators can now vote-and-overrule in a single go
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-07SQL: Perform incremental updates on tags_vn_inherit when tags are modifiedYorhel1-0/+3
This has some limitations: - tags.c_items is not updated, so that may be out of sync. (The UPDATE takes about 400ms, so doing that more regularly from Multi::Maintenance should be a viable option) - When the hidden flag of a VN is changed, the tags will also be out of sync. - I don't see a way to do fast incremental updates when tag entries themselves are changed, e.g. to handle changes in the tag tree or searchable flag
2019-06-26Re-add tag vote deletion moderation featureYorhel1-1/+7
2019-06-26VNPage: Don't show deleted/unapproved tags in tag cloudYorhel1-3/+8
The previous code would assume that these tags did not have any votes, but that assumption doesn't necessarily hold anymore.
2019-06-26Tags: Split "meta" field into "searchable" and "applicable"Yorhel1-8/+7
As discussed in https://vndb.org/t12507 TODO: - Same conversion for traits - Re-add mod ability to delete all votes for a particular tag?
2018-09-29Add default spoiler level to tags and use it in spoiler calculationYorhel1-5/+5
https://vndb.org/t11296.3 (And I forgot to add update_20180929.sql in the previous commit)
2016-07-03Generalize substring search relevance + apply to most dropdown searchesYorhel1-4/+7
This is a generalization of the search improvements made in 7da2edeaa0f6cf7794f4f8f68960497dc1be893c and 92235222dba4e5d0c7713d53ef12e0f10e371b83 And has been applied to the dropdown searches for producers, staff, tags and traits. For all those searches, exact matches are listed first, followed by prefix matches, and then substring matches. Relevance is currently only based on the primary name/title and ignores aliases (except for staff). This is fixable, but not trivial, and I'm not sure it's all that useful.
2016-07-03DB::Tags::dbTTTree: Use hash lookup for parent IDsYorhel1-3/+4
Reduces page load time of the trait index from 200ms to 20ms. Also provides a slight improvement for other tag/trait tree views.
2015-10-17SQL: Fix all browsing queries to use the new schemaYorhel1-3/+3
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.
2011-04-03Order the traits groups on /i by their 'order' columnYorhel1-3/+5
2011-02-21chardb: char-by-trait lookup + trait usage count + tag-code sharingYorhel1-21/+22
I'll have to optimize the updating of traits_chars as soon as I have some data to test with. Also renamed tags.c_vns to c_items, to have it share the same name as traits.c_items. This makes it a lot easier to re-use code for both tags and traits, such as what I did with dbTagTree/dbTraitTree -> dbTTTree and the childtags() and parenttags() functions.
2011-02-05Group tags on /v+/tagmod by their categoryYorhel1-2/+2
2011-02-05Properly save tag category when adding a new tagYorhel1-2/+2
2011-02-04Allow setting tag category for all child tags recursivelyYorhel1-6/+10
Takes the burden out of our dear tag moderators to edit *all* tags manually on the next update.
2011-02-04Added category field to tags (content/ero/technical)Yorhel1-2/+2
Not very useful at the moment, but will be used to improve several other things.
2011-01-04Added checkboxes to VN tagmod and implemented the overrule logicYorhel1-26/+21
This finalizes the moderation tag vote overrule. And Damnit, the logic behind saving the tags to the database isn't fun, I hope I haven't made any mistakes there.
2011-01-03Added tag overrule indicators to tag link browser and VN tag editorYorhel1-7/+9
This is the second step in adding support for overruling tag votes by moderators. This required a different approach to calculating the score in dbTagStats(). For some reason this approach turns out to be slightly faster as well...
2011-01-03SQL: Added tags_vn.ignore column and updated queries to respect thisYorhel1-34/+5
This is the first step in adding support for overruling tag votes by moderators. Also removed some unused options from dbTagStats(); the tag-vote-stats-by-user pages have been removed in the previous VNDB update, which was the only page using these additional options.
2010-12-21Pass VN tag filters by ID rather than nameYorhel1-1/+1
This makes the UI slightly uglier and less intuitive. I'll see if I can find a way around that. This update is required for the permanent browsing filters to be fast and reliable.
2010-12-13Added advanced tag link browserYorhel1-4/+34
Still need to add some links to the browser to parts of the site.
2010-12-10Keep track of last modification date for tag<->vn linksYorhel1-4/+27
Currently unused, but this will be useful in the future. dbTagLinkEdit() is now a lot more complex, since the last modification date will be incorrect for unmodified tag links when we simply delete and re-insert all related links like the old function did.
2010-10-31Remove duplicate votes when merging tags (fixes a 500)Yorhel1-0/+4
2010-01-11Tags: Another bugfix in the parent tags SQL query and displayYorhel1-1/+1
It should work perfectly now...
2009-11-29Tags: Replaced tag_tree() with WITH .. SELECT queries, and removed /g/debugYorhel1-5/+30
The return value of dbTagTree() is also somewhat easier to work with.
2009-11-27DB: Abstracted all ORDER BY clauses in the DB abstraction layerYorhel1-6/+20
The ORDER BY was previously specified using an 'order' argument, which would then be directly inserted into the query. The new method is the same as what I used for the public API: two 'sort' and 'reverse' arguments. This should be less error-prone and more readable. This changes quite a lot of code, so I hope I haven't forgotten to update something along the way.
2009-11-27Display VN ratings on tag pages as wellYorhel1-27/+1
With this method I managed to reuse the VN list table code for the lists on both the VN browser and the tag pages. And optimized away the dbTagVNs() function while I was at it (dbVNGet() is powerful enough)
2009-11-27Changed VN score on tags pages to display plain averagesYorhel1-5/+5
For three reasons: - Speed tag_vn_calc() is now more than 10 times faster (granted, it could have been a lot faster even with the bayesian rating, but whatever) - Consistency with the tag scores displayed on the VN pages (which are raw averages as well) - It didn't always make sense
2009-08-08Don't show hidden VN items on g+ pagesYorhel1-0/+1
Ideally, all tag relations should be removed when hiding a VN, but that would make hiding a destructive action, while currently it can still be reverted easilily.
2009-08-08Converted tags.added to timestamptzYorhel1-2/+3
2009-07-08Keep track of users who requested tagsYorhel1-5/+11
2009-03-28Fixed and re-organized tag<->vn calculationYorhel1-1/+1
Fixed major performance bug caused by referencing the wrong table, moved all intermediate views to tag_vn_calc() as temporary views (similar to update_vnpopularity()) and renamed tags_vn_stored to tags_vn_bayesian.
2009-03-18Experimenting with a location for tags on v+ pagesYorhel1-2/+4
2009-03-15Some more content on the tag indexYorhel1-1/+3
2009-03-15Bugfix: Copy old tag names over to new tag on mergeYorhel1-0/+2
2009-03-15Removed tag deletion featureYorhel1-9/+1
There's no need for that anymore with the merge and state options
2009-03-15Tag mergingYorhel1-1/+10
2009-03-14Expanded the tag list with a search, and more for use by non-tagmodsYorhel1-2/+3
2009-03-14Added tag list (/g/list) to browse tags by status, mostly for moderator useYorhel1-3/+4
2009-03-14Separated table for tag aliases + proper checking of unique aliases and namesYorhel1-13/+28
2009-03-14Added tag states for pending/deleted/acceptedYorhel1-5/+10
2009-03-08(Kind-of) finalized the tag indexYorhel1-3/+10
Couldn't think of anything more useful to display than simply all tags without parents and a few of their subtags.
2009-03-08Added caching of tags_vn_bayesian and the VN count for tagsYorhel1-13/+4
Updated hourly by Multi. May want to look for a better way to update this cache, because I'm afraid the current tags_vn_calc() is going to perform very badly on larger databases.
2009-03-08Added user taglistYorhel1-10/+43
2009-03-07Hiding spoilers on tag pagesYorhel1-3/+9
2009-03-07Replacing random VN counts with actual data on tag pagesYorhel1-1/+4
Just prototyping, current implementation is too slow for actual use.
2009-03-07Adding list of VNs to tag pagesYorhel1-1/+21