summaryrefslogtreecommitdiff
path: root/lib/VNDB
AgeCommit message (Collapse)AuthorFilesLines
2010-11-25JS: Split script.js into a separate file for each languageYorhel1-1/+1
This greatly reduces the size of the Javascript file. The compressed size has been reduced with about 9kB, and is now a total of 14kB for en.js. A nice property of this is that more translations can be added without increasing the JS size. While I was at it, I made jsgen.pl also replace mt() function calls in cases where an exact TL string was requested without any additional arguments and/or formatting codes. This helped reduce the compressed size by about 1kB. My aim is to keep *all* the JS code of VNDB smaller than the jQuery core library, as a general "fuck you" towards users of large and bloated JS libraries. We must keep the VNDB page loading times lower than that of other sites, after all!
2010-11-24vndb.pl: Use the Makefile to auto-update static filesYorhel1-1/+1
Rather than trying to figure out what to update in the Perl code, duplicating the logic that's already present in the Makefile. This is only enabled when 'regen_static' is set to true in data/config.pl.
2010-11-22Added basic validation of the filter stringYorhel2-6/+11
fil_parse() now checks for proper formatting of the string and ignores key/value pairs that are not the list of allowed keys. This makes it impossible to provide extra, unintended, arguments to dbReleaseGet(), such as 'results'.
2010-11-21Use ~ as value separator in the filter string, rather than a commaYorhel1-2/+2
It seems a comma has to be escaped in query string values. A ~ doesn't and thus makes the URIs significantly shorter.
2010-11-21Implemented the server side of the new release filter selectorYorhel4-68/+106
There's no validation of the filter string yet, and somehow I don't feel like adding that; it's a lot of code and there's nothing to protect - the values are inserted using parameters into a SELECT query, the worst thing that could happen is the user receiving a 500. Also, I've started using the perl '//=' operator, which was added in 5.10. This removes support for older perls.
2010-11-21Implemented the client side of the new release filter systemYorhel1-106/+11
This isn't entirely functional yet, the server side will need to be rewritten as well. And after that new filters should be added and this system should also be used for VN/producer search. script.js is getting quite large with all those new translation strings, it may be an idea to generate a separate .js file for each language and only load the one being used. I won't have a valid reason to feel bored anytime soon, at least...
2010-11-14SQL: Added ON DELETE clause to all foreign keys referencing users (id)Yorhel1-15/+1
This makes deleting user accounts less error prone. It also seems I forgot to git add update_2.14.sql in an earlier commit, sorry about that.
2010-11-14Handler::Misc: Added title attribute to the feed cssiconsYorhel1-5/+3
This also gets rid of three perl warnings.
2010-11-13Homepage: Added feed iconsYorhel1-3/+8
2010-11-13Added <link> elements for the related atom feeds to some pagesYorhel3-5/+7
2010-11-11Handler::Discussions: Fixed formcode bug with the quick reply featureYorhel1-0/+1
2010-11-11Handler::VNEdit: Fixed bug with reverse relation update of "official"Yorhel1-1/+1
The official flag of untouched relations wasn't properly copied from the old revision.
2010-11-11DB::Releases: Removed extra ON clause from JOIN releasesYorhel1-1/+1
I added this clause to slightly speed up the SQL query at producer pages, but it turns out to slow down release search queries by a factor 100.
2010-11-11Bugfix: reverting a VN image now worksYorhel1-2/+5
This is a very old bug. Never fixed it before because I couldn't think of a clean/easy solution and it wasn't important to waste my time on.
2010-11-11Producer release listing: added dev/pub info and expand/collapse linkYorhel2-5/+10
It's an awesome feature now. :-)
2010-11-11Display releases grouped by VNs on producer pagesYorhel3-45/+67
A nice expanded view. It also happens to be faster than the old view in terms of SQL queries. (In most cases at least) Can be improved a little more by: - Adding an 'expand/collapse' feature to list only the VNs - Adding a column indicating the role of the producer (dev/pub)
2010-11-11Util::CommonHTML:revdiff: Removed encode/decode UTF-8 passYorhel1-6/+2
Algorithm::Diff::Fast can handle perl encoded UTF-8 perfectly fine, so the encode and decode functions aren't necessary anymore.
2010-11-11Replaced Algorithm::Diff::XS with Algorithm::Diff::FastYorhel1-1/+1
This module is cleaner, faster and has less dependencies. (didn't exist yet at the time I first implemented the revision diffs)
2010-11-10Handler::VNPage: display "official" relation statusYorhel1-0/+1
2010-11-10Started on adding an "official" flag to vn<->vn relationsYorhel3-15/+19
This is the first part. The flag is stored in the database, can be edited through the usual VN edit form, and is displayed in the diff viewer. Things to do to make this feature fully functional: - display "official" status on VN page at the relation listing - update relation graphs to display unofficial relations differently - update guidelines
2010-11-09Added human confirmation question to the registration pageYorhel1-2/+11
Just a simple question.
2010-11-07DB::Misc: Optimized dbRevisionGet()Yorhel1-17/+19
The code is a bit more complicated now, and it's not a lot faster, but at least this helps a bit.
2010-11-07Optimized random VN fetching queryYorhel1-1/+7
Similar to ab64b573846da39622b8d430b079d7e8806a35d3, but with a few more constraints as dbVNGet() is a more generic function. This and the other commit greatly improve the page generation time of the homepage. From ~250ms to ~110ms in my tests.
2010-11-07Optimized random screenshot fetching queryYorhel1-8/+12
By rewriting the query and using the trick documented here: http://blog.rhodiumtoad.org.uk/2009/03/08/selecting-random-rows-from-a-table/ Can be further optimized by putting an index on vn_screenshots.scr
2010-11-06Bugfix: delete/update all references when deleting a userYorhel1-0/+5
Really need a cleaner solution for that. PostgreSQL actually provides a better solution, need to change to that.
2010-11-06URL change: /u/logout => /u$id/logoutYorhel2-3/+6
Also fixes a cross-site request forgery vulnerability. Not as strong as the others but it's not very crucial anyway.
2010-11-06Fixed cross-site request forgery vulnerabilitiesYorhel10-16/+97
2010-11-03Merge branch 'master' into betaYorhel2-2/+3
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Func.pm
2010-11-03Automatically remove duplicate aliases on /v+/editYorhel1-3/+12
And clean up the alias field before it gets inserted into the DB. Does not provide any feedback to the user, let's just hope our users are clever enough to figure out what happened.
2010-11-03Use newlines to separate VN aliasesYorhel1-0/+1
2010-11-03Handler::Discussions: Increased thread number display at /t for db and vYorhel1-1/+1
Those boards are most active.
2010-11-03Handler::Discussions: Only display board names different from the filterYorhel1-5/+6
Looks cleaner now.
2010-11-03Compressed the thread listing into one row per threadYorhel1-14/+11
2010-11-02Prefix all cookies with a configurable cookie_prefixYorhel3-6/+6
This replaces the "cookie_auth" setting, and applies to all cookies in use by VNDB.
2010-11-02Handler::(Misc|VNPage): Added HTML width/height to screenshot thumbnailsYorhel2-2/+6
And made sure the dimensions are truncated in VNDBUtil::imgsize(). Setting the width/height attributes makes sure that the browser can reserve space for the image when it hasn't been loaded yet, which prevents the overall page layout from changing while the images are loading. (which is annoying if your connection isn't all that fast)
2010-11-02Multi::Image: Abstracted image dimension calculation into VNDBUtilYorhel1-1/+2
Which may also be useful for other scripts.
2010-11-01Properly order the relations listed on producer pagesYorhel1-1/+1
And changed the order a bit, as suggested by ImmLff.
2010-11-01Handler::Users: Added note about automatic deletion to notifications pageYorhel1-0/+1
2010-10-31Added more comparison VNs for the length fieldYorhel1-1/+1
2010-10-31Display friendly message in the VN edit scr tab when no release is knownYorhel1-2/+4
2010-10-31Remove duplicate votes when merging tags (fixes a 500)Yorhel1-0/+4
2010-10-31Bugfix: only redirect VN search to VN page if page=1Yorhel1-1/+1
2010-03-14Made name of the auth cookie configurableYorhel1-4/+4
Now it's finally possible to run multiple VNDB's with different databases on the same domain without constantly getting logged out.
2010-03-14Handler::Users: Added noindex to user pagesYorhel1-1/+1
I could swear the user pages have always been noindex'ed... hmm.
2010-03-13Improved VN searchYorhel2-177/+7
This adds a new column to the vn table: c_search, which holds the normalized titles for speedy search results using LIKE. Also split some functions from VNDB::Func that didn't require YAWF into a VNDBUtil module, so Multi can also make use of them. The normalization functions are the same for Multi and VNDB, after all. The API and Multi::IRC still use the old search, these should be updated as well.
2010-03-13Handler::Tags: Re-added /g/debugYorhel1-0/+31
2010-03-09DB::ULists: Greatly improved query performance for VN list with 'hide voted'Yorhel1-2/+2
Crawlers would often find such pages, and the query would often take more than a second to finish, in some extreme cases even 10 seconds. This fix converts an intermediate result into an array, forcing the query planner to evaluate the subquery first, resulting in a far more optimal query plan.
2010-02-19Two more GTIN-related fixesYorhel2-2/+2
1. Don't try to normalize the GTIN code in the releases form when it's 0 2. Don't try to gtintype() *every* number in the search
2010-02-19VNDB::Func: Another gtintype() related bugfixYorhel2-2/+4
We have to assume that the input doesn't always have enough zeros, to fill the 12 characters, otherwise UPC codes fail when they are fetched from the database (which is stored as a bigint, no zero padding in the output). Instead, we'll just add the zeros ourselves up to 12 for normalization purposes.
2010-02-19VNDB::Func::gtintype: Another silly bug fixYorhel1-1/+0
You can't quite check the length of the GTIN code if you strip away zeros in the beginning, right?