[Home]ToothyWikiInternals/ImageServer

ec2-18-221-165-246.us-east-2.compute.amazonaws.com | ToothyWiki | ToothyWikiInternals | RecentChanges | Login | Webcomic

The [imageserver] allows ToothyWikizens that do not have their own webspace to store small images for inclusion in wiki pages. This page is a usage guide. See /ImageServerSource for source code and discussion of internals.




Including [imageserver] images in ToothyWiki pages



Use Image: followed by the number of the image you want to be displayed. Like this:

Image: 1




Adding new images to the [imageserver]



Use the form at the bottom of the [image list]. Click on "Browse" ("Îáçîð" if you are in a Cyrillic locale) to select an image file from your hard disk. Type a text comment to describe it in the list in the comment box - you can see the sorts of things others have written (the reason for doing it this way is that you can't see very much in the thumbnails). Hit the upload button. The script will tell you whether the upload was successful and the comment was set; the image list won't be updated until you hit on "refresh list", but unless you want to change the image you've just uploaded you don't need to do that.




Changing (or looking at) existing images (or their comments)



Click on the thumbnail of the image you want to change (you can also click on any imageserver image in the wiki to go to straight to its "change image" page). Then use the form of the bottom of that page - it works exactly the same as the one for adding new images except the image will replace the one you're looking at. You can just change the comment without putting in an image, should you want to do that.




[Yup, there was a flaw in jpeg too.....]  --Vitenka (No idea whether it's worth caring about)
I could conceivably do anytopnm | pnmtopng > datafile on any uploaded images, thus guaranteeing anything served by toothycat.net is encoded sanely. - MoonShadow
Given that IE will interpret a WMF saved as a .jpg and execute the flawed code... and they discovered a second pair of flaws in WMF.. probably very sensible.  ('course, then you'll find there's a flaw in png conversion or something.)  --Vitenka
I check for the presence of a JFIF header, so I don't think you can exploit the WMF flaw using the image server. I'd be interested if you can get one to upload. -MoonShadow




(MoonShadow) Proposed code tweak: if one or more images have comments set to exactly the string '* deleted *', the next time someone uploads a new image, the image will overwrite one of those instead of getting a new ID. The result text will be displayed on a bright red background to attract people's attention to the new image's ID. It'd probably be useful to hide the deleted images from the main directory, except I'd have to write some actually non-naive pagination code then so we don't end up with short pages.

While I'm down there, I'm wondering about adding a user preference for number of images to display on a directory page, and one for whether to display thumbnails or not.

Thoughts?




Supported formats:




A very basic/hacky activity log [here]. Proposals for saner CSS gratefully accepted.




(PeterTaylor) I've noticed that the images don't seem to be cached by my browser. A manual request to the server reveals why: they're set to expire immediately. Is this sensible? The activity log is too recent, but I suspect that images aren't replaced that often.
It is probably not sensible at all. I should probably change that. Suggestions for adequate timescales? - MoonShadow
30 days? --PT

ec2-18-221-165-246.us-east-2.compute.amazonaws.com | ToothyWiki | ToothyWikiInternals | RecentChanges | Login | Webcomic
This page is read-only | View other revisions | Recently used referrers
Last edited December 1, 2007 12:05 am (viewing revision 44, which is the newest) (diff)
Search: