Main Page » Blog-Like Typing Detected »

2010/03/16: A shiny new Nekokayou-code update!

Created:

Always use secure-HTTP / Secure HTTP / Permanent Link

For the record, this entailed about two hours' worth of work, involving the user-defined-includes in the CMS, several different thcomic-specific functions, and at one point being a nineball about the .htaccess file in the /thcomic/ directory.1

Anyway, you may now notice a little link under the navigation bars, listing some image-formats! If you click on one of 'em, it will load the comics in the specified format; the default is .png-format, but you can also set to .gif and .jpg! It will then save it for 30 days or until you reset it back to .png. The point of this is allowing faster loading-times, in exchange for quality.

Also (though I haven't added an interface for this yet), you can set the quality of JPG images by adding &ql=(1-100) to the end of the URL, i.e. ql=60 or ql=100; the default is 90.

So, yeah. Let me know if I caused anything to explode! I can think of a bunch of ways to make the code more efficient, but it probably won't be visible to the end-user.

1For the record, I changed one of the mod_rewrite regexps in one place but not another, and as a result, instead of loading each part of the multi-part comics, it just loaded the first part over and over again.

3 Comments (auto-closed) (rss feed)

Young Demon Lord

Nifty update, Muffin! This has me curious as to how you actually manage your comics, then. Do you actually have to upload a PNG version, a GIF version, and a JPG version, or do you have the server do that conversion for you? If the server's doing the conversion, what's the original format of the comic images? If you need to upload each format manually, what's the first format of a comic?

Dizzy H. Muffin

The panels are individually .PNGs (as you might recall from the scavenger-hunt in Catness). PHP has its own set of image functions which include "Output this as a PNG/JPG/GIF!" and I use mod_rewrite with regexps so that when you ask it for "02_ql75.jpg", what you're really getting is "02.php?type=jpg&ql=75", and 02.php in turn sets a few variables (which is easy, because it only specifies "What number comic is this?" and "how many panels does it have?"), then calls img.php, which handles the actual loading of images and whatnot.

sRc

way to use magick there, KM ;)