mu.nu - It's mackerel stewed in chocolate!

June 16, 2006

Minxlets June 16 Edition

Block tags are in!

Sort of. The only working block tag handler right now is comments, but it shouldn't take too much work to get it going for posts as well. Most of the work involved was refactoring the template engine. The requirements for block tags aren't that complex, about fifteen lines of code - but since the template engine had no real support for block tags, I would have had to add fifteen customised lines of code for every new tag.

The refactoring cut that down to four one zero.

Plus, it provides the beginning of a plugin system for template tags, because it dynamically loads the handling routines for the block tags.

Other than that... not much. Busy day. Forms are still coming. More later.

Posted by: Pixy Misa at 08:48 AM | Comments (16) | Add Comment | Trackbacks (Suck)

CPanel Don't Like Me!

Hi Pixy,

When I try to get to CPanel, it never gives me the login screen - I never get an error, but it isn't loading for me at all. Can you give me some advice? I know my hubby was having some issues previously, so thought I'd check with you.

Take care!

Posted by: Merri at 05:57 AM | Comments (7) | Add Comment | Trackbacks (Suck)

June 15, 2006

Blacklist Update

Much as Trey Givens' blog was blocking "tr com," it would seem that "br com" is also being blocked.

I have a regular commentor who keeps getting blocked. That doesn't really stop him; he just changes his email address to .net instead of .com, but that dirty pervert is now pestering me to have this fixed instead of for sexual favors.

Let's just say I thrive on routine. Can we do something?

Posted by: Flibbertigibbet at 08:27 PM | Comments (5) | Add Comment | Trackbacks (Suck)

Slightly Broken Blog

So is the "old" system still limping along in various states of brokenness, or is it just me? My blog still has issues when posting that sometimes the post doesn't actually make it to the main page until I rebuild all. And sometimes when I make a post, it goes to the main page, but the comments and permalink pages generate 404 errors until I rebuild all. Mostly this seems to be with posts that are posted with deferred, but I haven't been able to narrow it down just yet.

I'm excitied about the new system, but I'm going out on vacation for a couple weeks very soon and I hope to have deferred posting going on for that whole time I'm gone -- so I'd not want to switch over (unless I have to, I suppose) until after I get back...

Thanks again, Pixy!

Posted by: Ogre at 02:22 PM | Comments (7) | Add Comment | Trackbacks (Suck)

Minxlets June 15 Early Edition

I got the form processing framework in place this morning. This includes customisable template-driven forms and a dynamic system for form handlers. That allows us to have plugins that add entirely new processing features to Minx, and can be installed or uninstalled on the fly, per blog.

