Another Request for Technical Assistance

March 22, 2004 | 4 comments
By

Since the last request for technical assistance was a resounding success, I’m hoping to duplicate the feat. The current question involves a moderately advanced (or at least, beyond my current skill) movable type question and a bit of HTML (the query string function). Here goes:

We currently have a lot of authors, and we’re getting a lot of guests. Right now individual author and guest pages have to be made by hand. The particularly annoying one is the guest page, which right now is coded:

MTEntries author=”Ady”
. . .a bunch of coding for Ady’s entries. . .
/MTEntries
MTEntries author=”Claudia”
. . .identical copy of the posting code . . .
/MTEntries
MTEntries author=”Dan”
. . .yet another identical copy of the posting code . . .
/MTEntries
MTEntries author=”Linda”

and so forth. This means that the guest page needs to be updated every two weeks, that I have to copy and paste the full MT post code (a page of code), modify it for the new guest author, and so on.

It dawned on me that, if I could get the MTEntries tag to work properly with a Query String function, it would make a lot of my work go away. (Also, it would cut down on the size of the guests page, which is getting miles and miles of identical code for each new guest).

I’m hoping for some way to do this; I don’t know enough about MT to make it work at the moment. Here is what I would like to eventually accomplish:

I’m hoping for a web address like:

http://www.timesandseasons.org/authors.php?author=nate

to translate into MTEntries author=”nate” on a PHP index page designed for individual authors posts. Once it’s set up (if it works), the same page would work for all of the authors (with different query strings resulting in different author= values). After that, I’ll just have to update links, which will be so much easier.

So, my current needs are:

1. How to get a value into the MTEntries field. All of my current attempts, I’m embarrassed to say, have resulted in MT thinking that I was looking for an author named “value” rather than the variable I was trying to assign to “value.” (That is, I’ve tried typing “author_value = ‘adam’” in various places and then entering “MTEntries author=’author_value’”; every time so far, MT has thought the I want it to display posts by a person named author_value).

2. I can probably figure out query string rules (I hope), but any tips on that are also appreciated.

EDIT: I originally posted this with the > and < that MT puts into its code but they didn’t post properly, so they have been removed.

4 Responses to Another Request for Technical Assistance

  1. lyle on March 22, 2004 at 5:48 pm

    Can I add a T&S querry also? How come I can’t cut/paste in the Comments box here. It is SOOO frustrating! Is it just me? Cuz I can cut/paste on others blogs that use MT.

  2. Quinn on March 22, 2004 at 6:32 pm

    Kaimi: I’m glad my last solution worked so well for you. This one is beyond my coding experience, but I think you’re looking for something like this:

    http://www.scriptygoddess.com/archives/001222.php

    If that doesn’t work, try looking here:

    http://www.movabletype.org/support/

    Search for “archive by author” — this issue has been discussed and debated at length by the Movable Type community, and there are probably several different solutions. The good thing is, no matter what you’re trying to do, chances are someone else has already figured it out for you.

    Best of luck with archiving by author. It may be a headache to set up, but once you’ve got it running, it should maintain itself.

  3. Kaimi on March 22, 2004 at 6:43 pm

    Quinn,

    Thanks again, that looks like exactly what I’m looking for. It looks a little tricky, but not overly so — I’ll try implementing it when I have a little spare time.

    Thanks again for your help!

  4. Kaimi on March 22, 2004 at 6:48 pm

    Lyle,

    That’s a specially-coded feature, it is designed to only happen to the unrighteous.

    :)

    Actually, the root of the problem is that this site was set up by mostly Matt and myself. I can’t speak for Matt, but, as this post makes clear, I’m a website operator in my spare time only, and there are gaps in my coding knowledge that you could drive a truck through. :)

    I’m aware that our comments window is a little quirky. If and when I figure out why that is, I may be able to fix it (or, more likely, ask for help again).

WELCOME

Times and Seasons is a place to gather and discuss ideas of interest to faithful Latter-day Saints.