« Yumtastic Soup | Main | Thirtysomething »

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

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).

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!

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).

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.

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.

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.

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?

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.

What's the syntax for including $MTAuthorDisplayName$ in the page markup?
What other kinds of author name are available?

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.

Display name and user name. Your display name might not be the same as your user name, in the case of Babs, for instance.

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. :-)

Good luck with it. I'm now out of town until about Monday, so I'll leave you alone until then ;-)

EEEEEEEEEEEEmail!

Post a comment

JavaScript must be on.

Note you need JavaScript turned on to comment. Sorry but this is the only way we can stop the dirty filthy spammers.

You can send me an email if you are having problems.

TrackBack

TrackBack URL for this entry:
http://mt4.sevitz.net/mt-tb.cgi/2403

This blog looks totally, utterly pants in Internet Explorer. So stop making excuses and download Firefox (or even Opera or Safari) right now (unless you already have).

The Map (for newbies/stalkers)

The Twitters

    mattverso

    ( )

The Flick'red

The Stuff Wot People Said

  • Matt: I was going to suggest you Google it, but then I Googled it, and this post is at #2 on Google for "E...>>
  • Babs: What is eventech when it is at home Great pic btw! ...>>
  • Kristina: I was peeling garlic today and found several cloves that look like this. Very weird. As long as th...>>
  • Babs: I know, it's great!...>>
  • TUG: Misleading thread title of the year!...>>
  • Babs: Oh really O'Reilly, well there'd better be!! ...>>
  • Matt: The garden I WILL have, behind my house, when I have an actual house that isn't a "dooplex". In o...>>
  • Babs: Ahem...what garden? :)...>>
  • Babs: Me too kind of. It's just mildly a pain in the arse at times. ...>>
  • NKV: I wouldnt even allow that in the garden shed. :-P...>>
  • Matt: Personally, I'm liking the bangs....>>
  • Babs: Aren't they just!? I was looking at them for three months while I was travelling around Australia, a...>>

The Linkery Dumpage

I Am Deliciousness

The Crap

Irish Blogs Irish Bloggers Dublin Blogs Blog Directory - Blogged Opera Mini no-www.org DRM is DefectiveByDesign

The Email Thingy

Life Without Toast At G-mail Dot Com (or something similar)

The Hyperspace Drive

The Automatic Geek System

  • Geek Support, fixing of bugger-ups, moral support, code splicing, tech. administration, whining, über-nerdery and fetching of fluffy coffees by
  • s e v i t z d o t c o m, PIA, PHP, CBATG.

The Copyright

Creative Commons License
This weblog is licensed under a Creative Commons License. Please don't steal my/our stuff. Or if you are going to use our stuff, please link back or credit us. If you don't you are VERY NAUGHTY and will have to be PUNISHED.