Categories
Programming Languages Technology Weblogging

Trackback technologies

Recovered from the Wayback Machine.

Trackback stuff.

First, to re-cap, this page covers how to add trackback to your individual pages, and to force page re-builds when a new trackback ping arrives for the specific page.

I put the code for the Recent Trackbacks and Backtrack into text files that you can download and use in your MT weblog. It’s worked nicely since I put it in, and is ready for others to try. Consider it beta, and it’s not wrapped up pretty, pretty, but tech is gritty. Pretty bows get in the way of the moving parts.

The first file is backtrack.txt, which contains the Backtrack technology. To use this, modify the HTML to create a layout you want and then rename the file to “backtrack.php”, putting it into your main weblog directly.

Next, modify the individual daily archive page template to call the file:

 

<MTPingsSent>
<a href=”http://weblog.burningbird.net/backtrack.php?ping=<
$MTPingsSentURL$>”><$MTPingsSentURL$></a><br />
</MTPingsSent>

 

That’s it for backtrack.

Last, the PHP/MySql code that displays the Recent Trackbacks in the sidebar can be found in this file. To use, copy it into your main index template where you want the recent trackback list to go. You will need to change the username, password, weblog id, and database name in the code to match your environment. The values that need to change are bolded below:

 

<?php

$link = mysql_connect(“localhost”, “user“, “password“)
or die(“database errors”);
mysql_select_db (“database_name“);

$query = “SELECT tbping_id, tbping_source_url, tbping_title,
entry_title, entry_id FROM mt_entry, mt_tbping, mt_trackback where tbping_blog_id = 2 and entry_id = trackback_entry_id and trackback_id = tbping_tb_id ORDER BY tbping_id desc limit 10″;

$result = mysql_query($query) or die(“database errors”);

