path: root/lib
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 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! 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/
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 pagesYorhel4-38/+25
2010-11-13Multi::Feed: Added Atom feedsYorhel1-0/+185
TODO: add links to these feeds from the site
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-10Multi::RG: Use dotted line to indicate unofficial status in VN relationsYorhel1-15/+16
Also fixed a minor bug with no change notification being sent to Multi when only the official flag has been changed.
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: 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-03Lowered minimum search query word to 2 charactersYorhel1-1/+1
Searching for "ef" isn't really fun with all those results, this makes it slightly less broad.
2010-11-03Merge branch 'master' into betaYorhel3-6/+7
Conflicts: lib/VNDB/DB/ lib/VNDB/
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 thumbnailsYorhel3-3/+7
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 VNDBUtilYorhel3-31/+30
Which may also be useful for other scripts.
2010-11-02Multi::Image: Moved image size configuration to global.plYorhel1-4/+2
As those may also be useful for other scripts.
2010-11-02Removed XML sitemapYorhel1-154/+0
Was growing too large and isn't really necessary anymore, now that VNDB is indexed quite well in most search engines.
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-11-01Multi::Maintenance: Automatically remove read notifications after a monthYorhel1-2/+9
2010-10-31Added more comparison VNs for the length fieldYorhel1-1/+1
2010-10-31Multi::Anime: Remove useless statementYorhel1-1/+0
2010-10-31Multi::Anime: don't crash when anidb returns an invalid or empty yearYorhel1-1/+1
Like as with Steins;Gate, where the year isn't known.
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