Monday, July 30
I'll have to tidy this up and post it at mee.nu, but a few notes on the image resizing features in Minx. Except where noted, these apply to both manual and automatic resizing.
- If you resize an 8-bit GIF or PNG image with transparency (index or alpha), the transparency will be lost. If you need to retain the transparency, you'll either need to resize it using a paint program (Paintshop Pro, Fireworks, Photoshop) or use a 32-bit RGBA PNG file instead. This is an issue with the image library used by Minx, and isn't likely to be fixed soon.
- If you resize an animated GIF, only the first frame of the animation will be kept. This is fixable, but not a very high priority.
- For automatic resizing only, if the resulting image is up to 1100 pixels in dimensions (e.g. 500x600, 300x800), the system will apply a high-quality but CPU-intensive Anti-aliasing filter. For larger sizes, it will fall back to a bilinear filter, which is good enough for photos but will show some aliasing (jaggies) on line drawings.
- In Minx 1.05, manually resized JPGs are processed with a quality setting of 75%; automatically resized JPGs with a setting of 85%. In Minx 1.1, the default for both modes is 80%, with a quality/q option available to override this: [img=/images/foofle.jpg size=50% q=90%]
Posted by: Pixy Misa at
10:35 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 219 words, total size 1 kb.
Should I call server-side cookies, cookies, or is that going to confuse people?
Posted by: Pixy Misa at
06:11 AM
| Comments (7)
| Add Comment
| Trackbacks (Suck)
Post contains 15 words, total size 1 kb.
Sunday, July 29
Some of the features discussed in this article are included in the forthcoming 1.1 release. If you try to use these features in 1.0, they probably won't do anything.
The problem with a hosted service like mee.nu is that you can't extend it with plugins. You certainly can't upload your own PHP files, at least, not if you expect them to do anything. Minx templates are very flexible and reasonably easy to work with, but they don't make it simple to use a piece of code someone else has designed.
Or they didn't - until now.
[def]
[call]
One of the (previously) undocumented features of Minx is template functions. You can define a function in a template like so:
[def comment]And then call it like so:
<tr [if comment.even]bgcolor="#f8f4e0"[/if]>
<td>[comment.authorlink]</td>
...
[/def]
[comments count=20 order=desc show=junk paged]You can pass in parameters the same way you can with templates... which is another undocumented feature:
[call comment]
[/comments]
[include EditorSettings text Text]Which are substituted into the template (or function... basically the same thing) as indicated by markers of the form {1}, {2} and so on for the first, second, and so onth parameter:
<td align="right"><label for="{1}"> {2}</label></td>Functions, once defined, persist and can be re-used whenever you want. That brings us to the first and simplest of the new features, libraries.
[library]
A library is simply a template that contains a set of functions. Libraries do not produce any output directly, but the functions can be used by any other templates, sub-templates, or applets that you use.
Libraries can be called from another site if the library is flagged as shared. A library will only ever be included once in your template; multiple references to the same library will be skipped.
The process of including a library cannot change global template variables, though the library can read global variables and create local variables. The library can read and update user options.
Calling a library creates a library object, which can be examined both within the library and in the template that called the library.
[applet]
An applet is again just a template with restrictions. As described in the previous post, an applet can be called from another site, and cannot change global variables or template functions.
(I stopped and measured the overhead of an applet vs. a regular template on the test environment. It's about 20μs.)
Apart from producing output in your page, an applet also returns an applet object. Applets can also read and update user options. (More on that subject shortly.)
Posted by: Pixy Misa at
10:32 PM
| Comments (2)
| Add Comment
| Trackbacks (Suck)
Post contains 408 words, total size 4 kb.
New feature coming in Minx 1.1: Applets.
Applets are just templates, but with some specific features and limitations:
- Applets are called using the [applet] tag rather than [include]
- You can call an applet from your local applets pool, from the global applet collection, or specifically from another Minx site, e.g. [applet ai.mee.nu:Weather AU.Sydney]
- Like any template, applets can include Metl code (Minx Extensible Template Language), HTML, BBCode, JavaScript and CSS
- Applets cannot update global template variables or global template functions
- Applets can update user options
I was going to leave this for 1.2, but I think I'll move it up. Look for it soon!
Posted by: Pixy Misa at
03:57 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 139 words, total size 1 kb.
Saturday, July 28
Recently Steven had a comment that was held for moderation (it had a junk score between 5 and 10). He didn't know this, because Minx doesn't notify the blogger when new comments arrive. It doesn't do that because I really don't want the server sending out thousands, and eventually perhaps millions, of emails every day.
But bloggers still need to know when new comments arrive.
One thing Minx can do is generate an RSS feed for any folder. There's a folder at yourblog:/edit/comment that presents a list of comments, and an RSS feed of that would give you a feed of all new comments as they arrive. Perfect!
Except... That folder is private, so you have to log in to read it. This seems to be impossible under Thunderbird, which is what I use for my RSS feeds. It works under Firefox, but the Firefox RSS reader is unuseable for this task.
So the question is, do people think this functionality is a good idea? I like it because can easily be extended to other things, providing you with a feed of everything that goes on on your blog without the server having to grind through the data all the time.
And what feed readers do you use? Do they support cookies?
I'm considering a little desktop app to help manage this sort of thing, but that's months away, and will probably be Windows-only (though the API will be open) so I'm looking for something I can do in the meantime.
Posted by: Pixy Misa at
06:45 PM
| Comments (6)
| Add Comment
| Trackbacks (Suck)
Post contains 255 words, total size 1 kb.
Friday, July 27
òóôõöōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợ
Heh. Cool. Though they should all be the same size. Blame Microsoft. (In fact, if I reduce my font size one notch, they are all the same size. Looks like a glitch in the hinting in Verdana.)
ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩ
αβϐγδεζηθϑικλμνξοπρστυφϕχψως
It's all Greek to me...
ἀἁἂἃἄἅἆἇᾳᾀᾁᾂᾃᾄᾅᾆᾇᾲᾴᾷὰάᾶᾰᾱἠἡἢἣ
ἤἥἦἧῃᾐᾑᾒᾓᾔᾕᾖᾗῂῄῇὴήῆὠὡὢὣὤὥὦ
ὧῳᾠᾡᾢᾣᾤᾥᾦᾧῲῴῷὼώῶἐἑἒἓἔἕὲέῤῥ
ὀὁὂὃὄὅὸόὐὑὒὓὔὕὖὗὺύῠῡῢΰῦῧ
#©01234567891⁄41⁄23⁄4°%‰
⁰¹²³⁴⁵⁶⁷⁸⁹⁺⁻⁼⁽⁾₀₁₂₃₄₅₆₇₈₉₊₋₌₍₎
¤¢$£€¥₡₢₣₤₦₧₨₭₮₫₥₯
.,:;?!‘'’‛‚“"”‟„/(‖)[¦]{|}\«»‹›¡¿․‧‥•·…‣~
*¶§&†‡@®™^+<=>×÷±μ-‐‒–—―_ ‗
àáâãäåāăąǎǟǡȧǻȁȃḁẚạảầấẩẫậắằẳẵặḃḅặćĉċčḉďḋḍ
ḏḑḓèéêëēĕėęěȅȩȇḕḗḙḛḝẹẻẽềếểễệḟĝğġģǧǵḡĥȟḣḥ
ḧḩḫẖìíîȉǐïįīịĩḭḯỉȋĭĵǰķǩḱḳḵĺļľḻŀḷḹḽḿṁṃñńņňʼnǹṅṇṉ
ṋòóôõöōŏőǒǫǭȍȏȫȭȯȱṍṏṑṓọỏồốổỗộớờởỡợṕṗŕŗ
řȑȓṙṛṝṟśŝşšșṡṣṥṧṩţťțṫṭṯṱẗùúûüũūŭůűųǔǖǘǚǜȕȗṳṵ
ṷṹṻụủứừửữựṽṿŵẁẃẅẇẉẘẋẍýÿŷȳẏẙỳỵỷỹźżžẑ
ẓẕǯǣǽǿẛ
Posted by: Pixy Misa at
09:40 PM
| Comments (9)
| Add Comment
| Trackbacks (Suck)
Post contains 70 words, total size 2 kb.
Thursday, July 26
Font set two, featuring the work of the astoundingly prolific Manfred Klein. I've only used a small selection of his work, the fonts I felt best suited to blog banners... Out of what I've downloaded so far. That still makes for over 160 fonts.
Just as I was preparing this post, I heard back from Manfred giving me the go ahead. So we're cool for school.
Samples in the extended entry; 164 files, total about 1.3MB.
more...
Posted by: Pixy Misa at
06:08 PM
| Comments (8)
| Add Comment
| Trackbacks (Suck)
Post contains 84 words, total size 8 kb.
The first (of two) starter font sets for the theme builder is ready. I hope to finish the second set today, and then finish coding the theme builder itself.
Samples are in the extended entry. This might take a while to load - it's about 3MB in 152 files. (Update: Oops, they were 32-bit images. Squished down to 8-bits now, so it's only about 1MB.)
As I mentioned before, these are all the work of the lovely and talented and all-round nice guy Nick Curtis. Set two will highlight another font designer, Manfred Klein.*
* Assuming Manfred is okay with this. I've emailed him about the project and hope to hear back soon. Unfortunately, another designer whose work I very much like, Derek Vogelpohl, has disappeared from the net and can't be contacted. Derek's fonts are under a mixture of freeware and non-commercial-only licenses, so I'm hesitant to use any of them without his consent.
more...
Posted by: Pixy Misa at
01:44 PM
| Comments (2)
| Add Comment
| Trackbacks (Suck)
Post contains 162 words, total size 8 kb.
Wednesday, July 25
Moetan: Because you have to know where to draw the line before you can cross it.
It does at least appear to have a coherent story... of sorts... unlike some entries from last season where the creators apparently just threw darts at a wall. We're going to make a plink romantic comedy about plink yakuza plink mermaids.
Posted by: Pixy Misa at
05:19 AM
| Comments (1)
| Add Comment
| Trackbacks (Suck)
Post contains 64 words, total size 1 kb.
I think I'm there with the text effects library.
Opaque text with translucent shadow

