Categories
Weblogging

Adding trackback entries for individual archive pages

Recovered from the Wayback Machine.

I’m firing on all (one) cylinder today.

Sam Ruby references a citation at Simon Willison, who quotes Tantek:

 

“…we now have Trackback and Pingback to help automate generating comment hyperlinks to blog-on-blog commentary. While I certainly applaud these efforts at automating the plumbing, I must ask – why is there any distinction in the presentation? I ask because many blogs present separate and different interfaces for their comments, trackbacks, and/or pingbacks.

 

Good points. After all, these technologies are nothing more than threads to a communication.

For Movable Type, it’s fairly simple to make a modification to your individual archive page to list trackback entries along with your comments. I’ve made this modification to my individual archive pages and thought I would pass on the how-tos of my mod.

Warning: To implement trackback within the archive page following my preferred approach, I did need to make a minor modification to one of the Movable Type’s Perl modules, Trackback.pm. It’s a minor change: it forces a re-build of the archive page when a trackback occurs so that the new trackback entry displays in a manner similar to how new comments are added, automatically, to the page. You can download the modified file here and replace the in your MT directory (put it into /lib/MT/App/). However, you do so at your own risk. You can find the edits I made because I surrounded the edit with comments containing my name, ‘Shelley’.

Repeat: You do so at your own risk. This modification is not vetted by Movable Type’s creators, Ben and Mena Trott.

For those taking the leap of faith, to add the trackback entries to your individual archives, add the following to your individual archive template:

 

<MTEntryIfAllowPings>
<MTPings>
<div class=”comments-body”>
<a name=”<$MTPingID$>”></a>
<a target=”new” href=”<$MTPingURL$>”><$MTPingTitle$></a><br /><br />

Excerpt: <$MTPingExcerpt$>
Weblog: <$MTPingBlogName$><br />
Tracked: <$MTPingDate$><br />
</MTPings>
</MTEntryIfAllowPings>

Note that the re-build of the page does slow the trackback ping, and if the remote site is having performance problems, the rebuild may not occur. However, the exact same process is used with comments, so whatever performance problems we’ll have with comments, we’ll have with trackbacks. Additionally, malicious people (known as spammers) could exploit the ping to add trackback entries pointing to junk — but they can do this anyway with the existing system. Web services are vulnerable that way.

Other trackback embedding approaches are discussed at the Movable Type forum on a thread related to this issue. I didn’t care for the approaches mentioned, excellent as they are, primarily because I would rather put the processing burden on the instance when the trackback occurs, rather than each time the individual page is accessed (by accessing MySql or forcing the page to be PHP or using SSI). I’m putting the burden on the ‘write’ because trackbacks follow the ‘write once, read many times’ pattern.

Still, don’t you like it when you’re given ten different ways to do something?

Update:

Oopsie! I didn’t read the MT thread that closely to see that Phil had already created this work around. Teach me not to read the entire thread more closely! And I missed this change originally at Phil’s. Honest!

So, dibs on this bit of creativity goes to Phil! Darn! And here I thought I did something new.

Categories
Technology Weblogging

Visual hints and clues

Recovered from the Wayback Machine.

At Burningbird, I modified my Movable Type template to display a small graphic associated with the subject (category) of a posting next to its title. Those who are less interested in my technology writing can then skip postings with the associated binary graphic next to the title; those who are uninterested in politics, can avoid that graphic, and so on. (My friend Chris at Empty Bottle also uses graphics to designate categories. However, his graphics are a lot more sophisticated than mine.)

I thought about creating multiple weblogs and focusing each on a different topic within the framework of my writing as ‘Burningbird’, but I wouldn’t write more (or less) on any subject just because I split them out into different weblogs. All I would do is scatter my thoughts about like dried bits of corn on a dusty field, forcing my readers to take on the visage of Crow, pecking about hoping to find that edible kernel among the dirt.

Besides, my thoughts don’t split cleanly along subject and topic, neatly categorized into discrete buckets. I’m just as likely to throw new photographs or a bit of writing whimsey into an essay on RDF, or mix a little technology into an essay on the Environment. My weblog reflects my writing, which reflects my mind: muddied waters of blended interest.

First, I created all the graphics of a relatively uniform size. I made them slightly longer than the heading caption bar, as I wanted to drop just below it. I then saved the graphics in the PNG format, naming them the exact name of the category.

