July 25, 2006

Changelog July 25

I should probably create a new blog to keep this in, but anyway:

25/7/2006

- Changed default cookie duration from session-only to 90 days
- Added automatic tag-balancing to bbCode parser rather than relying on HTML sanitiser
- Fixed bug in caching logic that would cache pages built from alternate templates as though they were the default
- Fixed user login template to go to current Minx instance rather than a hard-coded address
- Added support for session-level tags that are retained between pages
- Updated comment form error checking to use session tags for error messages
- Added template trace and include:once tag
- Added template debugging support: highlight unprocessed tags/view HTML

Current focus

- User interface
- Site statistics
- Performance improvents to comment processing

Posted by Pixy Misa at July 25, 2006 02:29 PM | TrackBack
Comments
#1

Pixy, I am in AWE of your work... now, tell me, is there an english translation for this post? ;-)

Posted by GM Roper at July 25, 2006 02:37 PM
#2

Well, let's take the template debugging.

Movable Type, if it encounters a problem in your templates, will throw up its hands in shock and drop dead. With a somewhat helpful error message.

Minx doesn't have template errors. Any arbitrary string is a valid template. It might not do what you want, but it's not actually wrong.

So obviously it can't give you an error message when you screw up. But what it can do is this:

If Minx encounters something that looks like a template tag but is malformed or misplaced such that it cannot be validly processed at that point, it assumes that it is not actually a tag - and spits it out unchanged in the page.

What I did today was add some code so that when you type [comment,author] instead of [comment.author], rather than just appearing as:

Posted by: [comment,author] at 6:39 PM Tuesday, July 25th...
you can request it to show up as
Posted by: [comment,author] at 6:39 PM Tuesday, July 25th...
or however you want it.

Likewise, for tags buried inside the HTML, I added an HTML viewer that shows the faulty tags highlighted to your taste.

Posted by Pixy Misa at July 25, 2006 02:56 PM
#3

That is awesome especially to a tyro like myself. Thanks for the translation

Posted by GM Roper at July 25, 2006 06:04 PM
#4

I hope you don't mind my eternal 2¢, but here it is: When it thinks it's parsing a template tag but fails, it writes the "tag" as a link to a page which contains its best guess as to what the error is.

Posted by David Boxenhorn at July 26, 2006 06:45 AM
#5

Well...

As far as Minx is concerned, anything in square brackets is potentially a tag, and Minx tries to interpret it.  There are some cases where an error can be detected - a [posts] in a template without a [/posts], for example - but in most cases it just says "Okay, found something in square brackets.  Is it in my tag database?  ... Nope.  Right, not a tag then.  Spit it out."

We could certainly have something equivalent to "lint" for C, that finds common mistakes in code that would compile but wouldn't do what you wanted.  But I don't know if I want to put that functionality into the standard template engine.





Posted by Pixy Misa at July 26, 2006 12:20 PM
#6

I didn't really mean to suggest that you add new error-catching functionality. Just instead of bolding the text, add a link that points to the reason the parser "gave up".

Posted by David Boxenhorn at July 26, 2006 06:56 PM
Live Comment Preview
Post a comment









Remember personal info?