(We don't have plugins for new template features yet, but I will be adding that.)

Later today I'll implement forms for comments, searches, and (if I have time), post, comment, and trackback management. Once those are working, you'll just about be able to switch over to Minx completely.

The last big thing left to implement is block tags. These are fiddly because to implement them fully I need to dynamically construct SQL queries from the options specified in the template, but think I can get a fair way by just validating the options and plugging them into a set of pre-defined queries. I can probably get that in on the weekend.

From there, it's all about features, more features, more more features, and lots of testing and performance tweaking, but the basic system will be in place.

Update: Just replaced the template loader with a template cache. The new forms system will lead to a lot of new templates, even if you don't normally look at them at all, and it doesn't make sense to load them up every time. So templates are now loaded on demand and cached.

The new templated comment form will go in tonight, and more forms will follow tomorrow.

Posted by: Pixy Misa at 01:49 AM | Comments (20) | Add Comment | Trackbacks (Suck)

Pixy, Urgent Question!!

Were the movies Airplane! and Airplane 2! really released in Australia as Flying High and Flying High 2? 'Cuz, like, if they were, that would be kinda really weird n' stuff. Thanks in advance for the info!

Posted by: Tuning Spork at 01:25 AM | Comments (2) | Add Comment | Trackbacks (Suck)

June 14, 2006

one more blacklisty thing

Evidently "blogsome.com" is being rejected now. Can we get this rectified? I have a couple of regular commenters who would like to leave their URL/blogmail.

Thanks!

Posted by: caltechgirl at 07:19 PM | Comments (4) | Add Comment | Trackbacks (Suck)

Trackback spam

Can trackbacks on the edit page where the "5 most recent pings" are recorded be configured to take us to the appropriat post rather than as a link to the site of the spammer. That way, we could do our own blacklist perhaps on our sites based on the ping and/or delete the ping from the post in question.

Posted by: GM Roper at 06:22 PM | Comments (6) | Add Comment | Trackbacks (Suck)

Technorati issue and promoting a blog

If you look at my blog, you may notice that a part of the search button is blocked off. How would I fix this (being not as experienced in HTML is everyone else)?

What advice or articles would you direct a person to to learn how to promote a blog?

Posted by: Matthew at 11:50 AM | Comments (7) | Add Comment | Trackbacks (Suck)

Optimising SQL For Fun And Profit, Part The First

I replaced the separate comment counter for each post with this combined query:

do_sql('select *, count(comment_id)
from mt_entry, mt_author
left join mt_comment
on comment_entry_id = entry_id
where entry_blog_id = %s and
entry_status = 2 and
author_id = entry_author_id
group by entry_created_on desc
limit 20 offset %s',
(tags['page.blog'],(page-1)*20))
Result: 27 queries taking 0.01 seconds, 121 records returned.

20 down, 20 to go.


Okay, I made the comment routine a little smarter: Don't query the database for the comments for a post when you already know there aren't any.

Result: 19 queries taking 0.01 seconds, 111 records returned. (There are less records now because a post with 10 comments have been bumped off the front page while I was testing.)

Posted by: Pixy Misa at 11:49 AM | Comments (12) | Add Comment | Trackbacks (Suck)

Minxlets June 14 Edition

New stuff today:

The SQL query manager I mentioned before is in. You'll see at the bottom of the page a line like

47 queries taking 0.06 seconds, 157 records returned.
Which shows you the number of SQL queries sent, the elapsed time spent performing the queries, and the total number of records retrieve. I'd like to reduce the number of queries... In fact, I'm not sure how it even gets to 47. Unfortunately, if you're displaying comments inline, Minx needs to issue a separate query for each post to fetch those comments. It seems to perform reasonably well anyway; once the data is cached, the time for those 47 queries drops to 10 milliseconds.

Ah, I've worked out where the 47 queries comes from:

1 query to read the blog record.
1 query to read the site record (which is something I've added to the standard MT datbase; it holds extra settings for Minx/MT).
1 query to load the default templates.
1 query to load the blog templates.
1 query to validate the user, if he/she has an active login.
1 query to load the entries for the page.
20 queries to count the comments.
20 queries to load the comments.

Uh... that's 46. I have no idea what the other one is. But I can definitely reduce that number.

Macros

Like templates for your posts! You can define a macro such as - say - {DWL}, and whenever you write {DWL} in a post, it gets turned into <a name="DWL" title="Don't write letters!">DWL</a>, which looks like this:

DWL
(Mouse over it to see the popup description.)

Macros also support field expansion, so you can define your {DWL} to be something like "Don't write letters $1", and then when you use it in your post, you can have something like {DWL "and this time I mean it!"}. The parameters that you put in your post get substituted into the macro, and expanded version replaces the macro call in your post.

With me so far?

Cool.

Well, macros can do more than that: They can also pull template tags right into the text of your post. If you define {comments} as "This post has $1 comments", and then write in your post {comments [post.comments]}, the correct value will get plucked from the database and put right into your post, wherever you want it.

Currently, the actual macro text doesn't get template parsed, but that would be an easy to do if I decide it would be a sane thing to do. There's such a thing as making a system too flexible.

Simpler Stuff

If that broke your head, then never fear, there are some nice simple things in today's release as well. New magic tags:

[quote:random template]
[quote:cycle template opt_time]
[image:random template]
[image:cycle template opt_time]

[quote:random] pulls a random quote out of a selection stored in a template, one quote to a line. You can't have a line break inside a quote, but you can format it with HTML however you want. I've put one of these on the demo version of Munuviana, though I've forgotten what most of our tag lines were.

[image:random] does the same thing with images. Just put the <img src="blah blah"> tags in the template, one to a line. Great if you have a set of rotating banners (and I know some of you do). No PHP or Javascript hacking required!

[quote:cycle] cycles through a list of quotes, changing by default every hour. opt_time optionally changes this to however many seconds you want.

[image:cycle] does the same thing for a list of images.

I think that's all right now. I'm still working on the forms processing module, and unfortunately I just got a big distraction dropped on me so the pace of development will slow down until next Tuesday. There's still lots more goodies to come, though, and I'll try to keep releasing an update every day with at least one new thing.

Update: Oops. I edited the program on my notebook, uploaded it to the staging area for testing, got it working, put it in the live area - and then, instead of copying the new live version to mu notebook, I copied the version on my notebook over the live version, wiping out an hour and a half of debugging.

Of course, I had a backup. I always have a backup. Sometimes I manage to really screw up and overwrite my backup too, but not this time.

Posted by: Pixy Misa at 08:27 AM | Comments (9) | Add Comment | Trackbacks (Suck)

Moveded

blog.mu.nu is now back on Yuri. If you can see this, that should mean it's working. Unless it isn't. You know how these things work.

Posted by: Pixy Misa at 07:44 AM | Comments (2) | Add Comment | Trackbacks (Suck)

Test Test

Testing new Minx features {test} gets translated into "This is a test"...

Posted by: Pixy Misa at 01:43 AM | Comments (2) | Add Comment | Trackbacks (Suck)

Cpanel woes

Pixy, I get this when I click on the File Manager in Cpanel:

[a fatal error or timeout occurred while processing this directive]

Posted by: Vinnie at 12:27 AM | Comments (7) | Add Comment | Trackbacks (Suck)

June 13, 2006

Disk write test failed

When I try to add an email forwarding in cPanel, I get:

The disk write test failed. You may have exceeded your quota, or the disk is full.

Posted by: David Boxenhorn at 04:02 PM | Comments (1654) | Add Comment | Trackbacks (Suck)

One More Time

During the Great Blog Whiteout of last Friday, I moved the blog.mu.nu site from Yuri (where the blogs live) to Kei (where the blogs really live) because I thought that was part of the problem. It wasn't, but since then all the blog processing has been happening on Kei. Ace of Spades HQ and The Jawa Report are now also hosted on Kei, because Yuri was running out of bandwidth. The result is that Kei, which was lightly loaded and generally zoomy before, now grinds a bit a times.

I'm going to move blog.mu.nu back to Yuri, leaving blog2.mu.nu on Kei. That should balance things out a bit. There might be a hiccup or two while this is happening, but I'll do it during the day, my time, which is the middle of the night for the US, so most of you should miss the excitement.

Posted by: Pixy Misa at 01:33 PM | Comments (1) | Add Comment | Trackbacks (Suck)

Minxlets June 13 Edition

What's new in Minx today? Well, I cleaned up the code, splitting up a big chunk of code into nice, easy-to-manage procedures... and breaking everything in the process. Then I fixed that, which got me back to where I started, function-wise.

Added smilie support. You can see that in action now. See:

You can configure any smilies you want using your mxSmilies template:

Smilies Template
:) <img src="http://www.mu.nu/Forums/images/smiles/orange_smile.gif">
:( <img src="http://www.mu.nu/Forums/images/smiles/orange_sad.gif">
:-) <img src="http://www.mu.nu/Forums/images/smiles/orange_smile.gif">
:D <img src="http://www.mu.nu/Forums/images/smiles/orange_biggrin.gif">
:p <img src="http://www.mu.nu/Forums/images/smiles/orange_razz.gif">
:-p <img src="http://www.mu.nu/Forums/images/smiles/orange_razz.gif">
:P <img src="http://www.mu.nu/Forums/images/smiles/orange_razz.gif">
:-P <img src="http://www.mu.nu/Forums/images/smiles/orange_razz.gif">
;) <img src="http://www.mu.nu/Forums/images/smiles/orange_wink.gif">
Just put the smilie code, for example, :), followed by a space, and then the img tag that will replace it. One smilie to a line, please!