Next, to add the graphic, within the main index template, I found the entry section associated with the posting title, as marked with the use of the MT template tag <$MTEntryTitle$>. I then replaced that tag with the following, which not only displays the graphic, but also has a link to the category page for people who want to read more entries based on that category:

 

<a href=”MTBlogArchiveURL<$MTEntryCategory dirifty=”1″ $>/index.htm”><img src=”http://weblog.burningbird.net/mm/<$MTEntryCategory$>.png” alt=”<$MTEntryCategory$>” align=”left” hspace=”6″ border=”0″ /></a>
<div class=”titlebox”><span class=”title”><a style=”text-decoration: none” href=”<$MTEntryLink$>”><$MTEntryTitle$></a></span></div>

 

 

The exact same template code can be used with the title on each individual page, for the same effect.

Graphic/Topic:

– Adventure

– Connecting

– Culture

– Environment

– Life

– Metablogging

– Neighborhood

Photography

– Politics

– Sensory

– Technology

Writing

– Sensuous Technology

– Women’s Writing

Categories
Technology Weblogging

Recent Comments Trackback – Introduction

Recovered from the Wayback Machine.

My weblogs show a Recent Comment/Trackback list that I’ve implemented using SQL and PHP rather than MT tags. The main reason I didn’t use tags is that I filter comments to showing only those that are on posts 30 days old or newer. This helps focus comments on current conversations, and also helps cut down some of the comment spamming problems.

An additional requirement for my Last Comments/Trackbacks list to intermix the comments and trackbacks into one list, showing the most recent items regardless of type of comment — local or remote. There are plug-ins to use to do some of this, but I like to keep my fingers into the PHP/SQL world.

To manage this, what I did was use what is called a SQL union. A SQL union operates pretty much as it sounds: it creates one set of data that’s the union of the result of two separate queries, and this data is what’s returned to the PHP program for processing. Unions have been around in Oracle and Sybase and other databases for some time now, but only added to MySQL in version 4.x. Luckily most of us are using 4.x.

The query string I’m using in my PHP process is:

 

$sql = ‘( SELECT tbping_id, tbping_source_url, tbping_title, entry_title, entry_id, blog_archive_url, tbping_created_on, 1 \’flag\’, category_label FROM mt_entry, mt_tbping, mt_trackback, mt_blog, mt_placement, mt_category WHERE entry_id = trackback_entry_id AND trackback_id = tbping_tb_id and entry_blog_id = blog_id AND entry_status = 2 AND placement_entry_id = entry_id and placement_is_primary = 1 and category_id = placement_category_id ORDER BY tbping_created_on DESC LIMIT 20 ) UNION ( SELECT comment_id, comment_url, comment_author, entry_title, entry_id, blog_archive_url, comment_created_on, 2, category_label FROM mt_comment, mt_entry, mt_blog, mt_placement, mt_category WHERE entry_id = comment_entry_id AND entry_blog_id = blog_id AND entry_status = 2 AND placement_entry_id = entry_id and placement_is_primary = 1 and category_id = placement_category_id and TO_DAYS(NOW()) – TO_DAYS(entry_created_on) <= 30 ORDER BY comment_created_on DESC LIMIT 20 ) ORDER BY 7 DESC LIMIT 20 ‘;

 

As you can see, this query is not necessarily for the faint at heart, or someone who isn’t familiar with SQL. I could at this point just tell you to copy and past this into your own page. However, if you’re like me, you don’t necessarily like using technology without having a better understanding of exactly what it is you’re doing, and why.

In this multi-part roll-out of the MySQL/SQL for Poets weblog, I’m going to cover all the different components of this query, including providing a basic introduction to the SELECT statement, using functions with queries, and ending with the UNION and how this query is used within PHP to provide the recent comments/trackbacks list.

Categories
Just Shelley Photography

Vertigo

Recovered from the Wayback Machine.

Today was cold but clear and I had to get out of the house or implode. Exploring around at the Missouri State Parks site I discovered a park not far from my home that I hadn’t been to before — Castlewood State Park. It was only 20 minutes away, 30 if I obeyed the speed limit, and it promised wonderful views of the Meramec.

During the drive I thought about this last week, and it seemed as if it was a tough week, or at least, it felt like a tough week. Do you know that feeling you get when it’s Saturday and you wake up feeling emotionally evaporated? I felt that way yesterday, and it was only Friday. I needed a walk, but not on paved roads and elegant little paths — I wanted to push myself to the limit.

(Of course, my current limit isn’t much beyond elegant little paths these days. But I wanted to find a new limit.)

