summaryrefslogtreecommitdiff
path: root/lib/VNDBUtil.pm
AgeCommit message (Collapse)AuthorFilesLines
2011-01-27TUWF: Use the uri_escape() provided by TUWFYorhel1-10/+1
2010-12-19VNDBUtil::bb2html(): Fixed bug with lowercasing all [url=..] URLsYorhel1-2/+2
2010-12-16VNDBUtil::bb2html(): Fixed bug when the string starts with a VNDBIDYorhel1-1/+1
2010-12-14VNDBUtil: Consider "senpai" and "sempai" the same in the VN searchYorhel1-0/+1
2010-12-09Write VNDBUtil::uri_escape() and removed dependency on URI::EscapeYorhel1-1/+11
Its functionality is too simpel to require it as a special dependency, seriously.
2010-11-27VNDBUtil: Fixed minor bug in bb2html() and small cleanupYorhel1-11/+15
Unknown/incorrect tags should be outputted as-is, as was the case with the previous implementation. Also cleaned up the id and exid if statement to be slightly shorter.
2010-11-26VNDBUtil: Partly rewrote bb2html() to be faster and betterYorhel1-52/+71
It does not use split() anymore, the input string is parsed in a single pass using a global regex. It's now a lot faster on larger input. The page generation time of /t937 went back from ~350ms to ~55ms (on the beta, the production server is slower). Also made several tiny improvements while I was at it: - multiple successive newlines aren't removed within [code] - truncating a message with $maxlength also removes trailing spaces and interpunction - multiple successive spaces are removed outside of [code] (and thus don't count towards the length of the message) The function should be mostly equivalent in regards to all other things, ignoring a few minor border cases that weren't documented in the first place. The URL regex (and the idea of a global regex) came from bpaste: http://g.blicky.net/bpaste.git/commit/?id=ac7b16d0ec0f195d00a0a79698f67c3010e8cf7d
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 betaYorhel1-4/+4
Conflicts: lib/VNDB/DB/VN.pm lib/VNDB/Func.pm
2010-11-02Handler::(Misc|VNPage): Added HTML width/height to screenshot thumbnailsYorhel1-1/+1
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/+18
Which may also be useful for other scripts.
2010-10-31VNDBUtil::normalize: Added search alias for 'fandisk'Yorhel1-0/+2
2010-03-13Improved VN searchYorhel1-0/+202
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.