while ($line = mysql_fetch_array($result, MYSQL_NUM)) {
$input = $line[4];
$input = str_pad($input, 6, “0”, STR_PAD_LEFT);
printf(“<a href=’%s’>%s</a> on <a style=’font-weight: normal’ href=’http://weblog.burningbird.net/fires/%s.htm’>%s</a><br />”, $line[1],$line[2], $input, $line[3]);
}

/* Free resultset */
mysql_free_result($result);

/* Closing connection */
mysql_close($link);
?>

 

Any suggestions to improve the code are welcome — feel free to leave in comments, or cross-post…with trackbacks, of course.

So, there you go. New Toys. Enjoy.

Categories
Burningbird Technology Weblogging

Hosting stuff

Recovered from the Wayback Machine.

I had some serious Perl/CGI/MT problems earlier and couldn’t post, and you all couldn’t access the comments. Not overly thrilled with my host at this moment, to be honest. Especially when I see indications of a machine that’s overly burdened.

The problem with my host is the same problem with any host whose customers are using the identical functionality — everyone’s hitting the same types of system needs at the same time. Most of the folks here abouts are using Movable Type against MySql. That means Perl, CGI, MySql, and some PHP.

I used the ‘top’ command on my Linux server to see who was using the CPU for what. I saw one process that was using about 90% of the CPU running a Perl command, which most likely accounted for some of my problems.. When that one ended I saw a lot of mt-comment.cgi calls. What was funny is I saw some webloggers I know. For instance, I saw Moxie floating past.

It’s strange who you can run into deep in the innards of a machine.

Categories
XHTML/HTML

Fooflah

Recovered from the Wayback Machine.

Mark Pilgrim is a bit testy about the removal of certain elements within the XHTML 2.0 spec — specifically the *cite element. I checked around the forums associated with the XHTML working group’s effort. From what I can see, looks like the removal of cite may have been an accident.

Still, even if the removal was deliberate, if people aren’t happy about the XHTML specification and the direction it’s heading, why aren’t they talking at the W3C XHTML forum? The W3C isn’t going to go around our weblogs and look for our opinions. No offense but there’s probably 100,000 ‘regular web site’ pages for every weblogging page on the Net. Media darlings or not, we ain’t that big a thang …yet.

For instance, yesterday I found the following in the forum, which should warm Mark’s heart:

 

As it is in its 2002-12-11 WD, I think that XHTML 2.0 is far
away from both what the Web Authors are expecting and from what
could be done to “lead the Web to its full potential”.

The current WD makes some strategic choices (style attribute
for instance) that seem to me harmful.

I see no incentive for a Web Author to ever move to XHTML 2 from
a simple XMLized version of the actual transitional HTML4 (call
that as you wish). XHTML 2.0 does not contain ANY new key feature
and seem to get totally rid of all Authors’ requests between 1998
and today.

From my perspective, XHTML 2.0 as it is today is a failure and the
work of the HTML WG on this topic should be immediately and
totally reoriented.

 

Tantek Celik posted a link to Mark’s rant out at the XHTML forum and others who have responded have also agreed with my interpretation — it looks like the element was dropped by accident.

Regardless of ‘accident’ or not, the very fact that Tantek can post to this forum (which is monitored by the working group) demonstrates that there is communication paths to the W3C. Have a beef with XHTML 2.0? Then take it to the source, because there’s no guarantee that the W3C have even heard of Daypop much less read it with the breathless anticipation webloggers exhibit.

If you do choose to post out at the XHTML forum, a word to the wise: Just don’t have a hissy fit if you find that the people in the forum don’t agree with you, and have valid arguments to back their opinion.

*Personally, I’m more concerned about XHTML 2.0 dropping the style attribute than I am the cite element, though I understand the reasoning. And also note, the working group hasn’t dropped support for H1-H6 headers — they’re considering this based on issues raised.

Update:

search on ‘cite’ in the W3C-html (XHTML) forum.

Second Update:

We were correct — the cite element’s drop was an accident. A member of the W3C working group just posted to the forum that it will be put back in the next draft.

Third Update:

Fooflah. Mark has decided to continue with his snit about XHTML 2.0. I believe that his interpretation about the reason for the return of the CITE element is a bit self-centered — there was discussion about this before Mark’s post (as I pointed out in my post, linking to the relevant HTML forum news item), and general acknowledgement that this was most likely just a drafting error. And Let’s hope he doesn’t mind if we don’t choose to follow in his golden ‘well-linked’ footsteps about the direction we’ll take when it comes to technology implementation. I’m heading towards XHTML 1.0, not ‘back’ to HTML 4.0.

Categories
Technology Weblogging

Tracking the backing of backtrack on trackback

Say that three times fast…

I’ve made a minor change to the Backtrack code that should allow any weblog that supports a variation of [ping)?__mode=rss to work, and that returns valid RSS. This is implemented by default with Movable Type’s trackback, including the stand alone TB server. And, this also now includes Sam Ruby’s weblog, which was one that wasn’t working previously, as you can see from the following post: http://weblog.burningbird.net/fires/000766.htm, as well as this one.

(Click on the Sticky Strand for Sam’s post to see it in action.)

Sam implemented his own version of Backtrack, but his also allows one to ‘drill through’ to the backtracked items for each level, through the “back” link. In some ways I’ve stolen this functionality because when you backtrack one of Sam’s postings, his implementation of backtrack comes along, so to speak.

I thought about adding this support to my variation of Backtrack. What it would take would be to follow each link that’s returned within Backtrack, and use RDF/RSS auto-discovery to find the trackback link for the posting. For example, following one of Ben Hammersley’s posting, such as this one and looking at the source shows the block of embedded RDF/XML that Trackback uses for AutoDiscovery. I can then pull out the trackback ping and add this to my entry.

I could, but I won’t. I’m not interested in incorporating the expanded processing, and if people are interested in following a thread, they should follow it directly from each level rather than skip around. From the lack of interest shown in this functionality at Sam’s site, I don’t see that this is something people necessarily want.

At this time, Backtrack also does not include support for Pingback because I don’t see that this implementation of sticky strand supports an HTTP GET with parameter “?__mode=rss”, which is what I’m using. However, I may have missed this somewhere, though. because there is a tangle of messy threads about pingback, trackback, and variations thereof.

Categories
Technology Weblogging

Movable Type tips and tricks

So, how do you like the new look, eh? Still playing a bit, but it’s getting there — blue/green for sky and water; tan/rust/brown for earth and fire; gray/black/white for air and snow.

I’ve also been exploring different things to do with Movable Type; this weblogging tool is amazingly versatile. The Trott’s have left all sorts of open interfaces into the tool that you can use for whatever you want, such as my new Backtrack goodie.

If you use Movable Type, then two weblogs that should be on your must browse list:

My change for comments and trackback entries is a variation of PHP that I found at Girlie Matters web site. I don’t at this moment use Brad’s plug-ins, but I’m sure I will in the future.