new.blogger.possibilities

The good news is that the preview of the new version of Blogger includes new tags that allow you to include links to your archives in your main page and archive pages without resorting to messy javascript (harrumph). The bad news is that so far, based on the preview, it appears that you will still be getting the same old 01/01/1980 – 01/07/1980 style of dates in your links.

I’ve got much more to say about it, but mostly I’ll be talking to myself. Follow along if you want.

Including the links directly in the page source, rather than though Javascript, is a good thing: search engines will actually see the links, which not only helps distribute PageRank throughout your site, but also makes sure they will find your archive pages: if you have weekly archives, show seven days posts on the main page, use Javascript to include your archive links, and don’t get visited by Google’s frequent-indexer Freshbot, then it could miss entire archive files unless someone links to at least one post in every week. No more, and no more archive links that are invisible to people with Javascript turned off, or using browsers that don’t support it.

However, people don’t like the default date display, even in parts of the world where 01/07/1980 unambiguously means the seventh day of the first month. For much of the rest of the world, where that ought to mean the first day of the seventh month, except that they know that people in the US do it wrong, so they are never quite sure which it might be, it’s beyond ugly, and well into baffling. So, messy or not, people will be wanting to rewrite the date format, and even if Blogger sensibly allows for some choices in date format (a subset of the Date Header formats would be a good start), people who have gotten used to things like toggling between showing four links and showing all, or sorting links with newest first, are still going to want to do some scripting of their links.

Just exactly how to mod my script generator isn’t quite clear to me, yet, though. The first problem (logged in control.blogger.com) is that the new <BloggerArchives> container tag isn’t repeatable: only the last one in the template is interpreted, so something sensible like


<script type="text/javascript">
var count=0;
var BlogInfo = new Array();
<BloggerArchives>
BlogInfo[count++] = new ArchivePage( "<$BlogArchiveLink$>" , "<$BlogArchiveName$>" );
</BloggerArchives>
WriteArchiveSection( BlogInfo );
</script>
<noscript>
<BloggerArchives>
<a href="<$BlogArchiveLink$>"><$BlogArchiveName$></a> <br />
</BloggerArchives>	
</noscript>

doesn’t currently work. If that can’t or won’t be fixed, then it’s going to be brutally ugly, with alternating lines of <script>... and <noscript>.... Still, either way is doable. The question is whether it should be done.

The other alternative is something close to unobtrusive DHTML: what feels right is to do something similar to the way nice titles works: add a <script src=""> tag, and that’s it. Doing it isn’t quite so simple, though. Since they are just links, at the very least I have to insist that you add a class (or something more semantic, like a rel) to the links, and only to the archive links, so that the script can find them. Then, to be able to re-sort the links without making my life a living hell, I’ll need to insist that you enclose the links in a block-level element, and give it an id that I can find, and I’ll probably need to restrict what element you use, too. At this point, I’m not being very unobtrusive, am I? Possibly the best solution is just to be dogmatic about it: thou shalt use an unordered list with this id, thou shalt tell me whether you can have an external script or whether you are on free Blog*Spot and have to shove the script directly into each page. Extreme flexibility would be nice, but extreme support isn’t all that much fun.

5 Comments

Comment by Ev. #
2003-04-22 10:21:56

Phil,

You should probably mention you looked at a *preview* version of the new Blogger, which came with caveats, and therefore you can’t really say what users *will* be getting, can you?

Ev.

Comment by Phil Ringnalda #
2003-04-22 11:30:41

But I remembered to view-source and look for commented out things!

Yeah, you’re right, I should go back and weasel-word a bit, but since no matter what I still think that show-four/show-all and don’t-link-this-page are worth doing, I’ll have to figure something out. If you happen to be looking for something to add to Dan’o, though, a choice of link order would be a huge help to me: everything else gets a whole lot easier if I don’t have to remove all the links and put them back (rewriting the content and hiding some links is easy by comparison).

 
Comment by Phil Ringnalda #
2003-04-22 11:31:43

And thanks for the cool stuff!

 
 
Comment by michael #
2003-04-22 10:43:17

”…and therefore you can’t really say what users *will* be getting, can you?”

Ouch! hehe

What I was thinking, regarding an unobtrusive version if you go that route, is maybe you could apply it to links that match a certain href criteria. So, you recursively run through links looking for those that point to the archives, and then modify those.

var elTag = document.getElementsByTagName('a');
function Blogchives() {
	if (elTag && elTag != null) {
		for (i=0; i

’cept all those links are gonna be different aren’t they? Hmm, maybe you can do it with the title? Oh geez, nevermind. I never said I was a JavaScript guru. =)

Comment by Phil Ringnalda #
2003-04-22 11:34:58

That feels workable, other than the problem of explaining what I need from the user (”tell me the characters that appear in an archive url, but not in any other url”). If it’s inline and run through Blogger, I can just grab <$BlogArchiveFileName$> and use that, but it’s likely to be a big ugly wad of Javascript that would be better off in a separate file. Hmm.

 
 
Name (required)
E-mail (required - never shown publicly)
URI
Your Comment (smaller size | larger size)
You may use <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <del datetime="" cite=""> <dd> <dl> <dt> <em> <i> <ins datetime="" cite=""> <kbd> <li> <ol> <p> <pre> <q cite=""> <samp> <strong> <sub> <sup> <ul> in your comment.