Posty Archivey History Stuff
Right, so I spent a couple of hours tonight (much to Nikki's chagrin) creating some new stuff for the archives page (just in case anyone looks there apart from the DRS's*).
Firstly, I created a list (on the main archive page, just under the 'Recent Posts' section) of the last ten posts from myself, and then the last ten posts from Babs. Go there now, and have a look. See? Nice, isn't it? Not bad, eh?
Secondly, as you can see from the big fat link beside the title of each list, there's now a new archives page for ALL posts by me, and another page listing ALL posts by Babs. Which is also nice, and not bad.
This is mostly for me, to see what I'm capable of in the copy-and-pasting stakes, and creating the odd original bitín of code myself, with this Moveable Type thingy, and this other PHP thingy, and possibly extending the functionality of the LWT a little bit. Mostly for me, I say, but definitely a little bit for Adrian, who's poor head has been fucking WRECKED since he lashed this blog together for me, with constant "how do you do this?" and "can you do this for me?" -type questions. Now, Adrian's a mate, and I hate asking my mate's for TOO much, in anything at all. Ade's been brilliant, but it's really time I started doing some of this shit myself. So I have, and this is what I've done for starters.
*Dirty Rotten Spammers







4.21-en
Comments
Nice. I presume that the numbers in brackets are the comment counts? You could make them link to the comments section itself (it's just the same as the entry permalink, but with #comments on the end).
Posted by: Pete | October 12, 2006 12:12 PM
Numbers in brackets are comment counts, yeah. And hmmm... Yeah. Interesting. I could do that, I think.
What I really wanted to do was create links from the author name in the original post (homepage and entry archive) to the archive of all their posts, but that's the one thing that's turning out to be really fucking hard, nay impossible.
If anyone has any ideas please comment!
Posted by: Matt | October 12, 2006 12:27 PM
I'd make some useful comment, but I've never seen under the hood of a MT installation, so I haven't a clue. From my Nucleus antics I do sympathise with the fact that when trying to write plugins or modify existing source some things that seem simple are actually incredibly hard (and difficult things that you don't need to do just fall out of the existing code).
Posted by: QE | October 12, 2006 3:12 PM
The bit about creating links to archives from author's names is dead fucking hard. I seem to be looking at something like:
<MTIfEqual a="[MTEntryAuthor]" b="Author1">
<MTInclude <a href="author 1 archive link goes here">AUTHOR 1 NAME</a>
</MTIfEqual>
<MTIfEqual a="[MTEntryAuthor]" b="Author2">
<MTInclude <a href="author 2 archive link goes here">AUTHOR 2 NAME</a>
</MTIfEqual>
Blah, blah, or something. I dunno how to script the "author archive link" bit though. Sniff.
Posted by: Matt | October 12, 2006 3:21 PM
Are your author archive pages guaranteed to be of the form 'author.name.php', as both the existing ones appear to be?
Try including the link unconditionally, and substituting the author name (it may have to be made lower case or something) into the URL itself.
Posted by: QE | October 12, 2006 3:30 PM
Hmmm... I'm not sure if I know exactly what you mean there, with your "unconditionally". Archive pages will definitely always be author.name.php, so long as I own this blog, and it uses MT.
Posted by: Matt | October 12, 2006 3:38 PM
I'm not sure how this MT markup works; where it's allowed an so on. With just PHP I'd do something like (using authorname) ?].php"][?php echo authorname ?][/a] ...
It may be that you can have:
[a href="startofurl.[MTInclude authorname].php"][MTInclude authorname][/a]
depending on where the MT statements are allowed (and what their syntax is).
I'm sure what I say isn't correct, but is it at least making sense to anyone?
Posted by: QE | October 12, 2006 3:55 PM
It's making a little bit of sense, but I think I do have to have the MT markup in there, as I have to have it to include the author name ($MTEntryAuthorDisplayName$, myself or Babs) in the post footer. I think I need another plugin (the "Compare" plugin, apparently) to accomplish what I want though.
Posted by: Matt | October 12, 2006 4:03 PM
What's the syntax for including $MTAuthorDisplayName$ in the page markup?
What other kinds of author name are available?
Posted by: QE | October 12, 2006 4:19 PM
I've done a little digging, and I think this might work (again using square brackets rather than angle ones, like I failed to explain last time):
[a href="http://lifewithouttoast.com/author.[$MTEntryAuthorName$].php" title="Show all posts by [$MTEntryAuthorDisplayName"]"][$MTEntryAuthorDisplayName$][/a]
Things most likely to be wrong are that the entity names are wrong, but by the look of the knowledgebase articles I found it does seem that you can imbed the [$MTBlah$] references inside HTML attributes.
Posted by: QE | October 12, 2006 4:36 PM
Display name and user name. Your display name might not be the same as your user name, in the case of Babs, for instance.
Posted by: Matt | October 12, 2006 4:56 PM
I think that could, in fact, do the job. The author display name is the same as the author.name.php archive name though, but I can change that in your code. I'll mail it to Captain Sevitz and see what he thinks.
I won't try it yet though, as I don't have sufficient time to fix it here in work should I balls the whole thing up completely.
Great things can happen when you have a friendly geek readership on your blog. :-)
Posted by: Matt | October 12, 2006 5:03 PM
Good luck with it. I'm now out of town until about Monday, so I'll leave you alone until then ;-)
Posted by: QE | October 12, 2006 5:06 PM
EEEEEEEEEEEEmail!
Posted by: Ian | October 13, 2006 12:40 PM