mu.nu - We're sorry we accidentally destroyed your panties.

June 14, 2006

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)

1 Best thing about the internet... I'll be on the road this weekend and I'll still be able to check in for Minx updates. (unless of course my laptop dies... but let's not ask for trouble).

Posted by: Teresa @ at June 14, 2006 10:46 PM

2
two specialists were trapped on the Falls
reported the same day at 7 am, and 4 from the hillside into the mountains behind the begin of ground investigation into the mountains and got lost unknowingly trapped in the top of the waterfall. Due to hot weather, carrying mineral water has long been drunk. 4 people in starve and thirst,christian louboutin black suede Guerriere 120 wrapped boots, heat stroke and one of them has collapsed, merely to the Police.
into the mountains with Wizard Fire Rescue
4 geologists trapped for 12 hours
Fire Insurance under the rope to save them
head, according to the project description Tashi Norbu, who is the Sichuan Geological Survey Geological Survey 606 Brigade workers, is running to the city of Wuxi County Zhenping County, Shaanxi Province, a standard highway tunnel Baoshan Geological Survey section of the project tasks. Allegedly, this highway is the gateway to Shaanxi, Chongqing, the main traffic.
corner of the cliff up to 12 hours, one of them collapsed of heat stroke symptoms arise. Search alarm bombard brigade into the mountains, the four human rescued.
4 名 Geologist trapped in the mountains
responded an hour afterward to hear the sound
4 fire commanders and infantry and sorcerers, and then climbing to the depths of the mountains. Mountains everywhere overgrown with weeds, shrubs interlaced,Christian Louboutin Simple Pump Nude, there namely not way. Accidentally, it ambition fall into bottomless cliff. As soon for likely to ascertain the trapped, fire officers and men while hiking, while shouting aloud.
a platform in the mountains, the fire brigade discovered the first trapped by Sun A. Sohn said there are 3 trapped in the cliff near the front, not down because of physical causes.
deep jungles investigation expressway
in the instruction by Sohn, fire officers and soldiers persist ascent quest,Christian Louboutin Very Prive suede black, found under a cliff,Christian Louboutin Yolanda Black, different trapped, project pate Rob Tashi (sound). Officers and men found that the cliff is a dry cascade,Christian Louboutin Coral Patent Pump, 20 meters lofty. Sohn and Rob Tashi 2, slid down the tilt from the cliff's. The top of the cascade, the additional two were found trapped,Christian Louboutin Sexy 85 patent pump, they tin no be down for of extremely feeble.
fire officers resolved according to the situation: the search and rescue groups composed of four officers and males, Insurance rope to carry,Christian Louboutin BIANCA 140 KID, light, heatstroke drugs,christian louboutin hot pink suede Short Tina 120 fringe pumps, food,Christian Louboutin New Declic python, and water equipment items, the mountain advisers in the local search, and the remaining officers and males stand at the foot of the mountain.
rescue laborers to pass a rope to medicine, water and food brought to the top of the waterfall, so they multiplication strength. Meanwhile, rescue laborers skirmished from the side of the mound climbing to the top of the cliff,Christian Louboutin Mater Claude Red, finally reached the cliff top. They nailed one end of the warranty rope in a tree, two experts in rescue personnel plucked the insurance rope under the arm, along the slopes of the success down to the waterfall beneath.
fire emergency rescue
After nearly an hour's quick march, fire officers and men arrived at the foot of the mountains of geological experts were trapped. At a glance is always infinite mountains, do not know in which direction trapped. Fire officers made tel adjoin with the trapped experts, but still do not understand the specific place 4.
After extra than an hour of searching,Christian Louboutin Patent Slingback, rescuers finally heard the voice responded:
4 experts trapped for 12 hours
7:36 that evening, after nearly 3 hours of intense relief,Christian Louboutin New Declic suede pump, 4 Geological Survey of experts successfully reached after 12 hours trapped in the safety zone. But one hospital due to heat stroke,Christian Louboutin Very Prive black suede, the other 3 no serious body.
Chongqing Evening News correspondent Songlin Wen Fan Yongsong photo coverage
speed scrutinize for the Yu-Shan lost
fire brigade rushed to the scene to rescue
4 名 safety of geological experts were escorted down the mountain rescue personnel. microblogging Recommended | today's hot microblogging
introduced,Christian Louboutin red patent calf So Private 120 slingbacks, according to fire brigade in Wuxi County, the day of 16:16,Christian Louboutin Pigalle Point-Toe Pumps, the battalion received a report: the town is located in Wuxi and Nanjing factory town at the coalition of Long Gui , a small location called the olive groove of the mountains, there are four experts trapped Geological Survey, one of them collapsed of heat stroke, the request for rescue.

Posted by: louboutin cheap @ at May 16, 2011 02:37 AM

Hide Comments | Add Comment






Processing 0.0, elapsed 0.0118 seconds.
22 queries taking 0.009 seconds, 24 records returned.
Page size 15 kb.
Powered by Minx 0.8 beta.