After parking at Castlewood, I found the trailhead and looked up the hill and knew I’d found what I was seeking.

ridge9.jpg

About half way up, tired from both the sudden steep climb and trying to keep footing on dead leaves layered over loose shale and wettish clay, I stopped by the side of the road to see if I was truly having a heart attack, or if I just needed a breather. However, instead of standing there panting my life away, I fooled around with my camera, taking pictures of other hikers and trail bikers. “See”, my actions told the people passing by. “I’m not standing here because I’m out of shape and any second I’m going to keel over in exhaustion. I’m a photographer, taking photos. And my face is always this red.”

I never knew how handy it was to have a camera with you until I used it for a prop during my uphill breaks today. However, if I had carried my full photographic gear instead of just my little digital, I’d be dead now and you’d all be fussing with your blogrolls, removing my link.

ridge3.jpg

There’s time to think on a hike like this and my thoughts soon turned to the topic most on my mind lately, my impulsiveness and my temper — my passion, as the kind would call it. Yes, I also thought about weblogging, and the people I’ve met weblogging, too; both friends and foes, though at times, I’m not sure which is which. I thought about the discussion this week here and over at Misbehaving, by Gina and others, and how the topic was on being woman and invisible but the conversation ended up focusing on ‘look at me’ men.

We are too easily baited, too easily derailed, no, I am too easily derailed, slipping on these discussions as easily as I slipped on the rocks today. A mistake we/I make is to be defensive about our/my writing. If we believe what we write, we let it stand on its own — we don’t have to justify it, we don’t have to defend it, we don’t even have to debate it unless it gives us satisfaction and enriches the conversation. When we respond to criticism with ‘I meant to say…’, and it’s not true because we really did say what we wanted to say, then we’ve lost the high ground. No matter how outrageous or provoking the writing, the only one who can truly prove it false is the writer.

On the other hand, though, sometimes the high moral ground is lonely, and you think to yourself, “Pick your battles”, because it would be good to have others there fighting with you. The risk with this is that at some point you may find you’re no longer the one doing the picking and your high moral ground is reduced to a pebble in the ground that wouldn’t trip even the ungainly such as myself. What a conflict: we want to speak what we perceive is ‘the truth’, but we want to please. Rarely do the two go hand in hand.

These were the thoughts on my mind as I pushed my way uphill, cheeks billowing like a blowfish, forcing thoughts out between great gulps of air. When I reached the top I had to push all these thoughts aside and focus on the trail. It led along a bluff 250 feet above the river floor, and though the leaves were gone and the ground dry, the rocks were numerous and I had to watch my footing because there was little room for error. Particularly since this trail was literally at the bluff’s edge at times, and I suffer from vertigo.

ridge8.jpg

Remember those scenes in that great Hitchcock movie, “Vertigo”, when Jimmy Stewart would be overcome with his fear of heights? That spinning that would kind of make you feel sick? Unlike Jimmy, my vertigo isn’t crippling, though I cannot for the life of me walk to the edge of a cliff. I can and will walk along a bluff, but I have to push myself just to go out onto an outcropping.

When I reached my first outcropping and saw the view, I had to take some pics. I found a tree to lean against because when I would look through the viewfinder, I would get dizzy and start to lean forward, and slip about. But this bluff was just the first of many; there was one outcropping after another, each with a view better than the one before, and I found that my vertigo actually got a bit less with each occurrence. I started out leaning against a tree, but towards the end of the trip, I could actually push myself out to within a couple of feet of the edge and look down at a passing train below and snap one quick shot, feeling enormously pleased with myself.

(Before grasping behind me for something secure to hold on to because I was frozen to the spot, and ended up grabbing this poor little twig in the dirt and almost mauling it out of the ground just to get back on to the path.)

ridge1.jpg

The wind was gusting today, at times, and at the top, looking down at river below and feeling the sun and experiencing the beauty, I’m glad I did push myself to hike today, though my foot is paying for it tonight. Every time you push yourself beyond your edge, you’ve created a new edge, and how can you not feel good about that?

I left my hike for later in the day, as I usually do, and there were few people about when I stood at my last bluff and watched the sun starting to set. I hiked alone and though sometimes I wish I had someone to turn to and say, “Isn’t it marvelous”, I’ll still hike, though I may choose different paths.

ridge2.jpg

I write as I hike, alone, and not always looking for the easiest path, or the one most comfortable and secure. When I am finished though — walk or words — I feel good, though this is a poor word to use to describe the experience. I also feel lonely at times, too, like today while still feeling the glow from going that close to the edge, but wishing I had a hand to hold on to instead of that poor little twig.

Same with my writing — I wish with all my heart that I could write of lightsome things and beautiful dreams and could find my way into all your minds and hearts and pull your secret words out and publish them here so that you’ll all universally love me. Then my words would never have to sit here on this page, alone. Perhaps, like my hikes, what I need is to find a different path.

ridge4.jpg

It is close to the end of this story, and the end of my hike. I was near the end of the bluff and tired, very tired. A rule of hiking is always go hard going up, easy coming down. What this means is to climb up the toughest part of the trail, because you have better balance and you use your stronger muscles when you walk uphill. You want to save the easiest part of a trail for descent, because descent isn’t much more than a controlled fall.

I wasn’t sure what I’d find to take me down hill at the end of the bluff, but I was fairly sure it would be the easier walk because of the location of the trail head where I started. And I was right, and pleasantly surprised to find a set of wooden steps zigzagging all the way down to the bottom. Best of all, I could use the guardrails on the sides of steps and use my arms to bear some of the weight because at this point I was limping rather distinctly.

The guardrails were worn smooth after years of helping other walkers climb up or down, and at the end was a tunnel under the tracks to the path along the river. When I got to the bottom, I met a party of mothers and daughters out for a walk who obviously were not familiar with the path and had started from the opposite direction. As they were about to start climbing the steps I called out asking if they were familiar with the path, but they didn’t hear me, chatting among themselves. I thought to warn them of what lay ahead, but sometimes people just have to find these things out themselves.

Besides, they had hands to hold at the top if they got tired.

ridge5.jpg

Categories
Just Shelley outdoors Photography Places

The Insignificance of small beings

Before the cold rolled in I took my belated trip to Elephant Rocks today. I was able to avoid the gauntlet of confederate flags along the way by looking at a map and discovering that the road I take to one of the parks I visit frequently is the same road that ultimately leads to Elephant Rocks, but coming from the opposite direction. So I came in the back door.

Near the town of De Soto, I noticed an older woman walking along the side of the road and I stopped to offer her a lift. She was heading home after visiting an herbal shop in town, and her arms were full of bags of herbs.

She was a fascinating woman, probably about 60 or so, currently on disability because of cancer of the breast and diabetes and various other ailments. Born and bred in Missouri and lived most of her life along that stretch of road so she was able to give me the feel of the place — not the statistics or the raw facts. The feel. What the principal did when the last tornado hit the school, or that the owner of the place we just went past was forced to clean up after the last storm but the damage wasn’t his fault, why did the government make him clean it up?

My passenger was religious, which didn’t surprise me. Religion is not an intellectual exercise in Missouri, it’s as much a part of the countryside as the rocks I was driving to see today. What did surprise me, though, was the deep acceptance and trust in God she felt. She had cancer, and from all indications, terminal cancer, but she was healthy and happy and upbeat, hitchhiking into town to get her herbs, taking her homeopathic remedies and trusting to God to do the rest. And if God decided to take her home, well, she’d be content with that too.

“Why worry”, she said. “Worry just makes you look old.”

quarry.jpg

She pointed out the damage along the side of the road from a bad set of tornadoes that hit this spring. Stands of of trees were literally twisted off their roots, or picked up and tossed through the air like a twig. You could see the path of damage clearly as it followed along the highway, sometimes crossing it to hit the other side. I asked her if anyone she knew had been hurt and she said, no, God was protecting over them.

(When I got home, I looked the storm up and sure enough, the tornadoes killed people all around, but it left De Soto residents unharmed. An ambulance driver in the district remarked on this to reporters, saying, “It’s a miracle, isn’t it?”)

rocktwigs.jpg

The rest of the drive after dropping my passenger off was beautiful, one of those almost perfect late fall days with sunlight breaking through dark clouds to frame this quaint old farm house, or that shaggy dirty white bull wading in a creek. I missed the stories though, the glimpse into the people I only know through my car window driving past.

There were quite a few tourists at Elephant Rock considering a storm was rolling in. However, the area is large enough that you can have space to yourself, so for the most part, I walked among the rocks alone, stopping at one point to eat my favorite cheddar and bread-n-butter pickle sandwich.

Elephant Rocks, the park, the experience, how to describe it. From the State Park description comes the following:

Imagine giant granite rocks standing end-to-end like a train of circus elephants. That’s what you’ll see at Elephant Rocks State Park. About 1.5 billion years ago, hot magma cooled forming coarsely crystalline red granite, which later weathered into huge, rounded boulders. Standing atop a granite outcrop, one of the largest elephant rocks, Dumbo, tops the scales at a whopping 680 tons!

Visitors to Elephant Rocks State Park can easily view the granite boulders from the one-mile Braille Trail, designed to accommodate people with visual or physical disabilities. The trail passes by a quarry pond, which now supports a variety of animal life. A short spur off of the trail takes visitors to the top of the granite outcrop, where they can explore the maze of giant elephant rocks.

At first the boulders are small and manageable — they may weight several tons but they are shorter than you and you don’t feel the age as much. One of the rock formations that I called The Worm had two core sample drill holes made oh, a hundred and fifty years or so ago when they were testing to see the quality of the granite.

wormrock.jpg

The rock pile, if this word could possibly provide you a feel for what its like, has little trails all over and people can climb the rocks, and do, especially the younger kids. Being a little older, and a little more cautious, not to mention weighed down with my usual photographic paraphernalia, I didn’t frisk about like a young mountain goat. But I did explore most of the paths, include the wonderfully named “Fat Man’s Squeeze”.

I can say now, unequivocally, that I do not have a fat man’s build. However, I did have to suck in my chest, as it were, one time to get through an opening.

squeeze

According to the guide:

Molten rock, called magma, accumulated deep below the earth’s surface. The magma slowly cooled, forming red granite rock. As the weight of the overlying rock was removed by erosion, horizontal and vertical cracks developed, fracturing the massive granite into huge, angular blocks. Water permeated down through the fractures, and groundwater rounded the edges and corners of the blocks while still underground, forming giant rounded masses. Erosion eventually removed the disintegrated material from along the fractures, and exposed these boulders at the earth’s surface.

It was when you round a corner and look up and see the big rocks, the rocks that led to the name of the park that you’re left breathless. The Elephant Rock, prosaically named “Dumbo” sits on top of a knoll isolated from the other rocks and framed by the valley and mountains beyond.

Inscribed into Dumbo’s surface are the names and dates from the quarry workers over the years, including one from a guy called Murray in 1885. Nothing more than faint irritations by insignificant beasts happening in a split second of time.

elephantrocks1.jpg

The rocks towered over me, with a size that photos can’t capture without sticking some passing kid next to it for comparison, and don’t think I wasn’t considering it. But it still wouldn’t have conveyed the feel of the big rock.

I may think I am tall, and that I am impressive standing there shoulders back and head high, silhouetted against the clouds; but the rock was 27 feet tall and 35 feet long, and as old as earth. I am just that half seen shadow that is past before it’s even begun.

elephantrocks2.jpg

People were all about that rock. A tiny beagle walked by a boy with bright blue hair managed to get itself stuck in a crevice it was exploring. The boy finally managed to free it, calling it “dumb dog” all the time, but the puppy didn’t seem to mind if his wagging tail was any indication.

A woman about my age, maybe a little younger, accompanied by husband and daughter started a conversation with me, telling me about the rocks along the coast of Rhode Island where she was from and how much they reminded her of these big rocks. She asked if the formations were the result of the quarry operation and I said, no, that she was looking at a rock that was formed a billion years ago from the primal matter that makes up the Earth. She looked at me and then at the rock and then at me and said, “Really?”

Yup.

She ran over to her husband and daughter and started telling them about what I said, but he just looked at her and asked if she wanted to go look at the quarry now, and her daughter walked away and she stopped talking and followed them, bright yellow sweater forming a vivid constrast to the pink of the granite.

elephanttree.jpg

The weather got cold enough and the clouds stormy enough that most people were chased away and I was finally alone on that knoll high above the world. I placed my hand on Dumbo’s surprisingly warm surface and just stood there, for the longest time, thinking thoughts you’ll never read. Then I left.

On the way home I again passed the tornado path and it really was uncanny how many trees were down around homes, but not on the homes themselves. I kept looking for homes being repaired, fresh roof tiles and siding, new glass. But all I saw was old houses, rusty mobile homes and a whole lot of downed trees. Maybe my passenger was right and there was a God protecting them. She was serenely confident this was the answer; that God looked down and saw the people of De Soto and said, not today.

That must be what faith gives you — a feeling like you’re carrying a little bit of that rock with you, all the time.

willaway.jpg