Added gzip support. This makes pages download faster - 10 milliseconds of compressing can reduce the HTML file to one quarter the original size. As far as I know, all current browsers - Internet Explorer, Mozilla, Firefox, Safari, Opera and Konqueror at least - support this. It also saves bandwidth on the server, which means we can host more blogs at munu without sending Pixy bankrupt.

Working on form processing. Currently the comment entry and search routines are separate programs; I'm merging them into the main program and adding full template support for both forms and form results. That will probably be in place tomorrow.

Also, something I did yesterday that you might not have noticed yet: If you are logged in to Movable Type at blog2.mu.nu, Minx can now pick up your login, and confirm that it is valid against the MT password file. This means that Minx and Movable Type can share logins. Also, since Minx knows you're logged in even when you're just reading the blog, it lets me do things like allowing users to edit comments. No more oopsie, I made a typo and now I'm stuck with it - you can go back and fix it. Well, right now you can't, but tomorrrow for sure.

I was digging around in the code for the first version of Minx (or possibly the 0.2 or 0.3 version; I can't remember which is which) and found that I had already written a much more powerful conditional processing system that is 95% compatible with the new template engine, so I'm going to patch that in as well.

That's all for Minx for today; see you all tomorrow. I'm off to watch cartoons on my new TV.

Oh, that's the other thing I was doing: A database wrapper that tracks the number of queries executed, the time each one takes, and the number of records returned. Useful for tuning your templates and for automatically aborting templates that run out of control.

Posted by: Pixy Misa at 01:25 PM | Comments (5) | Add Comment | Trackbacks (Suck)

Tracks Are Back

Hi all!

Trackbacks are back in business. Some of them were lost during the attack, either rejected immediately or logged and then overwritten, but we do have about 50,000 that made it through and were waiting to be processed.

And that's after the stage 1 and 2 trackback-blocking methods (1 is changing the name of the trackback script; 2 is blocking the worst of the bastards either in the firewall or in Apache, before the trackback is even recorded). All told, the number of trackbacks arriving at munu is something like 100,000 per day.

Yuck.

Anyway, of the 50,000 that made it through, 49500 were rejected by Snark, leaving 500 to actually update the blogs. Normally Snark rejects about 99.8%, but since 80% of the trackbacks now don't even make it to Snark, that's probably about right.

One minor hitch - I lost the latest copy of the Snark blacklist, and had to go to an old backup. Since Snark builds its blacklist on the fly based on Snarkian probabilities, that's probably not too much of a problem. If someone sent us 200,000 trackbacks before but got lost along with the blacklist, they will very quickly and automatically find themselves back on it if they try that again. (And the worst thing they can do is try to get lots of trackbacks through very fast. Anyone who sends more than 5 trackbacks in a minute gets blacklisted temporarily; send 50 in 10 minutes and Snark makes it permanent.)

Snark is currently crunching away updating blogs with the new trackbacks... Which takes forever. The sooner we move to Minx, the better.

Posted by: Pixy Misa at 01:09 PM | Comments (1) | Add Comment | Trackbacks (Suck)

Missing Files

Ever since the server craziness, I've gotten the following message after clicking on any file I uploaded with cPanel:

Not Found

The requested URL/[folder]/[file name].[extension] was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

Apache/1.3.36 Server at www.sithoughts.mu.nu Port 80

Again, this only happens with cPanel, as I can still get to files that were uploaded the conventional way.

Suggestions? Sorry if this has been covered and I missed it somehow.

Posted by: CD at 07:31 AM | Comments (3) | Add Comment | Trackbacks (Suck)

Yes, I Know What It Looks Like

What can I say? I like that design.

Posted by: Pixy Misa at 04:42 AM | Comments (17) | Add Comment | Trackbacks (Suck)

<< Page 20 >>

Processing 0.01, elapsed 0.2269 seconds.
46 queries taking 0.2164 seconds, 114 records returned.
Page size 93 kb.
Powered by Minx 0.8 beta.