So, what's happening in the world of Minx?
Lots of stuff. Not as fast as I'd like, but lots of stuff.
First up, Ace and Rusty are using Minx comments side-by-side with Movable Type. Live. For real. And it's working good. (Not perfect; there are a couple of tweaks I'll be making today to fix minor problems, and then it will be perfect.
Second up, I've been preparing the Minx user interface, so that people can, well, use it. Kind of important. It's not up yet, but the first parts of it will be operational in the next week or so. (Depending on whether anything else decides to blow up and how much time I need to spend configuring the new servers.)
Quick preview:
It's a bit dull, but (a) it's workable and (b) it uses the same templating system as your blog. That is, you can change anything.
Even - if you want to - AJAXulate it. Minx as a processing system is AJAX agnostic. It takes requests and produces pages. It doesn't care whether the pages it generates are HTML or XML or indeed something else; it just does what you tell it to do. If you want to use AJAX for comments or in the user interface, you can do it. (And if we find that some extra functionality in the back end would be useful, I'll add that.)
A Brief Word About Templates
Since the user interface is driven by templates, once I started working on it in earnest I found the templates multiplying like bunnies, and it became hard to keep track of them all.
To fix this, I've created a simple taxonomy of templates.
First, there are page templates. Page templates create pages. That seems obvious enough, but there are other types of templates in Minx. The thing to remember about a page template is that you can call it directly and get back a valid (and hopefully useful) web page.
Next are block templates. Block templates are not complete pages; they represent an element that you want to re-use. For example, the block.post template controls the display of a single post. If you use the [posts:here] tag, it will call the block.post template to format the individual posts. Likewise, block.comment for comments. You can override which template is used by specifying [posts:here template=block.shortpost] or something similar.
Next are forms. The only one you are likely to see (at least initially) is the comment form. You place the comment form in your comment template simply by using the [form:comment] tag. [include form.comment] is the equivalent generic method to put a form in a page. Forms are not complete pages, but are designed to be placed in a page.
The other types of templates are includes - which are for including, like blocks - and admin pages, which generate the user interface rather than your web site.
One of the things you can do with templates now is include them once, using then [include:once] tag. Let's say you have the page header (the HTML HEAD, your banner, any CSS and JavaScript) set up in one template, called include.header, and your footer (whatever) set up in another. By [include:once]-ing them, you can include any other template, even a whole page, without worrying about that stuff getting duplicated.
Comments For Your Blog
Minx comments are almost ready for you to use. They are working, but I have to tweak the cookies (which are currently only set for the session) and the error reporting (currently doesn't do anything useful).
Basically, you need just two things: A link from your blog to http://minx.cc/?post=<MTEntryID> or and a page.post template. If you don't have a page.post template of your own, Minx will pick up the default one (which isn't very pretty). I'll tidy up the default one and post it here; then all you need to do is create a new index template on your blog, paste the standard one in, and edit it to your liking. With any luck, that will be tomorrow.
Posted by Pixy Misa at July 25, 2006 04:40 AM | TrackBackOh yes: The cookies are tweaked, and the error messages are done and just need some testing. Comments for all tomor... (looks at the time) today!
So I guess that means the new system won't work with php code?
Posted by Ogre at July 25, 2006 09:30 PMNo - but yes.
The system is written in Python, generates pages dynamically, and completely bypasses te PHP interpreter in Apache, so it doesn't work with PHP at all.
But I realise that a lot of munu sites use PHP. With Minx they probably won't need it, but that would require rewriting all those functions. So what I'm doing is creating a PHP front-end to Minx. Everything works the same, it's just that the PHP front-end sends requrests to Minx and treats the pages that come back as PHP code.
Just as Minx is AJAX-agnostic, it's also PHP-agnostic.
Posted by Pixy Misa at July 25, 2006 10:23 PMCan we use Python tags? Is there such a thing?
Posted by David Boxenhorn at July 26, 2006 06:49 AMThere are templating systems that let you mix Python and HTML something like the way PHP works.
I hate them. Well, they have their place I suppose, but certainly not for blogs.
Remember, Minx is designed to support large numbers of blogs in a single environment with mostly non-technical users. That's hard to do for a number of reasons if you allow arbitrary user-submitted code to run.
That's why Wordpress doesn't support multiple blogs, by the way - the templating system just uses PHP directly, so it's hopelessly insecure for running multiple blogs on a single installation.
Hey, my code isn't arbitrary!
No, that's pretty neat. I was already looking through the tons of php stuff I've got in my code, trying to remember what it did and if I could rewrite it. Cool.
Posted by Ogre at July 26, 2006 10:31 PM