Translucent text with translucent shadow

Translucent text with translucent shadow on an image

Tinted, translucent text with translucent shadow on an image

The trick was preventing the shadow from showing through the translucent text. The shadow isn't really a shadow; it's a set of blurred transparent diagonally-offset black copies of the text itself, so it extends under the text. If the text is also transparent, that means that what shows through is a nasty grey mess rather than the image.
To fix that I had to create two images, one for the shadow and one for the text proper, plus an opaque mask with the same contour as the text so that when I composited the images the colour and opacity values of the text overwrote those of the shadow, so that when I composited that with the image, you got transparent text instead of blah.
And it actually worked.
I might still tweak the shadow settings a bit (or I can just expose those settings so that they're user-tweakable). It looks fine on a solid colour but comes out a bit weird on some images.
And no, you can't see the examples from where I forgot to turn off the Gaussian blur on the text pass.
Posted by: Pixy Misa at
04:00 AM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 226 words, total size 1 kb.
Tuesday, July 24
Bum.
My drop shadows are only working on rectangles. Hackity hackity... Ah, there, that'll do for text:


Posted by: Pixy Misa at
07:16 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 20 words, total size 1 kb.
Busy working on the theme builder thingy, and seeking fonts that are both attractive and under licenses that will let me use them for mee.nu.
Here are a few examples of fonts that make the cut in both respects:







These fonts appearing by permission of the very talented Nick Curtis with the aid of aggdraw.
Now, back to my masking and shading and transparencies and stuff.
Update: Link fixed. Oops.
Posted by: Pixy Misa at
06:32 PM
| Comments (1)
| Add Comment
| Trackbacks (Suck)
Post contains 71 words, total size 1 kb.
Monday, July 23
If omitted, or if the image has mode "1" or "P", it is set to NEAREST.Doh!
When I put up the post about the Import module, I noticed that rescaling gifs on the fly with Minx looks like crap. I tried fiddling with the settings, but it didn't help, because the image library ignores the frigging settings!
Well at least now I know what to do - convert it to RGB mode, then resize, then convert back to Palettised mode.
Meanwhile: Circle? Circle? You call that a circle?
Looks like I'll have to generate the mask at 2x or 4x and then scale down and anti-alias.
Dum de dum... Okay, now with 4xFSAA! I wonder if that preserves the transparency settings...
Now all I need to do is work out how to do proper drop shadows, and I can do the entire banner generating thingy dynamically.
Aaaand: Dropshadows over solid colours: Check. Now to tweak that to do dropshadows over images...
Got it! Thank you ASPN and Google.
Update: Hrm. I can see why this is not a common feature. To get good results with curves I need to work at at least 4x the base resolution and then downsample, which means I'm working with 2 to 4 megapixel images; 8 to 16 mb of data each. There's another library I can add which would let me do antialiased drawing; I may have to try that. Meanwhile, I'll see what I can do with these fonts I've got here...
Update: Or I could try that library first. Better. Vertical as well as horizontal symmetry and without downsampling, so it's 10x faster. Just need to tweak the radius of those corners up slightly.... Got it! Now, er, can I use that as a mask? Kind of pointless if not. So let's give that a whirl.
Posted by: Pixy Misa at
06:32 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 308 words, total size 2 kb.
Sunday, July 22
So it turns out I can make arbitrary transparency effects on the fly. That'll come in handy; it's a whole bunch less static images I need, and a whole lot more flexibility.
Only works for rectangles so far. Let's see what I can do with shapes...
Posted by: Pixy Misa at
04:52 PM
| No Comments
| Add Comment
| Trackbacks (Suck)
Post contains 51 words, total size 1 kb.
I happened to stumble across the source code for an ASP-based open-source blogging app while I was looking for something else entirely* and I was struck by how regular and elegant the code was.
The code for Minx doesn't look like that. Partly because I developed it relatively quickly and it's still on version 1. But mostly, I realised a bit later, for another reason; for the same reason that the uncompressed source code for the entire system will still fit on a 360K floppy: I've squeezed all the regularity out.
A lot of the regularity in the code I was looking at was sequences of assignment statements - in Minx these are rolled up into loops, driven by tables. I wrote my own SQL abstraction module for this reason. It doesn't abstract the queries for me, but it completely abstracts the data.
I still want to prettify my code, but I feel happier now.
Also, while I was asleep I thought of a straightforward way to handle per-user/per-site customisation. That will address a lot of limitations of working with a hosted system rather than your own custom app; it will allow per-user themes for blogs, for example. I'll try to fit that in this coming week, along with the theme builder, site wizards, and AJAXulation.
* An open source web-based code display thingy**; turns out that SyntaxHighlighter is now LGPL and will do just fine.
** For an enhanced version of the [code] tag.
Posted by: Pixy Misa at
05:04 AM
| Comments (1)
| Add Comment
| Trackbacks (Suck)
Post contains 248 words, total size 2 kb.
Saturday, July 14
Sure it will!
You can now import Blogspot and Movable Type blogs* in Thai, Vietnamese, Turkish, Greek and Hebrew** into Minx. Or at least, I can; you'll get the opportunity tomorrow.
Does it work? If have no freaking idea. I've put a wrapper around a standard set of character set codecs to convert your file into Unicode, which gets stored and served as UTF-8. But I don't have any sample blogs in Ukrainian or Korean to try it out with, and I wouldn't necessarily pick up the errors if I did.
It looks interesting if you tell it your file is in Arabic when it's really Windows-1252, though.
I also discovered that Minx wasn't necessarily serving up UTF-8 when it said it was. I'm going to fix that tomorrow as well; it shouldn't affect anything because the back-end really is entirely Unicode, but Steven, if your Japanese examples suddenly turn into randomly accented Latin text, that's why.
* And blogs from anything else that can produce a Blogger/MT-style export file.
** And normal-type languages, too.***
*** Also automatically handles gzip and bzip2!
Posted by: Pixy Misa at
07:51 PM
| Comments (20)
| Add Comment
| Trackbacks (Suck)
Post contains 185 words, total size 1 kb.
Friday, July 13
Sure, they deny it, but where there's smoke, there's badgers:
The Iraqi port city of Basra, already prey to a nasty turf war between rival militia factions, has now been gripped by a new fear -- a giant badger stalking the streets by night.That's as may be - but what about the mushrooms, eh? What about the mushrooms?
British army spokesman Major David Gell said the animals were thought to be a kind of honey badger -- melivora capensis -- which can be fierce but are not usually dangerous to humans unless provoked.
"We have not released giant badgers in Basra," he said, "and nor have we been collecting eggs and releasing serpents into the Shatt al-Arab river."
Posted by: Pixy Misa at
04:54 AM
| Comments (3)
| Add Comment
| Trackbacks (Suck)
Post contains 123 words, total size 1 kb.
Wednesday, July 11
I've been very busy the past couple of weeks, tracking down bugs, implementing new features, foiling miscreants of various sorts.
My neighbourhood got invaded yesterday. I was heading out to lunch (it was 2:30 and the import function seemed to be working, so it looked like a good time), and there was a family with a toddler in tow heading up the footpath outside my house. I went to step out onto the road to give them some room, but there was a car coming - several cars coming, on my quiet suburban side street.
Reached the next street, and there were two more families coming up the hill, with several small children. And more cars than usual. Looked up ahead, and more kids, and more cars. Got up the hill, and there's this long line of mums, dads and kindergartners snaking around the corner of the RSL. Preschoolers everywhere.
Then I saw the sign.
Wiggles concert. Three minutes from my house.
Posted by: Pixy Misa at
10:55 PM
| Comments (6)
| Add Comment
| Trackbacks (Suck)
Post contains 171 words, total size 1 kb.
Powered by Minx 1.1.2-pink.









